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