22 #if !defined(__GNUC__) || defined(APPLE)
23 /* Apparently the OS X port of gcc gags on __attribute__.
25 * <http://www.opensource.apple.com/bugs/X/gcc/2512150.html> */
26 #define __attribute__(x)
31 /* access macros are not declared in non posix mode in unistd.h -
32 don't try to use posix on NeXTstep 3.3 ! */
36 #if defined(__LCLINT__)
37 /*@-declundef -incondefs -redecl@*/ /* LCL: missing annotation */
38 /*@only@*/ void * alloca (size_t __size
)
39 /*@ensures MaxSet(result) == (__size - 1) @*/
41 /*@=declundef =incondefs =redecl@*/
44 /* AIX requires this to be the first thing in the file. */
53 # ifndef alloca /* predefined by HP cc +Olibcalls */
60 # define alloca(sz) malloc(sz) /* Kludge this for now */
64 #elif defined(__GNUC__) && defined(__STRICT_ANSI__)
65 #define alloca __builtin_alloca
69 /*@mayexit@*/ /*@only@*/ char * xstrdup (const char *str
)
73 #if HAVE_MCHECK_H && defined(__GNUC__)
74 #define vmefail() (fprintf(stderr, "virtual memory exhausted.\n"), exit(EXIT_FAILURE), NULL)
75 #define xstrdup(_str) (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str)))
77 #define xstrdup(_str) strdup(_str)
78 #endif /* HAVE_MCHECK_H && defined(__GNUC__) */
80 #define UNUSED(x) x __attribute__((__unused__))