]> git.cworth.org Git - tar/blob - gnu/stdlib.in.h
9b407752a728cc15b434386077d0e1b0540797aa
[tar] / gnu / stdlib.in.h
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* A GNU-like <stdlib.h>.
4
5    Copyright (C) 1995, 2001-2004, 2006-2010 Free Software Foundation, Inc.
6
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3 of the License, or
10    (at your option) any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20 #if __GNUC__ >= 3
21 @PRAGMA_SYSTEM_HEADER@
22 #endif
23
24 #if defined __need_malloc_and_calloc
25 /* Special invocation convention inside glibc header files.  */
26
27 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
28
29 #else
30 /* Normal invocation convention.  */
31
32 #ifndef _GL_STDLIB_H
33
34 /* The include_next requires a split double-inclusion guard.  */
35 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
36
37 #ifndef _GL_STDLIB_H
38 #define _GL_STDLIB_H
39
40 /* NetBSD 5.0 mis-defines NULL.  */
41 #include <stddef.h>
42
43 /* Solaris declares getloadavg() in <sys/loadavg.h>.  */
44 #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
45 # include <sys/loadavg.h>
46 #endif
47
48 /* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
49    from <stdlib.h> if _REENTRANT is defined.  Include it always.  */
50 #if @HAVE_RANDOM_H@
51 # include <random.h>
52 #endif
53
54 #if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \
55     || defined GNULIB_POSIXCHECK
56 # include <stdint.h>
57 #endif
58
59 #if !@HAVE_STRUCT_RANDOM_DATA@
60 struct random_data
61 {
62   int32_t *fptr;                /* Front pointer.  */
63   int32_t *rptr;                /* Rear pointer.  */
64   int32_t *state;               /* Array of state values.  */
65   int rand_type;                /* Type of random number generator.  */
66   int rand_deg;                 /* Degree of random number generator.  */
67   int rand_sep;                 /* Distance between front and rear.  */
68   int32_t *end_ptr;             /* Pointer behind state table.  */
69 };
70 #endif
71
72 #if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__
73 /* On MacOS X 10.3, only <unistd.h> declares mkstemp.  */
74 /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt.  */
75 /* But avoid namespace pollution on glibc systems.  */
76 # include <unistd.h>
77 #endif
78
79 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
80
81 /* The definition of _GL_ARG_NONNULL is copied here.  */
82
83 /* The definition of _GL_WARN_ON_USE is copied here.  */
84
85
86 /* Some systems do not define EXIT_*, despite otherwise supporting C89.  */
87 #ifndef EXIT_SUCCESS
88 # define EXIT_SUCCESS 0
89 #endif
90 /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
91    with proper operation of xargs.  */
92 #ifndef EXIT_FAILURE
93 # define EXIT_FAILURE 1
94 #elif EXIT_FAILURE != 1
95 # undef EXIT_FAILURE
96 # define EXIT_FAILURE 1
97 #endif
98
99
100 #if @GNULIB_ATOLL@
101 /* Parse a signed decimal integer.
102    Returns the value of the integer.  Errors are not detected.  */
103 # if !@HAVE_ATOLL@
104 _GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1)));
105 # endif
106 _GL_CXXALIAS_SYS (atoll, long long, (const char *string));
107 _GL_CXXALIASWARN (atoll);
108 #elif defined GNULIB_POSIXCHECK
109 # undef atoll
110 # if HAVE_RAW_DECL_ATOLL
111 _GL_WARN_ON_USE (atoll, "atoll is unportable - "
112                  "use gnulib module atoll for portability");
113 # endif
114 #endif
115
116 #if @GNULIB_CALLOC_POSIX@
117 # if !@HAVE_CALLOC_POSIX@
118 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
119 #   undef calloc
120 #   define calloc rpl_calloc
121 #  endif
122 _GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size));
123 _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
124 # else
125 _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
126 # endif
127 _GL_CXXALIASWARN (calloc);
128 #elif defined GNULIB_POSIXCHECK
129 # undef calloc
130 /* Assume calloc is always declared.  */
131 _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
132                  "use gnulib module calloc-posix for portability");
133 #endif
134
135 #if @GNULIB_CANONICALIZE_FILE_NAME@
136 # if @REPLACE_CANONICALIZE_FILE_NAME@
137 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
138 #   define canonicalize_file_name rpl_canonicalize_file_name
139 #  endif
140 _GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name)
141                                                   _GL_ARG_NONNULL ((1)));
142 _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name));
143 # else
144 #  if !@HAVE_CANONICALIZE_FILE_NAME@
145 _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
146                                                   _GL_ARG_NONNULL ((1)));
147 #  endif
148 _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
149 # endif
150 _GL_CXXALIASWARN (canonicalize_file_name);
151 #elif defined GNULIB_POSIXCHECK
152 # undef canonicalize_file_name
153 # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
154 _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - "
155                  "use gnulib module canonicalize-lgpl for portability");
156 # endif
157 #endif
158
159 #if @GNULIB_GETLOADAVG@
160 /* Store max(NELEM,3) load average numbers in LOADAVG[].
161    The three numbers are the load average of the last 1 minute, the last 5
162    minutes, and the last 15 minutes, respectively.
163    LOADAVG is an array of NELEM numbers.  */
164 # if !@HAVE_DECL_GETLOADAVG@
165 _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
166                                    _GL_ARG_NONNULL ((1)));
167 # endif
168 _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
169 _GL_CXXALIASWARN (getloadavg);
170 #elif defined GNULIB_POSIXCHECK
171 # undef getloadavg
172 # if HAVE_RAW_DECL_GETLOADAVG
173 _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
174                  "use gnulib module getloadavg for portability");
175 # endif
176 #endif
177
178 #if @GNULIB_GETSUBOPT@
179 /* Assuming *OPTIONP is a comma separated list of elements of the form
180    "token" or "token=value", getsubopt parses the first of these elements.
181    If the first element refers to a "token" that is member of the given
182    NULL-terminated array of tokens:
183      - It replaces the comma with a NUL byte, updates *OPTIONP to point past
184        the first option and the comma, sets *VALUEP to the value of the
185        element (or NULL if it doesn't contain an "=" sign),
186      - It returns the index of the "token" in the given array of tokens.
187    Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
188    For more details see the POSIX:2001 specification.
189    http://www.opengroup.org/susv3xsh/getsubopt.html */
190 # if !@HAVE_GETSUBOPT@
191 _GL_FUNCDECL_SYS (getsubopt, int,
192                   (char **optionp, char *const *tokens, char **valuep)
193                   _GL_ARG_NONNULL ((1, 2, 3)));
194 # endif
195 _GL_CXXALIAS_SYS (getsubopt, int,
196                   (char **optionp, char *const *tokens, char **valuep));
197 _GL_CXXALIASWARN (getsubopt);
198 #elif defined GNULIB_POSIXCHECK
199 # undef getsubopt
200 # if HAVE_RAW_DECL_GETSUBOPT
201 _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
202                  "use gnulib module getsubopt for portability");
203 # endif
204 #endif
205
206 #if @GNULIB_MALLOC_POSIX@
207 # if !@HAVE_MALLOC_POSIX@
208 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
209 #   undef malloc
210 #   define malloc rpl_malloc
211 #  endif
212 _GL_FUNCDECL_RPL (malloc, void *, (size_t size));
213 _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
214 # else
215 _GL_CXXALIAS_SYS (malloc, void *, (size_t size));
216 # endif
217 _GL_CXXALIASWARN (malloc);
218 #elif defined GNULIB_POSIXCHECK
219 # undef malloc
220 /* Assume malloc is always declared.  */
221 _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
222                  "use gnulib module malloc-posix for portability");
223 #endif
224
225 #if @GNULIB_MKDTEMP@
226 /* Create a unique temporary directory from TEMPLATE.
227    The last six characters of TEMPLATE must be "XXXXXX";
228    they are replaced with a string that makes the directory name unique.
229    Returns TEMPLATE, or a null pointer if it cannot get a unique name.
230    The directory is created mode 700.  */
231 # if !@HAVE_MKDTEMP@
232 _GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1)));
233 # endif
234 _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/));
235 _GL_CXXALIASWARN (mkdtemp);
236 #elif defined GNULIB_POSIXCHECK
237 # undef mkdtemp
238 # if HAVE_RAW_DECL_MKDTEMP
239 _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
240                  "use gnulib module mkdtemp for portability");
241 # endif
242 #endif
243
244 #if @GNULIB_MKOSTEMP@
245 /* Create a unique temporary file from TEMPLATE.
246    The last six characters of TEMPLATE must be "XXXXXX";
247    they are replaced with a string that makes the file name unique.
248    The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
249    and O_TEXT, O_BINARY (defined in "binary-io.h").
250    The file is then created, with the specified flags, ensuring it didn't exist
251    before.
252    The file is created read-write (mask at least 0600 & ~umask), but it may be
253    world-readable and world-writable (mask 0666 & ~umask), depending on the
254    implementation.
255    Returns the open file descriptor if successful, otherwise -1 and errno
256    set.  */
257 # if !@HAVE_MKOSTEMP@
258 _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
259                                  _GL_ARG_NONNULL ((1)));
260 # endif
261 _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
262 _GL_CXXALIASWARN (mkostemp);
263 #elif defined GNULIB_POSIXCHECK
264 # undef mkostemp
265 # if HAVE_RAW_DECL_MKOSTEMP
266 _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
267                  "use gnulib module mkostemp for portability");
268 # endif
269 #endif
270
271 #if @GNULIB_MKOSTEMPS@
272 /* Create a unique temporary file from TEMPLATE.
273    The last six characters of TEMPLATE before a suffix of length
274    SUFFIXLEN must be "XXXXXX";
275    they are replaced with a string that makes the file name unique.
276    The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
277    and O_TEXT, O_BINARY (defined in "binary-io.h").
278    The file is then created, with the specified flags, ensuring it didn't exist
279    before.
280    The file is created read-write (mask at least 0600 & ~umask), but it may be
281    world-readable and world-writable (mask 0666 & ~umask), depending on the
282    implementation.
283    Returns the open file descriptor if successful, otherwise -1 and errno
284    set.  */
285 # if !@HAVE_MKOSTEMPS@
286 _GL_FUNCDECL_SYS (mkostemps, int,
287                   (char * /*template*/, int /*suffixlen*/, int /*flags*/)
288                   _GL_ARG_NONNULL ((1)));
289 # endif
290 _GL_CXXALIAS_SYS (mkostemps, int,
291                   (char * /*template*/, int /*suffixlen*/, int /*flags*/));
292 _GL_CXXALIASWARN (mkostemps);
293 #elif defined GNULIB_POSIXCHECK
294 # undef mkostemps
295 # if HAVE_RAW_DECL_MKOSTEMPS
296 _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
297                  "use gnulib module mkostemps for portability");
298 # endif
299 #endif
300
301 #if @GNULIB_MKSTEMP@
302 /* Create a unique temporary file from TEMPLATE.
303    The last six characters of TEMPLATE must be "XXXXXX";
304    they are replaced with a string that makes the file name unique.
305    The file is then created, ensuring it didn't exist before.
306    The file is created read-write (mask at least 0600 & ~umask), but it may be
307    world-readable and world-writable (mask 0666 & ~umask), depending on the
308    implementation.
309    Returns the open file descriptor if successful, otherwise -1 and errno
310    set.  */
311 # if @REPLACE_MKSTEMP@
312 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
313 #   define mkstemp rpl_mkstemp
314 #  endif
315 _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
316 _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/));
317 # else
318 _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/));
319 # endif
320 _GL_CXXALIASWARN (mkstemp);
321 #elif defined GNULIB_POSIXCHECK
322 # undef mkstemp
323 # if HAVE_RAW_DECL_MKSTEMP
324 _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
325                  "use gnulib module mkstemp for portability");
326 # endif
327 #endif
328
329 #if @GNULIB_MKSTEMPS@
330 /* Create a unique temporary file from TEMPLATE.
331    The last six characters of TEMPLATE prior to a suffix of length
332    SUFFIXLEN must be "XXXXXX";
333    they are replaced with a string that makes the file name unique.
334    The file is then created, ensuring it didn't exist before.
335    The file is created read-write (mask at least 0600 & ~umask), but it may be
336    world-readable and world-writable (mask 0666 & ~umask), depending on the
337    implementation.
338    Returns the open file descriptor if successful, otherwise -1 and errno
339    set.  */
340 # if !@HAVE_MKSTEMPS@
341 _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)
342                                  _GL_ARG_NONNULL ((1)));
343 # endif
344 _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/));
345 _GL_CXXALIASWARN (mkstemps);
346 #elif defined GNULIB_POSIXCHECK
347 # undef mkstemps
348 # if HAVE_RAW_DECL_MKSTEMPS
349 _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
350                  "use gnulib module mkstemps for portability");
351 # endif
352 #endif
353
354 #if @GNULIB_PUTENV@
355 # if @REPLACE_PUTENV@
356 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
357 #   undef putenv
358 #   define putenv rpl_putenv
359 #  endif
360 _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
361 _GL_CXXALIAS_RPL (putenv, int, (char *string));
362 # else
363 _GL_CXXALIAS_SYS (putenv, int, (char *string));
364 # endif
365 _GL_CXXALIASWARN (putenv);
366 #endif
367
368
369 #if @GNULIB_RANDOM_R@
370 # if !@HAVE_RANDOM_R@
371 #  ifndef RAND_MAX
372 #   define RAND_MAX 2147483647
373 #  endif
374 # endif
375 #endif
376
377 #if @GNULIB_RANDOM_R@
378 # if !@HAVE_RANDOM_R@
379 _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
380                                  _GL_ARG_NONNULL ((1, 2)));
381 # endif
382 _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
383 _GL_CXXALIASWARN (random_r);
384 #elif defined GNULIB_POSIXCHECK
385 # undef random_r
386 # if HAVE_RAW_DECL_RANDOM_R
387 _GL_WARN_ON_USE (random_r, "random_r is unportable - "
388                  "use gnulib module random_r for portability");
389 # endif
390 #endif
391
392 #if @GNULIB_RANDOM_R@
393 # if !@HAVE_RANDOM_R@
394 _GL_FUNCDECL_SYS (srandom_r, int,
395                   (unsigned int seed, struct random_data *rand_state)
396                   _GL_ARG_NONNULL ((2)));
397 # endif
398 _GL_CXXALIAS_SYS (srandom_r, int,
399                   (unsigned int seed, struct random_data *rand_state));
400 _GL_CXXALIASWARN (srandom_r);
401 #elif defined GNULIB_POSIXCHECK
402 # undef srandom_r
403 # if HAVE_RAW_DECL_SRANDOM_R
404 _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
405                  "use gnulib module random_r for portability");
406 # endif
407 #endif
408
409 #if @GNULIB_RANDOM_R@
410 # if !@HAVE_RANDOM_R@
411 _GL_FUNCDECL_SYS (initstate_r, int,
412                   (unsigned int seed, char *buf, size_t buf_size,
413                    struct random_data *rand_state)
414                   _GL_ARG_NONNULL ((2, 4)));
415 # endif
416 _GL_CXXALIAS_SYS (initstate_r, int,
417                   (unsigned int seed, char *buf, size_t buf_size,
418                    struct random_data *rand_state));
419 _GL_CXXALIASWARN (initstate_r);
420 #elif defined GNULIB_POSIXCHECK
421 # undef initstate_r
422 # if HAVE_RAW_DECL_INITSTATE_R
423 _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
424                  "use gnulib module random_r for portability");
425 # endif
426 #endif
427
428 #if @GNULIB_RANDOM_R@
429 # if !@HAVE_RANDOM_R@
430 _GL_FUNCDECL_SYS (setstate_r, int,
431                   (char *arg_state, struct random_data *rand_state)
432                   _GL_ARG_NONNULL ((1, 2)));
433 # endif
434 _GL_CXXALIAS_SYS (setstate_r, int,
435                   (char *arg_state, struct random_data *rand_state));
436 _GL_CXXALIASWARN (setstate_r);
437 #elif defined GNULIB_POSIXCHECK
438 # undef setstate_r
439 # if HAVE_RAW_DECL_SETSTATE_R
440 _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
441                  "use gnulib module random_r for portability");
442 # endif
443 #endif
444
445
446 #if @GNULIB_REALLOC_POSIX@
447 # if !@HAVE_REALLOC_POSIX@
448 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
449 #   undef realloc
450 #   define realloc rpl_realloc
451 #  endif
452 _GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size));
453 _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
454 # else
455 _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
456 # endif
457 _GL_CXXALIASWARN (realloc);
458 #elif defined GNULIB_POSIXCHECK
459 # undef realloc
460 /* Assume realloc is always declared.  */
461 _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
462                  "use gnulib module realloc-posix for portability");
463 #endif
464
465 #if @GNULIB_REALPATH@
466 # if @REPLACE_REALPATH@
467 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
468 #   define realpath rpl_realpath
469 #  endif
470 _GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved)
471                                     _GL_ARG_NONNULL ((1)));
472 _GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved));
473 # else
474 #  if !@HAVE_REALPATH@
475 _GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
476                                     _GL_ARG_NONNULL ((1)));
477 #  endif
478 _GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
479 # endif
480 _GL_CXXALIASWARN (realpath);
481 #elif defined GNULIB_POSIXCHECK
482 # undef realpath
483 # if HAVE_RAW_DECL_REALPATH
484 _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
485                  "canonicalize or canonicalize-lgpl for portability");
486 # endif
487 #endif
488
489 #if @GNULIB_RPMATCH@
490 /* Test a user response to a question.
491    Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear.  */
492 # if !@HAVE_RPMATCH@
493 _GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1)));
494 # endif
495 _GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
496 _GL_CXXALIASWARN (rpmatch);
497 #elif defined GNULIB_POSIXCHECK
498 # undef rpmatch
499 # if HAVE_RAW_DECL_RPMATCH
500 _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
501                  "use gnulib module rpmatch for portability");
502 # endif
503 #endif
504
505 #if @GNULIB_SETENV@
506 /* Set NAME to VALUE in the environment.
507    If REPLACE is nonzero, overwrite an existing value.  */
508 # if @REPLACE_SETENV@
509 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
510 #   undef setenv
511 #   define setenv rpl_setenv
512 #  endif
513 _GL_FUNCDECL_RPL (setenv, int,
514                   (const char *name, const char *value, int replace)
515                   _GL_ARG_NONNULL ((1)));
516 _GL_CXXALIAS_RPL (setenv, int,
517                   (const char *name, const char *value, int replace));
518 # else
519 #  if !@HAVE_SETENV@
520 _GL_FUNCDECL_SYS (setenv, int,
521                   (const char *name, const char *value, int replace)
522                   _GL_ARG_NONNULL ((1)));
523 #  endif
524 _GL_CXXALIAS_SYS (setenv, int,
525                   (const char *name, const char *value, int replace));
526 # endif
527 _GL_CXXALIASWARN (setenv);
528 #elif defined GNULIB_POSIXCHECK
529 # undef setenv
530 # if HAVE_RAW_DECL_SETENV
531 _GL_WARN_ON_USE (setenv, "setenv is unportable - "
532                  "use gnulib module setenv for portability");
533 # endif
534 #endif
535
536 #if @GNULIB_STRTOD@
537  /* Parse a double from STRING, updating ENDP if appropriate.  */
538 # if @REPLACE_STRTOD@
539 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
540 #   define strtod rpl_strtod
541 #  endif
542 _GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
543                                   _GL_ARG_NONNULL ((1)));
544 _GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
545 # else
546 #  if !@HAVE_STRTOD@
547 _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
548                                   _GL_ARG_NONNULL ((1)));
549 #  endif
550 _GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
551 # endif
552 _GL_CXXALIASWARN (strtod);
553 #elif defined GNULIB_POSIXCHECK
554 # undef strtod
555 # if HAVE_RAW_DECL_STRTOD
556 _GL_WARN_ON_USE (strtod, "strtod is unportable - "
557                  "use gnulib module strtod for portability");
558 # endif
559 #endif
560
561 #if @GNULIB_STRTOLL@
562 /* Parse a signed integer whose textual representation starts at STRING.
563    The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
564    it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
565    "0x").
566    If ENDPTR is not NULL, the address of the first byte after the integer is
567    stored in *ENDPTR.
568    Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
569    to ERANGE.  */
570 # if !@HAVE_STRTOLL@
571 _GL_FUNCDECL_SYS (strtoll, long long,
572                   (const char *string, char **endptr, int base)
573                   _GL_ARG_NONNULL ((1)));
574 # endif
575 _GL_CXXALIAS_SYS (strtoll, long long,
576                   (const char *string, char **endptr, int base));
577 _GL_CXXALIASWARN (strtoll);
578 #elif defined GNULIB_POSIXCHECK
579 # undef strtoll
580 # if HAVE_RAW_DECL_STRTOLL
581 _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
582                  "use gnulib module strtoll for portability");
583 # endif
584 #endif
585
586 #if @GNULIB_STRTOULL@
587 /* Parse an unsigned integer whose textual representation starts at STRING.
588    The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
589    it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
590    "0x").
591    If ENDPTR is not NULL, the address of the first byte after the integer is
592    stored in *ENDPTR.
593    Upon overflow, the return value is ULLONG_MAX, and errno is set to
594    ERANGE.  */
595 # if !@HAVE_STRTOULL@
596 _GL_FUNCDECL_SYS (strtoull, unsigned long long,
597                   (const char *string, char **endptr, int base)
598                   _GL_ARG_NONNULL ((1)));
599 # endif
600 _GL_CXXALIAS_SYS (strtoull, unsigned long long,
601                   (const char *string, char **endptr, int base));
602 _GL_CXXALIASWARN (strtoull);
603 #elif defined GNULIB_POSIXCHECK
604 # undef strtoull
605 # if HAVE_RAW_DECL_STRTOULL
606 _GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
607                  "use gnulib module strtoull for portability");
608 # endif
609 #endif
610
611 #if @GNULIB_UNSETENV@
612 /* Remove the variable NAME from the environment.  */
613 # if @REPLACE_UNSETENV@
614 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
615 #   undef unsetenv
616 #   define unsetenv rpl_unsetenv
617 #  endif
618 _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
619 _GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
620 # else
621 #  if !@HAVE_UNSETENV@
622 _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
623 #  endif
624 _GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
625 # endif
626 _GL_CXXALIASWARN (unsetenv);
627 #elif defined GNULIB_POSIXCHECK
628 # undef unsetenv
629 # if HAVE_RAW_DECL_UNSETENV
630 _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
631                  "use gnulib module unsetenv for portability");
632 # endif
633 #endif
634
635
636 #endif /* _GL_STDLIB_H */
637 #endif /* _GL_STDLIB_H */
638 #endif