19 @PRAGMA_SYSTEM_HEADER@
23 #if defined __need_malloc_and_calloc
26 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
31 #ifndef _@GUARD_PREFIX@_STDLIB_H
34 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
36 #ifndef _@GUARD_PREFIX@_STDLIB_H
37 #define _@GUARD_PREFIX@_STDLIB_H
43 #if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS
44 # include <sys/wait.h>
48 #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
49 # include <sys/loadavg.h>
61 # if !@HAVE_STRUCT_RANDOM_DATA@ || !@HAVE_RANDOM_R@
65 # if !@HAVE_STRUCT_RANDOM_DATA@
68 # if !GNULIB_defined_struct_random_data
79 # define GNULIB_defined_struct_random_data 1
84 #if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
103 # define EXIT_SUCCESS 0
108 # define EXIT_FAILURE 1
109 #elif EXIT_FAILURE != 1
111 # define EXIT_FAILURE 1
123 #elif defined GNULIB_POSIXCHECK
125 # if HAVE_RAW_DECL__EXIT
127 "use gnulib module _Exit for portability");
140 #elif defined GNULIB_POSIXCHECK
142 # if HAVE_RAW_DECL_ATOLL
144 "use gnulib module atoll for portability");
148 #if @GNULIB_CALLOC_POSIX@
149 # if @REPLACE_CALLOC@
150 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
152 # define calloc rpl_calloc
160 #elif defined GNULIB_POSIXCHECK
164 "use gnulib module calloc-posix for portability");
167 #if @GNULIB_CANONICALIZE_FILE_NAME@
168 # if @REPLACE_CANONICALIZE_FILE_NAME@
169 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
170 # define canonicalize_file_name rpl_canonicalize_file_name
176 # if !@HAVE_CANONICALIZE_FILE_NAME@
183 #elif defined GNULIB_POSIXCHECK
184 # undef canonicalize_file_name
185 # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
187 "canonicalize_file_name is unportable - "
188 "use gnulib module canonicalize-lgpl for portability");
192 #if @GNULIB_GETLOADAVG@
197 # if !@HAVE_DECL_GETLOADAVG@
203 #elif defined GNULIB_POSIXCHECK
205 # if HAVE_RAW_DECL_GETLOADAVG
207 "use gnulib module getloadavg for portability");
211 #if @GNULIB_GETSUBOPT@
223 # if !@HAVE_GETSUBOPT@
225 (
char **optionp,
char *
const *tokens,
char **valuep)
229 (
char **optionp,
char *
const *tokens,
char **valuep));
231 #elif defined GNULIB_POSIXCHECK
233 # if HAVE_RAW_DECL_GETSUBOPT
235 "use gnulib module getsubopt for portability");
247 #elif defined GNULIB_POSIXCHECK
249 # if HAVE_RAW_DECL_GRANTPT
251 "use gnulib module grantpt for portability");
259 #if @GNULIB_MALLOC_POSIX@
260 # if @REPLACE_MALLOC@
261 # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
262 || _GL_USE_STDLIB_ALLOC)
264 # define malloc rpl_malloc
272 #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
276 "use gnulib module malloc-posix for portability");
281 # if @REPLACE_MBTOWC@
282 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
284 # define mbtowc rpl_mbtowc
305 #elif defined GNULIB_POSIXCHECK
307 # if HAVE_RAW_DECL_MKDTEMP
309 "use gnulib module mkdtemp for portability");
313 #if @GNULIB_MKOSTEMP@
326 # if !@HAVE_MKOSTEMP@
332 #elif defined GNULIB_POSIXCHECK
334 # if HAVE_RAW_DECL_MKOSTEMP
336 "use gnulib module mkostemp for portability");
340 #if @GNULIB_MKOSTEMPS@
354 # if !@HAVE_MKOSTEMPS@
356 (
char * ,
int ,
int )
360 (
char * ,
int ,
int ));
362 #elif defined GNULIB_POSIXCHECK
364 # if HAVE_RAW_DECL_MKOSTEMPS
366 "use gnulib module mkostemps for portability");
380 # if @REPLACE_MKSTEMP@
381 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
382 # define mkstemp rpl_mkstemp
387 # if ! @HAVE_MKSTEMP@
393 #elif defined GNULIB_POSIXCHECK
395 # if HAVE_RAW_DECL_MKSTEMP
397 "use gnulib module mkstemp for portability");
401 #if @GNULIB_MKSTEMPS@
412 # if !@HAVE_MKSTEMPS@
418 #elif defined GNULIB_POSIXCHECK
420 # if HAVE_RAW_DECL_MKSTEMPS
422 "use gnulib module mkstemps for portability");
426 #if @GNULIB_POSIX_OPENPT@
429 # if !@HAVE_POSIX_OPENPT@
434 #elif defined GNULIB_POSIXCHECK
436 # if HAVE_RAW_DECL_POSIX_OPENPT
438 "use gnulib module posix_openpt for portability");
450 #elif defined GNULIB_POSIXCHECK
452 # if HAVE_RAW_DECL_PTSNAME
454 "use gnulib module ptsname for portability");
458 #if @GNULIB_PTSNAME_R@
462 # if @REPLACE_PTSNAME_R@
463 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
465 # define ptsname_r rpl_ptsname_r
470 # if !@HAVE_PTSNAME_R@
476 #elif defined GNULIB_POSIXCHECK
478 # if HAVE_RAW_DECL_PTSNAME_R
480 "use gnulib module ptsname_r for portability");
485 # if @REPLACE_PUTENV@
486 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
488 # define putenv rpl_putenv
499 #if @GNULIB_RANDOM_R@
500 # if !@HAVE_RANDOM_R@
502 # define RAND_MAX 2147483647
507 #if @GNULIB_RANDOM_R@
508 # if !@HAVE_RANDOM_R@
514 #elif defined GNULIB_POSIXCHECK
516 # if HAVE_RAW_DECL_RANDOM_R
518 "use gnulib module random_r for portability");
522 #if @GNULIB_RANDOM_R@
523 # if !@HAVE_RANDOM_R@
525 (
unsigned int seed,
struct random_data *rand_state)
529 (
unsigned int seed,
struct random_data *rand_state));
531 #elif defined GNULIB_POSIXCHECK
533 # if HAVE_RAW_DECL_SRANDOM_R
535 "use gnulib module random_r for portability");
539 #if @GNULIB_RANDOM_R@
540 # if !@HAVE_RANDOM_R@
542 (
unsigned int seed,
char *
buf,
size_t buf_size,
543 struct random_data *rand_state)
547 (
unsigned int seed,
char *
buf,
size_t buf_size,
548 struct random_data *rand_state));
550 #elif defined GNULIB_POSIXCHECK
552 # if HAVE_RAW_DECL_INITSTATE_R
554 "use gnulib module random_r for portability");
558 #if @GNULIB_RANDOM_R@
559 # if !@HAVE_RANDOM_R@
561 (
char *arg_state,
struct random_data *rand_state)
565 (
char *arg_state,
struct random_data *rand_state));
567 #elif defined GNULIB_POSIXCHECK
569 # if HAVE_RAW_DECL_SETSTATE_R
571 "use gnulib module random_r for portability");
576 #if @GNULIB_REALLOC_POSIX@
577 # if @REPLACE_REALLOC@
578 # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
579 || _GL_USE_STDLIB_ALLOC)
581 # define realloc rpl_realloc
589 #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
592 _GL_WARN_ON_USE (realloc,
"realloc is not POSIX compliant everywhere - "
593 "use gnulib module realloc-posix for portability");
596 #if @GNULIB_REALPATH@
597 # if @REPLACE_REALPATH@
598 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
599 # define realpath rpl_realpath
605 # if !@HAVE_REALPATH@
612 #elif defined GNULIB_POSIXCHECK
614 # if HAVE_RAW_DECL_REALPATH
615 _GL_WARN_ON_USE (realpath,
"realpath is unportable - use gnulib module "
616 "canonicalize or canonicalize-lgpl for portability");
628 #elif defined GNULIB_POSIXCHECK
630 # if HAVE_RAW_DECL_RPMATCH
632 "use gnulib module rpmatch for portability");
639 # if @REPLACE_SETENV@
640 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
642 # define setenv rpl_setenv
645 (
const char *name,
const char *
value,
int replace)
648 (
const char *name,
const char *
value,
int replace));
650 # if !@HAVE_DECL_SETENV@
652 (
const char *name,
const char *
value,
int replace)
656 (
const char *name,
const char *
value,
int replace));
658 # if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@)
661 #elif defined GNULIB_POSIXCHECK
663 # if HAVE_RAW_DECL_SETENV
665 "use gnulib module setenv for portability");
671 # if @REPLACE_STRTOD@
672 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
673 # define strtod rpl_strtod
686 #elif defined GNULIB_POSIXCHECK
688 # if HAVE_RAW_DECL_STRTOD
690 "use gnulib module strtod for portability");
705 (
const char *
string,
char **endptr,
int base)
709 (
const char *
string,
char **endptr,
int base));
711 #elif defined GNULIB_POSIXCHECK
713 # if HAVE_RAW_DECL_STRTOLL
715 "use gnulib module strtoll for portability");
719 #if @GNULIB_STRTOULL@
728 # if !@HAVE_STRTOULL@
730 (
const char *
string,
char **endptr,
int base)
734 (
const char *
string,
char **endptr,
int base));
736 #elif defined GNULIB_POSIXCHECK
738 # if HAVE_RAW_DECL_STRTOULL
740 "use gnulib module strtoull for portability");
744 #if @GNULIB_UNLOCKPT@
747 # if !@HAVE_UNLOCKPT@
752 #elif defined GNULIB_POSIXCHECK
754 # if HAVE_RAW_DECL_UNLOCKPT
756 "use gnulib module unlockpt for portability");
760 #if @GNULIB_UNSETENV@
762 # if @REPLACE_UNSETENV@
763 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
765 # define unsetenv rpl_unsetenv
770 # if !@HAVE_DECL_UNSETENV@
775 # if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@)
778 #elif defined GNULIB_POSIXCHECK
780 # if HAVE_RAW_DECL_UNSETENV
782 "use gnulib module unsetenv for portability");
788 # if @REPLACE_WCTOMB@
789 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
791 # 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.