00001 #ifdef HAVE_CONFIG_H
00002 #include "config.h"
00003 #endif
00004
00005 #if defined (__GLIBC__) && defined(__LCLINT__)
00006
00007
00008 extern __const __int32_t *__ctype_tolower;
00009
00010 extern __const __int32_t *__ctype_toupper;
00011
00012 #endif
00013
00014 #include <ctype.h>
00015
00016 #include <errno.h>
00017 #include <fcntl.h>
00018 #include <limits.h>
00019
00020 #if HAVE_MCHECK_H
00021 #include <mcheck.h>
00022 #endif
00023
00024 #include <stdio.h>
00025 #include <stdlib.h>
00026 #include <string.h>
00027
00028 #if HAVE_UNISTD_H
00029 #include <unistd.h>
00030 #endif
00031
00032 #ifdef __NeXT
00033
00034
00035 #include <libc.h>
00036 #endif
00037
00038 #if defined(__LCLINT__)
00039
00040 void * alloca (size_t __size)
00041
00042 ;
00043
00044 #endif
00045
00046
00047 #ifndef __GNUC__
00048 # if HAVE_ALLOCA_H
00049 # include <alloca.h>
00050 # else
00051 # ifdef _AIX
00052 #pragma alloca
00053 # else
00054 # ifndef alloca
00055 char *alloca ();
00056 # endif
00057 # endif
00058 # endif
00059 #elif defined(__GNUC__) && defined(__STRICT_ANSI__)
00060 #define alloca __builtin_alloca
00061 #endif
00062
00063
00064 char * xstrdup (const char *str)
00065 ;
00066
00067
00068 #if HAVE_MCHECK_H && defined(__GNUC__)
00069 #define vmefail() (fprintf(stderr, "virtual memory exhausted.\n"), exit(EXIT_FAILURE), NULL)
00070 #define xstrdup(_str) (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str)))
00071 #else
00072 #define xstrdup(_str) strdup(_str)
00073 #endif
00074
00075
00076 #include "popt.h"