VirtualBox

Ignore:
Timestamp:
Jan 19, 2007 9:56:57 PM (18 years ago)
Author:
vboxsync
Message:

memchr.

File:
1 copied

Legend:

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

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