- Timestamp:
- Jun 8, 2008 3:04:08 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/strchr_alias.c
r9502 r9503 1 1 /* $Id$ */ 2 2 /** @file 3 * IPRT - No-CRT str len() alias for gcc.3 * IPRT - No-CRT strchr() alias for gcc. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2006-200 8Sun Microsystems, Inc.7 * Copyright (C) 2006-2007 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 34 34 *******************************************************************************/ 35 35 #include <iprt/nocrt/string.h> 36 #undef str len36 #undef strchr 37 37 38 38 #if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS) 39 39 # ifndef __MINGW32__ 40 # pragma weak str len40 # pragma weak strchr 41 41 # endif 42 42 43 43 /* No alias support here (yet in the ming case). */ 44 extern char *(str len)(const char *psz, int ch)44 extern char *(strchr)(const char *psz, int ch) 45 45 { 46 return RT_NOCRT(str len)(psz, ch);46 return RT_NOCRT(strchr)(psz, ch); 47 47 } 48 48 49 49 #elif __GNUC__ >= 4 50 50 /* create a weak alias. */ 51 __asm__(".weak str len\t\n"52 " .set str len," RT_NOCRT_STR(strlen) "\t\n");51 __asm__(".weak strchr\t\n" 52 " .set strchr," RT_NOCRT_STR(strchr) "\t\n"); 53 53 #else 54 54 /* create a weak alias. */ 55 extern __typeof(RT_NOCRT(str len)) strlen __attribute__((weak, alias(RT_NOCRT_STR(strlen))));55 extern __typeof(RT_NOCRT(strchr)) strchr __attribute__((weak, alias(RT_NOCRT_STR(strchr)))); 56 56 #endif 57 57
Note:
See TracChangeset
for help on using the changeset viewer.