Changeset 194 in vbox for trunk/src/VBox/Runtime/string/memchr_alias.c
- Timestamp:
- Jan 19, 2007 9:56:57 PM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/string/memchr_alias.c
r79 r194 1 1 /* $Id: $ */ 2 2 /** @file 3 * InnoTek Portable Runtime - No-CRT mem set() alias for gcc.3 * InnoTek Portable Runtime - No-CRT memchr() alias for gcc. 4 4 */ 5 5 … … 25 25 *******************************************************************************/ 26 26 #include <iprt/nocrt/string.h> 27 #undef mem set27 #undef memchr 28 28 29 29 #if defined(__DARWIN__) || defined(__WIN__) 30 30 # ifndef __MINGW32__ 31 # pragma weak mem set31 # pragma weak memchr 32 32 # endif 33 33 34 34 /* No alias support here (yet in the ming case). */ 35 extern void *(mem set)(void *pvDst, int ch, size_t cb)35 extern void *(memchr)(const void *pv, int ch, size_t cb) 36 36 { 37 return RT_NOCRT(mem set)(pvDst, ch, cb);37 return RT_NOCRT(memchr)(pv, ch, cb); 38 38 } 39 39 40 40 #elif __GNUC__ >= 4 41 41 /* create a weak alias. */ 42 __asm__(".weak mem set\t\n"43 " .set mem set," RT_NOCRT_STR(memset) "\t\n");42 __asm__(".weak memchr\t\n" 43 " .set memchr," RT_NOCRT_STR(memchr) "\t\n"); 44 44 #else 45 45 /* create a weak alias. */ 46 extern __typeof(RT_NOCRT(mem set)) memset __attribute__((weak, alias(RT_NOCRT_STR(memset))));46 extern __typeof(RT_NOCRT(memchr)) memchr __attribute__((weak, alias(RT_NOCRT_STR(memchr)))); 47 47 #endif 48 48
Note:
See TracChangeset
for help on using the changeset viewer.