|
Mixe for Privacy and Anonymity in the Internet
|
00001 #ifdef __NeXT 00002 /* access macros are not declared in non posix mode in unistd.h - 00003 don't try to use posix on NeXTstep 3.3 ! */ 00004 #include <libc.h> 00005 #endif 00006 00007 00008 #ifdef __ICC 00009 #define HAVE_ALLOCA_H 00010 //#define alloca(size) _alloca(size) 00011 #else 00012 /* AIX requires this to be the first thing in the file. */ 00013 #ifndef __GNUC__ 00014 #ifdef HAVE_ALLOCA_H 00015 #include <alloca.h> 00016 #else 00017 #ifdef _AIX 00018 #pragma alloca 00019 #else 00020 #ifndef alloca /* predefined by HP cc +Olibcalls */ 00021 char *alloca (); 00022 #endif 00023 #endif 00024 #endif 00025 #elif defined(__GNUC__) && defined(__STRICT_ANSI__) 00026 #define alloca __builtin_alloca 00027 #else 00028 #ifdef HAVE_ALLOCA_H 00029 #include <alloca.h> 00030 #endif 00031 #endif 00032 #ifdef _WIN32 00033 #define alloca _alloca 00034 #endif 00035 #endif 00036 /*@only@*/ char * xstrdup (const char *str); 00037 00038 #if HAVE_MCHECK_H && defined(__GNUC__) 00039 #define vmefail() (fprintf(stderr, "virtual memory exhausted.\n"), exit(EXIT_FAILURE), NULL) 00040 #define xstrdup(_str) (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str))) 00041 #else 00042 #define xstrdup(_str) strdup(_str) 00043 #endif /* HAVE_MCHECK_H && defined(__GNUC__) */
1.7.6.1