00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #if defined __need_malloc_and_calloc
00019
00020
00021 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
00022
00023 #else
00024
00025
00026 #ifndef _GL_STDLIB_H
00027
00028
00029 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
00030
00031 #ifndef _GL_STDLIB_H
00032 #define _GL_STDLIB_H
00033
00034
00035
00036
00037
00038
00039 #ifndef EXIT_SUCCESS
00040 # define EXIT_SUCCESS 0
00041 #endif
00042
00043
00044 #ifndef EXIT_FAILURE
00045 # define EXIT_FAILURE 1
00046 #elif EXIT_FAILURE != 1
00047 # undef EXIT_FAILURE
00048 # define EXIT_FAILURE 1
00049 #endif
00050
00051
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #endif
00055
00056
00057 #if @GNULIB_MALLOC_POSIX@
00058 # if !@HAVE_MALLOC_POSIX@
00059 # undef malloc
00060 # define malloc rpl_malloc
00061 extern void * malloc (size_t size);
00062 # endif
00063 #elif defined GNULIB_POSIXCHECK
00064 # undef malloc
00065 # define malloc(s) \
00066 (GL_LINK_WARNING ("malloc is not POSIX compliant everywhere - " \
00067 "use gnulib module malloc-posix for portability"), \
00068 malloc (s))
00069 #endif
00070
00071
00072 #if @GNULIB_REALLOC_POSIX@
00073 # if !@HAVE_REALLOC_POSIX@
00074 # undef realloc
00075 # define realloc rpl_realloc
00076 extern void * realloc (void *ptr, size_t size);
00077 # endif
00078 #elif defined GNULIB_POSIXCHECK
00079 # undef realloc
00080 # define realloc(p,s) \
00081 (GL_LINK_WARNING ("realloc is not POSIX compliant everywhere - " \
00082 "use gnulib module realloc-posix for portability"), \
00083 realloc (p, s))
00084 #endif
00085
00086
00087 #if @GNULIB_CALLOC_POSIX@
00088 # if !@HAVE_CALLOC_POSIX@
00089 # undef calloc
00090 # define calloc rpl_calloc
00091 extern void * calloc (size_t nmemb, size_t size);
00092 # endif
00093 #elif defined GNULIB_POSIXCHECK
00094 # undef calloc
00095 # define calloc(n,s) \
00096 (GL_LINK_WARNING ("calloc is not POSIX compliant everywhere - " \
00097 "use gnulib module calloc-posix for portability"), \
00098 calloc (n, s))
00099 #endif
00100
00101
00102 #if @GNULIB_GETSUBOPT@
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114 # if !@HAVE_GETSUBOPT@
00115 extern int getsubopt (char **optionp, char *const *tokens, char **valuep);
00116 # endif
00117 #elif defined GNULIB_POSIXCHECK
00118 # undef getsubopt
00119 # define getsubopt(o,t,v) \
00120 (GL_LINK_WARNING ("getsubopt is unportable - " \
00121 "use gnulib module getsubopt for portability"), \
00122 getsubopt (o, t, v))
00123 #endif
00124
00125
00126 #if @GNULIB_MKDTEMP@
00127 # if !@HAVE_MKDTEMP@
00128
00129
00130
00131
00132
00133 extern char * mkdtemp (char * );
00134 # endif
00135 #elif defined GNULIB_POSIXCHECK
00136 # undef mkdtemp
00137 # define mkdtemp(t) \
00138 (GL_LINK_WARNING ("mkdtemp is unportable - " \
00139 "use gnulib module mkdtemp for portability"), \
00140 mkdtemp (t))
00141 #endif
00142
00143
00144 #if @GNULIB_MKSTEMP@
00145 # if @REPLACE_MKSTEMP@
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155 # define mkstemp rpl_mkstemp
00156 extern int mkstemp (char * );
00157 # else
00158
00159 # include <unistd.h>
00160 # endif
00161 #elif defined GNULIB_POSIXCHECK
00162 # undef mkstemp
00163 # define mkstemp(t) \
00164 (GL_LINK_WARNING ("mkstemp is unportable - " \
00165 "use gnulib module mkstemp for portability"), \
00166 mkstemp (t))
00167 #endif
00168
00169
00170 #if @GNULIB_PUTENV@
00171 # if @REPLACE_PUTENV@
00172 # undef putenv
00173 # define putenv rpl_putenv
00174 extern int putenv (char *string);
00175 # endif
00176 #endif
00177
00178
00179 #if @GNULIB_SETENV@
00180 # if !@HAVE_SETENV@
00181
00182
00183 extern int setenv (const char *name, const char *value, int replace);
00184 # endif
00185 #endif
00186
00187
00188 #if @GNULIB_UNSETENV@
00189 # if @HAVE_UNSETENV@
00190 # if @VOID_UNSETENV@
00191
00192
00193 # define unsetenv(name) ((unsetenv)(name), 0)
00194 # endif
00195 # else
00196
00197 extern int unsetenv (const char *name);
00198 # endif
00199 #endif
00200
00201
00202 #ifdef __cplusplus
00203 }
00204 #endif
00205
00206 #endif
00207 #endif
00208 #endif