19 @PRAGMA_SYSTEM_HEADER@
23 #if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
27 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
32 #ifndef _@GUARD_PREFIX@_STDLIB_H
35 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
37 #ifndef _@GUARD_PREFIX@_STDLIB_H
38 #define _@GUARD_PREFIX@_STDLIB_H
44 #if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS
45 # include <sys/wait.h>
49 #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
50 # include <sys/loadavg.h>
54 #if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
67 # if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@
71 # if !@HAVE_STRUCT_RANDOM_DATA@
74 # if !GNULIB_defined_struct_random_data
85 # define GNULIB_defined_struct_random_data 1
90 #if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
100 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
101 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
103 # define _GL_ATTRIBUTE_PURE
117 # define EXIT_SUCCESS 0
122 # define EXIT_FAILURE 1
123 #elif EXIT_FAILURE != 1
125 # define EXIT_FAILURE 1
137 #elif defined GNULIB_POSIXCHECK
139 # if HAVE_RAW_DECL__EXIT
141 "use gnulib module _Exit for portability");
156 #elif defined GNULIB_POSIXCHECK
158 # if HAVE_RAW_DECL_ATOLL
160 "use gnulib module atoll for portability");
164 #if @GNULIB_CALLOC_POSIX@
165 # if @REPLACE_CALLOC@
166 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
168 # define calloc rpl_calloc
176 #elif defined GNULIB_POSIXCHECK
180 "use gnulib module calloc-posix for portability");
183 #if @GNULIB_CANONICALIZE_FILE_NAME@
184 # if @REPLACE_CANONICALIZE_FILE_NAME@
185 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
186 # define canonicalize_file_name rpl_canonicalize_file_name
192 # if !@HAVE_CANONICALIZE_FILE_NAME@
199 #elif defined GNULIB_POSIXCHECK
200 # undef canonicalize_file_name
201 # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
203 "canonicalize_file_name is unportable - "
204 "use gnulib module canonicalize-lgpl for portability");
208 #if @GNULIB_GETLOADAVG@
213 # if !@HAVE_DECL_GETLOADAVG@
219 #elif defined GNULIB_POSIXCHECK
221 # if HAVE_RAW_DECL_GETLOADAVG
223 "use gnulib module getloadavg for portability");
227 #if @GNULIB_GETSUBOPT@
239 # if !@HAVE_GETSUBOPT@
241 (
char **optionp,
char *
const *tokens,
char **valuep)
245 (
char **optionp,
char *
const *tokens,
char **valuep));
247 #elif defined GNULIB_POSIXCHECK
249 # if HAVE_RAW_DECL_GETSUBOPT
251 "use gnulib module getsubopt for portability");
263 #elif defined GNULIB_POSIXCHECK
265 # if HAVE_RAW_DECL_GRANTPT
267 "use gnulib module grantpt for portability");
275 #if @GNULIB_MALLOC_POSIX@
276 # if @REPLACE_MALLOC@
277 # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
278 || _GL_USE_STDLIB_ALLOC)
280 # define malloc rpl_malloc
288 #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
292 "use gnulib module malloc-posix for portability");
297 # if @REPLACE_MBTOWC@
298 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
300 # define mbtowc rpl_mbtowc
321 #elif defined GNULIB_POSIXCHECK
323 # if HAVE_RAW_DECL_MKDTEMP
325 "use gnulib module mkdtemp for portability");
329 #if @GNULIB_MKOSTEMP@
342 # if !@HAVE_MKOSTEMP@
348 #elif defined GNULIB_POSIXCHECK
350 # if HAVE_RAW_DECL_MKOSTEMP
352 "use gnulib module mkostemp for portability");
356 #if @GNULIB_MKOSTEMPS@
370 # if !@HAVE_MKOSTEMPS@
372 (
char * ,
int ,
int )
376 (
char * ,
int ,
int ));
378 #elif defined GNULIB_POSIXCHECK
380 # if HAVE_RAW_DECL_MKOSTEMPS
382 "use gnulib module mkostemps for portability");
396 # if @REPLACE_MKSTEMP@
397 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
398 # define mkstemp rpl_mkstemp
403 # if ! @HAVE_MKSTEMP@
409 #elif defined GNULIB_POSIXCHECK
411 # if HAVE_RAW_DECL_MKSTEMP
413 "use gnulib module mkstemp for portability");
417 #if @GNULIB_MKSTEMPS@
428 # if !@HAVE_MKSTEMPS@
434 #elif defined GNULIB_POSIXCHECK
436 # if HAVE_RAW_DECL_MKSTEMPS
438 "use gnulib module mkstemps for portability");
442 #if @GNULIB_POSIX_OPENPT@
445 # if !@HAVE_POSIX_OPENPT@
450 #elif defined GNULIB_POSIXCHECK
452 # if HAVE_RAW_DECL_POSIX_OPENPT
454 "use gnulib module posix_openpt for portability");
461 # if @REPLACE_PTSNAME@
462 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
464 # define ptsname rpl_ptsname
475 #elif defined GNULIB_POSIXCHECK
477 # if HAVE_RAW_DECL_PTSNAME
479 "use gnulib module ptsname for portability");
483 #if @GNULIB_PTSNAME_R@
487 # if @REPLACE_PTSNAME_R@
488 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
490 # define ptsname_r rpl_ptsname_r
495 # if !@HAVE_PTSNAME_R@
501 #elif defined GNULIB_POSIXCHECK
503 # if HAVE_RAW_DECL_PTSNAME_R
505 "use gnulib module ptsname_r for portability");
510 # if @REPLACE_PUTENV@
511 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
513 # define putenv rpl_putenv
524 #if @GNULIB_RANDOM_R@
525 # if !@HAVE_RANDOM_R@
527 # define RAND_MAX 2147483647
539 #elif defined GNULIB_POSIXCHECK
541 # if HAVE_RAW_DECL_RANDOM
543 "use gnulib module random for portability");
553 #elif defined GNULIB_POSIXCHECK
555 # if HAVE_RAW_DECL_SRANDOM
557 "use gnulib module random for portability");
564 (
unsigned int seed,
char *
buf,
size_t buf_size)
568 (
unsigned int seed,
char *
buf,
size_t buf_size));
570 #elif defined GNULIB_POSIXCHECK
572 # if HAVE_RAW_DECL_INITSTATE_R
574 "use gnulib module random for portability");
584 #elif defined GNULIB_POSIXCHECK
586 # if HAVE_RAW_DECL_SETSTATE_R
588 "use gnulib module random for portability");
593 #if @GNULIB_RANDOM_R@
594 # if @REPLACE_RANDOM_R@
595 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
597 # define random_r rpl_random_r
603 # if !@HAVE_RANDOM_R@
610 #elif defined GNULIB_POSIXCHECK
612 # if HAVE_RAW_DECL_RANDOM_R
614 "use gnulib module random_r for portability");
618 #if @GNULIB_RANDOM_R@
619 # if @REPLACE_RANDOM_R@
620 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
622 # define srandom_r rpl_srandom_r
625 (
unsigned int seed,
struct random_data *rand_state)
628 (
unsigned int seed,
struct random_data *rand_state));
630 # if !@HAVE_RANDOM_R@
632 (
unsigned int seed,
struct random_data *rand_state)
636 (
unsigned int seed,
struct random_data *rand_state));
639 #elif defined GNULIB_POSIXCHECK
641 # if HAVE_RAW_DECL_SRANDOM_R
643 "use gnulib module random_r for portability");
647 #if @GNULIB_RANDOM_R@
648 # if @REPLACE_RANDOM_R@
649 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
651 # define initstate_r rpl_initstate_r
654 (
unsigned int seed,
char *
buf,
size_t buf_size,
655 struct random_data *rand_state)
658 (
unsigned int seed,
char *
buf,
size_t buf_size,
659 struct random_data *rand_state));
661 # if !@HAVE_RANDOM_R@
663 (
unsigned int seed,
char *
buf,
size_t buf_size,
664 struct random_data *rand_state)
668 (
unsigned int seed,
char *
buf,
size_t buf_size,
669 struct random_data *rand_state));
672 #elif defined GNULIB_POSIXCHECK
674 # if HAVE_RAW_DECL_INITSTATE_R
676 "use gnulib module random_r for portability");
680 #if @GNULIB_RANDOM_R@
681 # if @REPLACE_RANDOM_R@
682 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
684 # define setstate_r rpl_setstate_r
687 (
char *arg_state,
struct random_data *rand_state)
690 (
char *arg_state,
struct random_data *rand_state));
692 # if !@HAVE_RANDOM_R@
694 (
char *arg_state,
struct random_data *rand_state)
698 (
char *arg_state,
struct random_data *rand_state));
701 #elif defined GNULIB_POSIXCHECK
703 # if HAVE_RAW_DECL_SETSTATE_R
705 "use gnulib module random_r for portability");
710 #if @GNULIB_REALLOC_POSIX@
711 # if @REPLACE_REALLOC@
712 # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
713 || _GL_USE_STDLIB_ALLOC)
715 # define realloc rpl_realloc
723 #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
726 _GL_WARN_ON_USE (realloc,
"realloc is not POSIX compliant everywhere - "
727 "use gnulib module realloc-posix for portability");
730 #if @GNULIB_REALPATH@
731 # if @REPLACE_REALPATH@
732 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
733 # define realpath rpl_realpath
739 # if !@HAVE_REALPATH@
746 #elif defined GNULIB_POSIXCHECK
748 # if HAVE_RAW_DECL_REALPATH
749 _GL_WARN_ON_USE (realpath,
"realpath is unportable - use gnulib module "
750 "canonicalize or canonicalize-lgpl for portability");
762 #elif defined GNULIB_POSIXCHECK
764 # if HAVE_RAW_DECL_RPMATCH
766 "use gnulib module rpmatch for portability");
770 #if @GNULIB_SECURE_GETENV@
772 # if !@HAVE_SECURE_GETENV@
778 #elif defined GNULIB_POSIXCHECK
779 # undef secure_getenv
780 # if HAVE_RAW_DECL_SECURE_GETENV
782 "use gnulib module secure_getenv for portability");
789 # if @REPLACE_SETENV@
790 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
792 # define setenv rpl_setenv
795 (
const char *name,
const char *
value,
int replace)
798 (
const char *name,
const char *
value,
int replace));
800 # if !@HAVE_DECL_SETENV@
802 (
const char *name,
const char *
value,
int replace)
806 (
const char *name,
const char *
value,
int replace));
808 # if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@)
811 #elif defined GNULIB_POSIXCHECK
813 # if HAVE_RAW_DECL_SETENV
815 "use gnulib module setenv for portability");
821 # if @REPLACE_STRTOD@
822 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
823 # define strtod rpl_strtod
836 #elif defined GNULIB_POSIXCHECK
838 # if HAVE_RAW_DECL_STRTOD
840 "use gnulib module strtod for portability");
855 (
const char *
string,
char **endptr,
int base)
859 (
const char *
string,
char **endptr,
int base));
861 #elif defined GNULIB_POSIXCHECK
863 # if HAVE_RAW_DECL_STRTOLL
865 "use gnulib module strtoll for portability");
869 #if @GNULIB_STRTOULL@
878 # if !@HAVE_STRTOULL@
880 (
const char *
string,
char **endptr,
int base)
884 (
const char *
string,
char **endptr,
int base));
886 #elif defined GNULIB_POSIXCHECK
888 # if HAVE_RAW_DECL_STRTOULL
890 "use gnulib module strtoull for portability");
894 #if @GNULIB_UNLOCKPT@
897 # if !@HAVE_UNLOCKPT@
902 #elif defined GNULIB_POSIXCHECK
904 # if HAVE_RAW_DECL_UNLOCKPT
906 "use gnulib module unlockpt for portability");
910 #if @GNULIB_UNSETENV@
912 # if @REPLACE_UNSETENV@
913 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
915 # define unsetenv rpl_unsetenv
920 # if !@HAVE_DECL_UNSETENV@
925 # if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@)
928 #elif defined GNULIB_POSIXCHECK
930 # if HAVE_RAW_DECL_UNSETENV
932 "use gnulib module unsetenv for portability");
938 # if @REPLACE_WCTOMB@
939 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
941 # define wctomb rpl_wctomb
bdt base
Current expression.
static int wc
FI: Provisional management of warnings.
#define _GL_ARG_NONNULL(params)
A C macro for declaring that specific arguments must not be NULL.
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
_GL_CXXALIAS_RPL (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that...
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
_GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); declares a replacement function,...
#define _GL_CXXALIASWARN(func)
_GL_CXXALIASWARN (func); causes a warning to be emitted when ::func is used but not when GNULIB_NAMES...
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
_GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that...
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
_GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); declares the system function,...
#define _GL_WARN_ON_USE(function, message)
A C macro for emitting warnings if a function is used.
#define _GL_ATTRIBUTE_PURE
NetBSD 5.0 mis-defines NULL.