1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* A GNU-like <stdlib.h>.
5 Copyright (C) 1995, 2001-2004, 2006-2010 Free Software Foundation, Inc.
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.
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.
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/>. */
21 @PRAGMA_SYSTEM_HEADER@
25 #if defined __need_malloc_and_calloc
26 /* Special invocation convention inside glibc header files. */
28 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
31 /* Normal invocation convention. */
35 /* The include_next requires a split double-inclusion guard. */
36 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
41 /* NetBSD 5.0 mis-defines NULL. */
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>
49 /* Solaris declares getloadavg() in <sys/loadavg.h>. */
50 #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
51 # include <sys/loadavg.h>
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. */
60 #if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \
61 || defined GNULIB_POSIXCHECK
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
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. */
79 # define GNULIB_defined_struct_random_data 1
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. */
91 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
92 # define __attribute__(Spec) /* empty */
96 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
98 /* The definition of _GL_ARG_NONNULL is copied here. */
100 /* The definition of _GL_WARN_ON_USE is copied here. */
103 /* Some systems do not define EXIT_*, despite otherwise supporting C89. */
105 # define EXIT_SUCCESS 0
107 /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
108 with proper operation of xargs. */
110 # define EXIT_FAILURE 1
111 #elif EXIT_FAILURE != 1
113 # define EXIT_FAILURE 1
118 /* Terminate the current process with the given return code, without running
119 the 'atexit' handlers. */
121 _GL_FUNCDECL_SYS (_Exit, void, (int status) __attribute__ ((__noreturn__)));
123 _GL_CXXALIAS_SYS (_Exit, void, (int status));
124 _GL_CXXALIASWARN (_Exit);
125 #elif defined GNULIB_POSIXCHECK
127 # if HAVE_RAW_DECL__EXIT
128 _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
129 "use gnulib module _Exit for portability");
135 /* Parse a signed decimal integer.
136 Returns the value of the integer. Errors are not detected. */
138 _GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1)));
140 _GL_CXXALIAS_SYS (atoll, long long, (const char *string));
141 _GL_CXXALIASWARN (atoll);
142 #elif defined GNULIB_POSIXCHECK
144 # if HAVE_RAW_DECL_ATOLL
145 _GL_WARN_ON_USE (atoll, "atoll is unportable - "
146 "use gnulib module atoll for portability");
150 #if @GNULIB_CALLOC_POSIX@
151 # if @REPLACE_CALLOC@
152 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
154 # define calloc rpl_calloc
156 _GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size));
157 _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
159 _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
161 _GL_CXXALIASWARN (calloc);
162 #elif defined GNULIB_POSIXCHECK
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");
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
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));
178 # if !@HAVE_CANONICALIZE_FILE_NAME@
179 _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
180 _GL_ARG_NONNULL ((1)));
182 _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
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");
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)));
203 _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
204 _GL_CXXALIASWARN (getloadavg);
205 #elif defined GNULIB_POSIXCHECK
207 # if HAVE_RAW_DECL_GETLOADAVG
208 _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
209 "use gnulib module getloadavg for portability");
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)));
230 _GL_CXXALIAS_SYS (getsubopt, int,
231 (char **optionp, char *const *tokens, char **valuep));
232 _GL_CXXALIASWARN (getsubopt);
233 #elif defined GNULIB_POSIXCHECK
235 # if HAVE_RAW_DECL_GETSUBOPT
236 _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
237 "use gnulib module getsubopt for portability");
242 /* Change the ownership and access permission of the slave side of the
243 pseudo-terminal whose master side is specified by FD. */
245 _GL_FUNCDECL_SYS (grantpt, int, (int fd));
247 _GL_CXXALIAS_SYS (grantpt, int, (int fd));
248 _GL_CXXALIASWARN (grantpt);
249 #elif defined GNULIB_POSIXCHECK
251 # if HAVE_RAW_DECL_GRANTPT
252 _GL_WARN_ON_USE (ptsname, "grantpt is not portable - "
253 "use gnulib module grantpt for portability");
257 #if @GNULIB_MALLOC_POSIX@
258 # if @REPLACE_MALLOC@
259 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
261 # define malloc rpl_malloc
263 _GL_FUNCDECL_RPL (malloc, void *, (size_t size));
264 _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
266 _GL_CXXALIAS_SYS (malloc, void *, (size_t size));
268 _GL_CXXALIASWARN (malloc);
269 #elif defined GNULIB_POSIXCHECK
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");
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. */
283 _GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1)));
285 _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/));
286 _GL_CXXALIASWARN (mkdtemp);
287 #elif defined GNULIB_POSIXCHECK
289 # if HAVE_RAW_DECL_MKDTEMP
290 _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
291 "use gnulib module mkdtemp for portability");
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
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
306 Returns the open file descriptor if successful, otherwise -1 and errno
308 # if !@HAVE_MKOSTEMP@
309 _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
310 _GL_ARG_NONNULL ((1)));
312 _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
313 _GL_CXXALIASWARN (mkostemp);
314 #elif defined GNULIB_POSIXCHECK
316 # if HAVE_RAW_DECL_MKOSTEMP
317 _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
318 "use gnulib module mkostemp for portability");
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
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
334 Returns the open file descriptor if successful, otherwise -1 and errno
336 # if !@HAVE_MKOSTEMPS@
337 _GL_FUNCDECL_SYS (mkostemps, int,
338 (char * /*template*/, int /*suffixlen*/, int /*flags*/)
339 _GL_ARG_NONNULL ((1)));
341 _GL_CXXALIAS_SYS (mkostemps, int,
342 (char * /*template*/, int /*suffixlen*/, int /*flags*/));
343 _GL_CXXALIASWARN (mkostemps);
344 #elif defined GNULIB_POSIXCHECK
346 # if HAVE_RAW_DECL_MKOSTEMPS
347 _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
348 "use gnulib module mkostemps for portability");
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
360 Returns the open file descriptor if successful, otherwise -1 and errno
362 # if @REPLACE_MKSTEMP@
363 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
364 # define mkstemp rpl_mkstemp
366 _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
367 _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/));
369 # if ! @HAVE_MKSTEMP@
370 _GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
372 _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/));
374 _GL_CXXALIASWARN (mkstemp);
375 #elif defined GNULIB_POSIXCHECK
377 # if HAVE_RAW_DECL_MKSTEMP
378 _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
379 "use gnulib module mkstemp for portability");
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
392 Returns the open file descriptor if successful, otherwise -1 and errno
394 # if !@HAVE_MKSTEMPS@
395 _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)
396 _GL_ARG_NONNULL ((1)));
398 _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/));
399 _GL_CXXALIASWARN (mkstemps);
400 #elif defined GNULIB_POSIXCHECK
402 # if HAVE_RAW_DECL_MKSTEMPS
403 _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
404 "use gnulib module mkstemps for portability");
409 /* Return the pathname of the pseudo-terminal slave associated with
410 the master FD is open on, or NULL on errors. */
412 _GL_FUNCDECL_SYS (ptsname, char *, (int fd));
414 _GL_CXXALIAS_SYS (ptsname, char *, (int fd));
415 _GL_CXXALIASWARN (ptsname);
416 #elif defined GNULIB_POSIXCHECK
418 # if HAVE_RAW_DECL_PTSNAME
419 _GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
420 "use gnulib module ptsname for portability");
425 # if @REPLACE_PUTENV@
426 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
428 # define putenv rpl_putenv
430 _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
431 _GL_CXXALIAS_RPL (putenv, int, (char *string));
433 _GL_CXXALIAS_SYS (putenv, int, (char *string));
435 _GL_CXXALIASWARN (putenv);
439 #if @GNULIB_RANDOM_R@
440 # if !@HAVE_RANDOM_R@
442 # define RAND_MAX 2147483647
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)));
452 _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
453 _GL_CXXALIASWARN (random_r);
454 #elif defined GNULIB_POSIXCHECK
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");
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)));
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
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");
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)));
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
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");
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)));
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
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");
516 #if @GNULIB_REALLOC_POSIX@
517 # if @REPLACE_REALLOC@
518 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
520 # define realloc rpl_realloc
522 _GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size));
523 _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
525 _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
527 _GL_CXXALIASWARN (realloc);
528 #elif defined GNULIB_POSIXCHECK
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");
535 #if @GNULIB_REALPATH@
536 # if @REPLACE_REALPATH@
537 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
538 # define realpath rpl_realpath
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));
544 # if !@HAVE_REALPATH@
545 _GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
546 _GL_ARG_NONNULL ((1)));
548 _GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
550 _GL_CXXALIASWARN (realpath);
551 #elif defined GNULIB_POSIXCHECK
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");
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. */
563 _GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1)));
565 _GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
566 _GL_CXXALIASWARN (rpmatch);
567 #elif defined GNULIB_POSIXCHECK
569 # if HAVE_RAW_DECL_RPMATCH
570 _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
571 "use gnulib module rpmatch for portability");
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)
581 # define setenv rpl_setenv
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));
590 _GL_FUNCDECL_SYS (setenv, int,
591 (const char *name, const char *value, int replace)
592 _GL_ARG_NONNULL ((1)));
594 _GL_CXXALIAS_SYS (setenv, int,
595 (const char *name, const char *value, int replace));
597 _GL_CXXALIASWARN (setenv);
598 #elif defined GNULIB_POSIXCHECK
600 # if HAVE_RAW_DECL_SETENV
601 _GL_WARN_ON_USE (setenv, "setenv is unportable - "
602 "use gnulib module setenv for portability");
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
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));
617 _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
618 _GL_ARG_NONNULL ((1)));
620 _GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
622 _GL_CXXALIASWARN (strtod);
623 #elif defined GNULIB_POSIXCHECK
625 # if HAVE_RAW_DECL_STRTOD
626 _GL_WARN_ON_USE (strtod, "strtod is unportable - "
627 "use gnulib module strtod for portability");
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
636 If ENDPTR is not NULL, the address of the first byte after the integer is
638 Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
641 _GL_FUNCDECL_SYS (strtoll, long long,
642 (const char *string, char **endptr, int base)
643 _GL_ARG_NONNULL ((1)));
645 _GL_CXXALIAS_SYS (strtoll, long long,
646 (const char *string, char **endptr, int base));
647 _GL_CXXALIASWARN (strtoll);
648 #elif defined GNULIB_POSIXCHECK
650 # if HAVE_RAW_DECL_STRTOLL
651 _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
652 "use gnulib module strtoll for portability");
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
661 If ENDPTR is not NULL, the address of the first byte after the integer is
663 Upon overflow, the return value is ULLONG_MAX, and errno is set to
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)));
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
675 # if HAVE_RAW_DECL_STRTOULL
676 _GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
677 "use gnulib module strtoull for portability");
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));
687 _GL_CXXALIAS_SYS (unlockpt, int, (int fd));
688 _GL_CXXALIASWARN (unlockpt);
689 #elif defined GNULIB_POSIXCHECK
691 # if HAVE_RAW_DECL_UNLOCKPT
692 _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - "
693 "use gnulib module unlockpt for portability");
697 #if @GNULIB_UNSETENV@
698 /* Remove the variable NAME from the environment. */
699 # if @REPLACE_UNSETENV@
700 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
702 # define unsetenv rpl_unsetenv
704 _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
705 _GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
707 # if !@HAVE_UNSETENV@
708 _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
710 _GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
712 _GL_CXXALIASWARN (unsetenv);
713 #elif defined GNULIB_POSIXCHECK
715 # if HAVE_RAW_DECL_UNSETENV
716 _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
717 "use gnulib module unsetenv for portability");
722 #endif /* _GL_STDLIB_H */
723 #endif /* _GL_STDLIB_H */