VirtualBox

Ignore:
Timestamp:
Mar 3, 2007 11:49:53 PM (18 years ago)
Author:
vboxsync
Message:

memcmp, strchr, strcmp.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/string/strchr_alias.c

    r1060 r1174  
    11/* $Id: $ */
    22/** @file
    3  * InnoTek Portable Runtime - No-CRT memchr() alias for gcc.
     3 * InnoTek Portable Runtime - No-CRT strchr() alias for gcc.
    44 */
    55
     
    2525*******************************************************************************/
    2626#include <iprt/nocrt/string.h>
    27 #undef memchr
     27#undef strchr
    2828
    2929#if defined(__DARWIN__) || defined(__WIN__)
    3030# ifndef __MINGW32__
    31 #  pragma weak memchr
     31#  pragma weak strchr
    3232# endif
    3333
    3434/* No alias support here (yet in the ming case). */
    35 extern void *(memchr)(const void *pv, int ch, size_t cb)
     35extern char *(strchr)(const char *psz, int ch)
    3636{
    37     return RT_NOCRT(memchr)(pv, ch, cb);
     37    return RT_NOCRT(strchr)(pv, ch);
    3838}
    3939
    4040#elif __GNUC__ >= 4
    4141/* create a weak alias. */
    42 __asm__(".weak memchr\t\n"
    43         " .set memchr," RT_NOCRT_STR(memchr) "\t\n");
     42__asm__(".weak strchr\t\n"
     43        " .set strchr," RT_NOCRT_STR(strchr) "\t\n");
    4444#else
    4545/* create a weak alias. */
    46 extern __typeof(RT_NOCRT(memchr)) memchr __attribute__((weak, alias(RT_NOCRT_STR(memchr))));
     46extern __typeof(RT_NOCRT(strchr)) strchr __attribute__((weak, alias(RT_NOCRT_STR(strchr))));
    4747#endif
    4848
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette