00001
00005 #ifdef HAVE_CONFIG_H
00006 #include "config.h"
00007 #endif
00008
00009 #if defined (__GLIBC__) && defined(__LCLINT__)
00010
00011
00012 extern __const __int32_t *__ctype_tolower;
00013
00014 extern __const __int32_t *__ctype_toupper;
00015
00016 #endif
00017
00018 #include <ctype.h>
00019
00020 #include <errno.h>
00021 #include <fcntl.h>
00022 #include <limits.h>
00023
00024 #ifdef HAVE_MCHECK_H
00025 #include <mcheck.h>
00026 #endif
00027
00028 #include <stdio.h>
00029 #include <stdlib.h>
00030 #include <string.h>
00031
00032 #ifdef HAVE_UNISTD_H
00033 #include <unistd.h>
00034 #endif
00035
00036 #ifdef __NeXT
00037
00038
00039 #include <libc.h>
00040 #endif
00041
00042
00043
00044 char * xstrdup (const char *str)
00045 ;
00046
00047
00048 #if defined(HAVE_MCHECK_H) && defined(__GNUC__)
00049 #define vmefail() (fprintf(stderr, "virtual memory exhausted.\n"), exit(EXIT_FAILURE), NULL)
00050 #define xstrdup(_str) (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str)))
00051 #else
00052 #define xstrdup(_str) strdup(_str)
00053 #endif
00054
00055 #if defined(HAVE___SECURE_GETENV) && !defined(__LCLINT__)
00056 #define getenv(_s) __secure_getenv(_s)
00057 #endif
00058
00059 #include "popt.h"