summaryrefslogtreecommitdiffstats
path: root/gl/stdlib.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/stdlib.in.h')
-rw-r--r--gl/stdlib.in.h84
1 files changed, 21 insertions, 63 deletions
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index 1342db48..95237f2a 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -1,6 +1,6 @@
1/* A GNU-like <stdlib.h>. 1/* A GNU-like <stdlib.h>.
2 2
3 Copyright (C) 1995, 2001-2004, 2006-2025 Free Software Foundation, Inc. 3 Copyright (C) 1995, 2001-2004, 2006-2026 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -62,12 +62,6 @@
62/* NetBSD 5.0 mis-defines NULL. */ 62/* NetBSD 5.0 mis-defines NULL. */
63#include <stddef.h> 63#include <stddef.h>
64 64
65/* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>.
66 glibc 2.41 defines WCOREDUMP in <sys/wait.h>, not in <stdlib.h>. */
67#if @GNULIB_SYSTEM_POSIX@ && !(defined WEXITSTATUS && defined WCOREDUMP)
68# include <sys/wait.h>
69#endif
70
71/* Solaris declares getloadavg() in <sys/loadavg.h>. */ 65/* Solaris declares getloadavg() in <sys/loadavg.h>. */
72#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ 66#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
73/* OpenIndiana has a bug: <sys/time.h> must be included before 67/* OpenIndiana has a bug: <sys/time.h> must be included before
@@ -76,6 +70,11 @@
76# include <sys/loadavg.h> 70# include <sys/loadavg.h>
77#endif 71#endif
78 72
73/* QNX declares getprogname() in <sys/process.h>. */
74#if (@GNULIB_GETPROGNAME@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_PROCESS_H@
75# include <sys/process.h>
76#endif
77
79/* Native Windows platforms declare _mktemp() in <io.h>. */ 78/* Native Windows platforms declare _mktemp() in <io.h>. */
80#if defined _WIN32 && !defined __CYGWIN__ 79#if defined _WIN32 && !defined __CYGWIN__
81# include <io.h> 80# include <io.h>
@@ -83,13 +82,6 @@
83 82
84#if @GNULIB_RANDOM_R@ 83#if @GNULIB_RANDOM_R@
85 84
86/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
87 from <stdlib.h> if _REENTRANT is defined. Include it whenever we need
88 'struct random_data'. */
89# if @HAVE_RANDOM_H@
90# include <random.h>
91# endif
92
93# include <stdint.h> 85# include <stdint.h>
94 86
95# if !@HAVE_STRUCT_RANDOM_DATA@ 87# if !@HAVE_STRUCT_RANDOM_DATA@
@@ -237,9 +229,9 @@ _GL_INLINE_HEADER_BEGIN
237 229
238/* Declarations for ISO C N3322. */ 230/* Declarations for ISO C N3322. */
239#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ 231#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
240_GL_EXTERN_C void *bsearch (const void *__key, 232_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
241 const void *__base, size_t __nmemb, size_t __size, 233 (const void *__key, const void *__base, size_t __nmemb, size_t __size,
242 int (*__compare) (const void *, const void *)) 234 int (*__compare) (const void *, const void *))
243 _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); 235 _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
244_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, 236_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
245 int (*__compare) (const void *, const void *)) 237 int (*__compare) (const void *, const void *))
@@ -267,7 +259,6 @@ _GL_CXXALIAS_SYS (_Exit, void, (int status));
267_GL_CXXALIASWARN (_Exit); 259_GL_CXXALIASWARN (_Exit);
268# endif 260# endif
269#elif defined GNULIB_POSIXCHECK 261#elif defined GNULIB_POSIXCHECK
270# undef _Exit
271# if HAVE_RAW_DECL__EXIT 262# if HAVE_RAW_DECL__EXIT
272_GL_WARN_ON_USE (_Exit, "_Exit is unportable - " 263_GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
273 "use gnulib module _Exit for portability"); 264 "use gnulib module _Exit for portability");
@@ -314,7 +305,6 @@ _GL_CXXALIAS_SYS (free, void, (void *ptr));
314_GL_CXXALIASWARN (free); 305_GL_CXXALIASWARN (free);
315# endif 306# endif
316#elif defined GNULIB_POSIXCHECK 307#elif defined GNULIB_POSIXCHECK
317# undef free
318/* Assume free is always declared. */ 308/* Assume free is always declared. */
319_GL_WARN_ON_USE (free, "free is not POSIX:2024 compliant everywhere - " 309_GL_WARN_ON_USE (free, "free is not POSIX:2024 compliant everywhere - "
320 "use gnulib module free-posix for portability"); 310 "use gnulib module free-posix for portability");
@@ -372,7 +362,6 @@ _GL_FUNCDECL_SYS (aligned_alloc, void *,
372# endif 362# endif
373# endif 363# endif
374# if defined GNULIB_POSIXCHECK 364# if defined GNULIB_POSIXCHECK
375# undef aligned_alloc
376# if HAVE_RAW_DECL_ALIGNED_ALLOC 365# if HAVE_RAW_DECL_ALIGNED_ALLOC
377_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " 366_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - "
378 "use gnulib module aligned_alloc for portability"); 367 "use gnulib module aligned_alloc for portability");
@@ -392,7 +381,6 @@ _GL_FUNCDECL_SYS (atoll, long long,
392_GL_CXXALIAS_SYS (atoll, long long, (const char *string)); 381_GL_CXXALIAS_SYS (atoll, long long, (const char *string));
393_GL_CXXALIASWARN (atoll); 382_GL_CXXALIASWARN (atoll);
394#elif defined GNULIB_POSIXCHECK 383#elif defined GNULIB_POSIXCHECK
395# undef atoll
396# if HAVE_RAW_DECL_ATOLL 384# if HAVE_RAW_DECL_ATOLL
397_GL_WARN_ON_USE (atoll, "atoll is unportable - " 385_GL_WARN_ON_USE (atoll, "atoll is unportable - "
398 "use gnulib module atoll for portability"); 386 "use gnulib module atoll for portability");
@@ -449,7 +437,6 @@ _GL_FUNCDECL_SYS (calloc, void *,
449# endif 437# endif
450# endif 438# endif
451# if defined GNULIB_POSIXCHECK 439# if defined GNULIB_POSIXCHECK
452# undef calloc
453/* Assume calloc is always declared. */ 440/* Assume calloc is always declared. */
454_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " 441_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
455 "use gnulib module calloc-posix for portability"); 442 "use gnulib module calloc-posix for portability");
@@ -510,7 +497,6 @@ _GL_FUNCDECL_SYS (canonicalize_file_name, char *,
510# endif 497# endif
511# endif 498# endif
512# if defined GNULIB_POSIXCHECK 499# if defined GNULIB_POSIXCHECK
513# undef canonicalize_file_name
514# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME 500# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
515_GL_WARN_ON_USE (canonicalize_file_name, 501_GL_WARN_ON_USE (canonicalize_file_name,
516 "canonicalize_file_name is unportable - " 502 "canonicalize_file_name is unportable - "
@@ -610,7 +596,6 @@ _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
610_GL_CXXALIASWARN (getloadavg); 596_GL_CXXALIASWARN (getloadavg);
611# endif 597# endif
612#elif defined GNULIB_POSIXCHECK 598#elif defined GNULIB_POSIXCHECK
613# undef getloadavg
614# if HAVE_RAW_DECL_GETLOADAVG 599# if HAVE_RAW_DECL_GETLOADAVG
615_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " 600_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
616 "use gnulib module getloadavg for portability"); 601 "use gnulib module getloadavg for portability");
@@ -645,7 +630,6 @@ _GL_CXXALIAS_SYS (getprogname, const char *, (void));
645_GL_CXXALIASWARN (getprogname); 630_GL_CXXALIASWARN (getprogname);
646# endif 631# endif
647#elif defined GNULIB_POSIXCHECK 632#elif defined GNULIB_POSIXCHECK
648# undef getprogname
649# if HAVE_RAW_DECL_GETPROGNAME 633# if HAVE_RAW_DECL_GETPROGNAME
650_GL_WARN_ON_USE (getprogname, "getprogname is unportable - " 634_GL_WARN_ON_USE (getprogname, "getprogname is unportable - "
651 "use gnulib module getprogname for portability"); 635 "use gnulib module getprogname for portability");
@@ -687,7 +671,6 @@ _GL_CXXALIAS_SYS (getsubopt, int,
687_GL_CXXALIASWARN (getsubopt); 671_GL_CXXALIASWARN (getsubopt);
688# endif 672# endif
689#elif defined GNULIB_POSIXCHECK 673#elif defined GNULIB_POSIXCHECK
690# undef getsubopt
691# if HAVE_RAW_DECL_GETSUBOPT 674# if HAVE_RAW_DECL_GETSUBOPT
692_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " 675_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
693 "use gnulib module getsubopt for portability"); 676 "use gnulib module getsubopt for portability");
@@ -703,7 +686,6 @@ _GL_FUNCDECL_SYS (grantpt, int, (int fd), );
703_GL_CXXALIAS_SYS (grantpt, int, (int fd)); 686_GL_CXXALIAS_SYS (grantpt, int, (int fd));
704_GL_CXXALIASWARN (grantpt); 687_GL_CXXALIASWARN (grantpt);
705#elif defined GNULIB_POSIXCHECK 688#elif defined GNULIB_POSIXCHECK
706# undef grantpt
707# if HAVE_RAW_DECL_GRANTPT 689# if HAVE_RAW_DECL_GRANTPT
708_GL_WARN_ON_USE (grantpt, "grantpt is not portable - " 690_GL_WARN_ON_USE (grantpt, "grantpt is not portable - "
709 "use gnulib module grantpt for portability"); 691 "use gnulib module grantpt for portability");
@@ -764,7 +746,6 @@ _GL_FUNCDECL_SYS (malloc, void *,
764# endif 746# endif
765# endif 747# endif
766# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC 748# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
767# undef malloc
768/* Assume malloc is always declared. */ 749/* Assume malloc is always declared. */
769_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " 750_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
770 "use gnulib module malloc-posix for portability"); 751 "use gnulib module malloc-posix for portability");
@@ -815,7 +796,6 @@ _GL_CXXALIAS_SYS (mbstowcs, size_t,
815_GL_CXXALIASWARN (mbstowcs); 796_GL_CXXALIASWARN (mbstowcs);
816# endif 797# endif
817#elif defined GNULIB_POSIXCHECK 798#elif defined GNULIB_POSIXCHECK
818# undef mbstowcs
819# if HAVE_RAW_DECL_MBSTOWCS 799# if HAVE_RAW_DECL_MBSTOWCS
820_GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - " 800_GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - "
821 "use gnulib module mbstowcs for portability"); 801 "use gnulib module mbstowcs for portability");
@@ -845,7 +825,6 @@ _GL_CXXALIAS_SYS (mbtowc, int,
845_GL_CXXALIASWARN (mbtowc); 825_GL_CXXALIASWARN (mbtowc);
846# endif 826# endif
847#elif defined GNULIB_POSIXCHECK 827#elif defined GNULIB_POSIXCHECK
848# undef mbtowc
849# if HAVE_RAW_DECL_MBTOWC 828# if HAVE_RAW_DECL_MBTOWC
850_GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - " 829_GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - "
851 "use gnulib module mbtowc for portability"); 830 "use gnulib module mbtowc for portability");
@@ -866,7 +845,6 @@ _GL_FUNCDECL_SYS (mkdtemp, char *,
866_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); 845_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/));
867_GL_CXXALIASWARN (mkdtemp); 846_GL_CXXALIASWARN (mkdtemp);
868#elif defined GNULIB_POSIXCHECK 847#elif defined GNULIB_POSIXCHECK
869# undef mkdtemp
870# if HAVE_RAW_DECL_MKDTEMP 848# if HAVE_RAW_DECL_MKDTEMP
871_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " 849_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
872 "use gnulib module mkdtemp for portability"); 850 "use gnulib module mkdtemp for portability");
@@ -905,7 +883,6 @@ _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
905_GL_CXXALIASWARN (mkostemp); 883_GL_CXXALIASWARN (mkostemp);
906# endif 884# endif
907#elif defined GNULIB_POSIXCHECK 885#elif defined GNULIB_POSIXCHECK
908# undef mkostemp
909# if HAVE_RAW_DECL_MKOSTEMP 886# if HAVE_RAW_DECL_MKOSTEMP
910_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " 887_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
911 "use gnulib module mkostemp for portability"); 888 "use gnulib module mkostemp for portability");
@@ -949,7 +926,6 @@ _GL_CXXALIAS_SYS (mkostemps, int,
949_GL_CXXALIASWARN (mkostemps); 926_GL_CXXALIASWARN (mkostemps);
950# endif 927# endif
951#elif defined GNULIB_POSIXCHECK 928#elif defined GNULIB_POSIXCHECK
952# undef mkostemps
953# if HAVE_RAW_DECL_MKOSTEMPS 929# if HAVE_RAW_DECL_MKOSTEMPS
954_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " 930_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
955 "use gnulib module mkostemps for portability"); 931 "use gnulib module mkostemps for portability");
@@ -982,7 +958,6 @@ _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/));
982# endif 958# endif
983_GL_CXXALIASWARN (mkstemp); 959_GL_CXXALIASWARN (mkstemp);
984#elif defined GNULIB_POSIXCHECK 960#elif defined GNULIB_POSIXCHECK
985# undef mkstemp
986# if HAVE_RAW_DECL_MKSTEMP 961# if HAVE_RAW_DECL_MKSTEMP
987_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " 962_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
988 "use gnulib module mkstemp for portability"); 963 "use gnulib module mkstemp for portability");
@@ -1007,7 +982,6 @@ _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/),
1007_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); 982_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/));
1008_GL_CXXALIASWARN (mkstemps); 983_GL_CXXALIASWARN (mkstemps);
1009#elif defined GNULIB_POSIXCHECK 984#elif defined GNULIB_POSIXCHECK
1010# undef mkstemps
1011# if HAVE_RAW_DECL_MKSTEMPS 985# if HAVE_RAW_DECL_MKSTEMPS
1012_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " 986_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
1013 "use gnulib module mkstemps for portability"); 987 "use gnulib module mkstemps for portability");
@@ -1052,7 +1026,6 @@ _GL_CXXALIAS_SYS (posix_memalign, int,
1052_GL_CXXALIASWARN (posix_memalign); 1026_GL_CXXALIASWARN (posix_memalign);
1053# endif 1027# endif
1054#elif defined GNULIB_POSIXCHECK 1028#elif defined GNULIB_POSIXCHECK
1055# undef posix_memalign
1056# if HAVE_RAW_DECL_POSIX_MEMALIGN 1029# if HAVE_RAW_DECL_POSIX_MEMALIGN
1057_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - " 1030_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - "
1058 "use gnulib module posix_memalign for portability"); 1031 "use gnulib module posix_memalign for portability");
@@ -1079,7 +1052,6 @@ _GL_CXXALIAS_SYS (posix_openpt, int, (int flags));
1079_GL_CXXALIASWARN (posix_openpt); 1052_GL_CXXALIASWARN (posix_openpt);
1080# endif 1053# endif
1081#elif defined GNULIB_POSIXCHECK 1054#elif defined GNULIB_POSIXCHECK
1082# undef posix_openpt
1083# if HAVE_RAW_DECL_POSIX_OPENPT 1055# if HAVE_RAW_DECL_POSIX_OPENPT
1084_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " 1056_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - "
1085 "use gnulib module posix_openpt for portability"); 1057 "use gnulib module posix_openpt for portability");
@@ -1104,7 +1076,6 @@ _GL_CXXALIAS_SYS (ptsname, char *, (int fd));
1104# endif 1076# endif
1105_GL_CXXALIASWARN (ptsname); 1077_GL_CXXALIASWARN (ptsname);
1106#elif defined GNULIB_POSIXCHECK 1078#elif defined GNULIB_POSIXCHECK
1107# undef ptsname
1108# if HAVE_RAW_DECL_PTSNAME 1079# if HAVE_RAW_DECL_PTSNAME
1109_GL_WARN_ON_USE (ptsname, "ptsname is not portable - " 1080_GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
1110 "use gnulib module ptsname for portability"); 1081 "use gnulib module ptsname for portability");
@@ -1133,7 +1104,6 @@ _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
1133# endif 1104# endif
1134_GL_CXXALIASWARN (ptsname_r); 1105_GL_CXXALIASWARN (ptsname_r);
1135#elif defined GNULIB_POSIXCHECK 1106#elif defined GNULIB_POSIXCHECK
1136# undef ptsname_r
1137# if HAVE_RAW_DECL_PTSNAME_R 1107# if HAVE_RAW_DECL_PTSNAME_R
1138_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " 1108_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
1139 "use gnulib module ptsname_r for portability"); 1109 "use gnulib module ptsname_r for portability");
@@ -1227,7 +1197,6 @@ _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
1227_GL_CXXALIASWARN (qsort_r); 1197_GL_CXXALIASWARN (qsort_r);
1228# endif 1198# endif
1229#elif defined GNULIB_POSIXCHECK 1199#elif defined GNULIB_POSIXCHECK
1230# undef qsort_r
1231# if HAVE_RAW_DECL_QSORT_R 1200# if HAVE_RAW_DECL_QSORT_R
1232_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " 1201_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
1233 "use gnulib module qsort_r for portability"); 1202 "use gnulib module qsort_r for portability");
@@ -1279,7 +1248,6 @@ _GL_CXXALIAS_SYS_CAST (random, long, (void));
1279_GL_CXXALIASWARN (random); 1248_GL_CXXALIASWARN (random);
1280# endif 1249# endif
1281#elif defined GNULIB_POSIXCHECK 1250#elif defined GNULIB_POSIXCHECK
1282# undef random
1283# if HAVE_RAW_DECL_RANDOM 1251# if HAVE_RAW_DECL_RANDOM
1284_GL_WARN_ON_USE (random, "random is unportable - " 1252_GL_WARN_ON_USE (random, "random is unportable - "
1285 "use gnulib module random for portability"); 1253 "use gnulib module random for portability");
@@ -1306,7 +1274,6 @@ _GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed));
1306_GL_CXXALIASWARN (srandom); 1274_GL_CXXALIASWARN (srandom);
1307# endif 1275# endif
1308#elif defined GNULIB_POSIXCHECK 1276#elif defined GNULIB_POSIXCHECK
1309# undef srandom
1310# if HAVE_RAW_DECL_SRANDOM 1277# if HAVE_RAW_DECL_SRANDOM
1311_GL_WARN_ON_USE (srandom, "srandom is unportable - " 1278_GL_WARN_ON_USE (srandom, "srandom is unportable - "
1312 "use gnulib module random for portability"); 1279 "use gnulib module random for portability");
@@ -1339,7 +1306,6 @@ _GL_CXXALIAS_SYS_CAST (initstate, char *,
1339_GL_CXXALIASWARN (initstate); 1306_GL_CXXALIASWARN (initstate);
1340# endif 1307# endif
1341#elif defined GNULIB_POSIXCHECK 1308#elif defined GNULIB_POSIXCHECK
1342# undef initstate
1343# if HAVE_RAW_DECL_INITSTATE 1309# if HAVE_RAW_DECL_INITSTATE
1344_GL_WARN_ON_USE (initstate, "initstate is unportable - " 1310_GL_WARN_ON_USE (initstate, "initstate is unportable - "
1345 "use gnulib module random for portability"); 1311 "use gnulib module random for portability");
@@ -1366,7 +1332,6 @@ _GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state));
1366_GL_CXXALIASWARN (setstate); 1332_GL_CXXALIASWARN (setstate);
1367# endif 1333# endif
1368#elif defined GNULIB_POSIXCHECK 1334#elif defined GNULIB_POSIXCHECK
1369# undef setstate
1370# if HAVE_RAW_DECL_SETSTATE 1335# if HAVE_RAW_DECL_SETSTATE
1371_GL_WARN_ON_USE (setstate, "setstate is unportable - " 1336_GL_WARN_ON_USE (setstate, "setstate is unportable - "
1372 "use gnulib module random for portability"); 1337 "use gnulib module random for portability");
@@ -1392,7 +1357,6 @@ _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
1392# endif 1357# endif
1393_GL_CXXALIASWARN (random_r); 1358_GL_CXXALIASWARN (random_r);
1394#elif defined GNULIB_POSIXCHECK 1359#elif defined GNULIB_POSIXCHECK
1395# undef random_r
1396# if HAVE_RAW_DECL_RANDOM_R 1360# if HAVE_RAW_DECL_RANDOM_R
1397_GL_WARN_ON_USE (random_r, "random_r is unportable - " 1361_GL_WARN_ON_USE (random_r, "random_r is unportable - "
1398 "use gnulib module random_r for portability"); 1362 "use gnulib module random_r for portability");
@@ -1421,7 +1385,6 @@ _GL_CXXALIAS_SYS (srandom_r, int,
1421# endif 1385# endif
1422_GL_CXXALIASWARN (srandom_r); 1386_GL_CXXALIASWARN (srandom_r);
1423#elif defined GNULIB_POSIXCHECK 1387#elif defined GNULIB_POSIXCHECK
1424# undef srandom_r
1425# if HAVE_RAW_DECL_SRANDOM_R 1388# if HAVE_RAW_DECL_SRANDOM_R
1426_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " 1389_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
1427 "use gnulib module random_r for portability"); 1390 "use gnulib module random_r for portability");
@@ -1456,7 +1419,6 @@ _GL_CXXALIAS_SYS_CAST (initstate_r, int,
1456# endif 1419# endif
1457_GL_CXXALIASWARN (initstate_r); 1420_GL_CXXALIASWARN (initstate_r);
1458#elif defined GNULIB_POSIXCHECK 1421#elif defined GNULIB_POSIXCHECK
1459# undef initstate_r
1460# if HAVE_RAW_DECL_INITSTATE_R 1422# if HAVE_RAW_DECL_INITSTATE_R
1461_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " 1423_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
1462 "use gnulib module random_r for portability"); 1424 "use gnulib module random_r for portability");
@@ -1487,7 +1449,6 @@ _GL_CXXALIAS_SYS_CAST (setstate_r, int,
1487# endif 1449# endif
1488_GL_CXXALIASWARN (setstate_r); 1450_GL_CXXALIASWARN (setstate_r);
1489#elif defined GNULIB_POSIXCHECK 1451#elif defined GNULIB_POSIXCHECK
1490# undef setstate_r
1491# if HAVE_RAW_DECL_SETSTATE_R 1452# if HAVE_RAW_DECL_SETSTATE_R
1492_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " 1453_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
1493 "use gnulib module random_r for portability"); 1454 "use gnulib module random_r for portability");
@@ -1557,7 +1518,6 @@ _GL_FUNCDECL_SYS (realloc, void *,
1557# endif 1518# endif
1558# endif 1519# endif
1559# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC 1520# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
1560# undef realloc
1561/* Assume realloc is always declared. */ 1521/* Assume realloc is always declared. */
1562_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " 1522_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
1563 "use gnulib module realloc-posix for portability"); 1523 "use gnulib module realloc-posix for portability");
@@ -1589,7 +1549,6 @@ _GL_CXXALIAS_SYS (reallocarray, void *,
1589_GL_CXXALIASWARN (reallocarray); 1549_GL_CXXALIASWARN (reallocarray);
1590# endif 1550# endif
1591#elif defined GNULIB_POSIXCHECK 1551#elif defined GNULIB_POSIXCHECK
1592# undef reallocarray
1593# if HAVE_RAW_DECL_REALLOCARRAY 1552# if HAVE_RAW_DECL_REALLOCARRAY
1594_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - " 1553_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - "
1595 "use gnulib module reallocarray for portability"); 1554 "use gnulib module reallocarray for portability");
@@ -1617,7 +1576,6 @@ _GL_CXXALIAS_SYS (realpath, char *,
1617# endif 1576# endif
1618_GL_CXXALIASWARN (realpath); 1577_GL_CXXALIASWARN (realpath);
1619#elif defined GNULIB_POSIXCHECK 1578#elif defined GNULIB_POSIXCHECK
1620# undef realpath
1621# if HAVE_RAW_DECL_REALPATH 1579# if HAVE_RAW_DECL_REALPATH
1622_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " 1580_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
1623 "canonicalize or canonicalize-lgpl for portability"); 1581 "canonicalize or canonicalize-lgpl for portability");
@@ -1634,7 +1592,6 @@ _GL_FUNCDECL_SYS (rpmatch, int, (const char *response),
1634_GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); 1592_GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
1635_GL_CXXALIASWARN (rpmatch); 1593_GL_CXXALIASWARN (rpmatch);
1636#elif defined GNULIB_POSIXCHECK 1594#elif defined GNULIB_POSIXCHECK
1637# undef rpmatch
1638# if HAVE_RAW_DECL_RPMATCH 1595# if HAVE_RAW_DECL_RPMATCH
1639_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " 1596_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
1640 "use gnulib module rpmatch for portability"); 1597 "use gnulib module rpmatch for portability");
@@ -1651,7 +1608,6 @@ _GL_FUNCDECL_SYS (secure_getenv, char *,
1651_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name)); 1608_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
1652_GL_CXXALIASWARN (secure_getenv); 1609_GL_CXXALIASWARN (secure_getenv);
1653#elif defined GNULIB_POSIXCHECK 1610#elif defined GNULIB_POSIXCHECK
1654# undef secure_getenv
1655# if HAVE_RAW_DECL_SECURE_GETENV 1611# if HAVE_RAW_DECL_SECURE_GETENV
1656_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " 1612_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
1657 "use gnulib module secure_getenv for portability"); 1613 "use gnulib module secure_getenv for portability");
@@ -1684,7 +1640,6 @@ _GL_CXXALIAS_SYS (setenv, int,
1684_GL_CXXALIASWARN (setenv); 1640_GL_CXXALIASWARN (setenv);
1685# endif 1641# endif
1686#elif defined GNULIB_POSIXCHECK 1642#elif defined GNULIB_POSIXCHECK
1687# undef setenv
1688# if HAVE_RAW_DECL_SETENV 1643# if HAVE_RAW_DECL_SETENV
1689_GL_WARN_ON_USE (setenv, "setenv is unportable - " 1644_GL_WARN_ON_USE (setenv, "setenv is unportable - "
1690 "use gnulib module setenv for portability"); 1645 "use gnulib module setenv for portability");
@@ -1729,7 +1684,6 @@ _GL_CXXALIAS_SYS (strtod, double,
1729_GL_CXXALIASWARN (strtod); 1684_GL_CXXALIASWARN (strtod);
1730# endif 1685# endif
1731#elif defined GNULIB_POSIXCHECK 1686#elif defined GNULIB_POSIXCHECK
1732# undef strtod
1733# if HAVE_RAW_DECL_STRTOD 1687# if HAVE_RAW_DECL_STRTOD
1734_GL_WARN_ON_USE (strtod, "strtod is unportable - " 1688_GL_WARN_ON_USE (strtod, "strtod is unportable - "
1735 "use gnulib module strtod for portability"); 1689 "use gnulib module strtod for portability");
@@ -1761,7 +1715,6 @@ _GL_CXXALIAS_SYS (strtof, float,
1761_GL_CXXALIASWARN (strtof); 1715_GL_CXXALIASWARN (strtof);
1762# endif 1716# endif
1763#elif defined GNULIB_POSIXCHECK 1717#elif defined GNULIB_POSIXCHECK
1764# undef strtof
1765# if HAVE_RAW_DECL_STRTOF 1718# if HAVE_RAW_DECL_STRTOF
1766_GL_WARN_ON_USE (strtof, "strtof is unportable - " 1719_GL_WARN_ON_USE (strtof, "strtof is unportable - "
1767 "use gnulib module strtof for portability"); 1720 "use gnulib module strtof for portability");
@@ -1791,7 +1744,6 @@ _GL_CXXALIAS_SYS (strtold, long double,
1791# endif 1744# endif
1792_GL_CXXALIASWARN (strtold); 1745_GL_CXXALIASWARN (strtold);
1793#elif defined GNULIB_POSIXCHECK 1746#elif defined GNULIB_POSIXCHECK
1794# undef strtold
1795# if HAVE_RAW_DECL_STRTOLD 1747# if HAVE_RAW_DECL_STRTOLD
1796_GL_WARN_ON_USE (strtold, "strtold is unportable - " 1748_GL_WARN_ON_USE (strtold, "strtold is unportable - "
1797 "use gnulib module strtold for portability"); 1749 "use gnulib module strtold for portability");
@@ -1834,7 +1786,6 @@ _GL_CXXALIAS_SYS (strtol, long,
1834_GL_CXXALIASWARN (strtol); 1786_GL_CXXALIASWARN (strtol);
1835# endif 1787# endif
1836#elif defined GNULIB_POSIXCHECK 1788#elif defined GNULIB_POSIXCHECK
1837# undef strtol
1838# if HAVE_RAW_DECL_STRTOL 1789# if HAVE_RAW_DECL_STRTOL
1839_GL_WARN_ON_USE (strtol, "strtol is unportable - " 1790_GL_WARN_ON_USE (strtol, "strtol is unportable - "
1840 "use gnulib module strtol for portability"); 1791 "use gnulib module strtol for portability");
@@ -1875,7 +1826,6 @@ _GL_CXXALIAS_SYS (strtoll, long long,
1875# endif 1826# endif
1876_GL_CXXALIASWARN (strtoll); 1827_GL_CXXALIASWARN (strtoll);
1877#elif defined GNULIB_POSIXCHECK 1828#elif defined GNULIB_POSIXCHECK
1878# undef strtoll
1879# if HAVE_RAW_DECL_STRTOLL 1829# if HAVE_RAW_DECL_STRTOLL
1880_GL_WARN_ON_USE (strtoll, "strtoll is unportable - " 1830_GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
1881 "use gnulib module strtoll for portability"); 1831 "use gnulib module strtoll for portability");
@@ -1917,7 +1867,6 @@ _GL_CXXALIAS_SYS (strtoul, unsigned long,
1917_GL_CXXALIASWARN (strtoul); 1867_GL_CXXALIASWARN (strtoul);
1918# endif 1868# endif
1919#elif defined GNULIB_POSIXCHECK 1869#elif defined GNULIB_POSIXCHECK
1920# undef strtoul
1921# if HAVE_RAW_DECL_STRTOUL 1870# if HAVE_RAW_DECL_STRTOUL
1922_GL_WARN_ON_USE (strtoul, "strtoul is unportable - " 1871_GL_WARN_ON_USE (strtoul, "strtoul is unportable - "
1923 "use gnulib module strtoul for portability"); 1872 "use gnulib module strtoul for portability");
@@ -1958,7 +1907,6 @@ _GL_CXXALIAS_SYS (strtoull, unsigned long long,
1958# endif 1907# endif
1959_GL_CXXALIASWARN (strtoull); 1908_GL_CXXALIASWARN (strtoull);
1960#elif defined GNULIB_POSIXCHECK 1909#elif defined GNULIB_POSIXCHECK
1961# undef strtoull
1962# if HAVE_RAW_DECL_STRTOULL 1910# if HAVE_RAW_DECL_STRTOULL
1963_GL_WARN_ON_USE (strtoull, "strtoull is unportable - " 1911_GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
1964 "use gnulib module strtoull for portability"); 1912 "use gnulib module strtoull for portability");
@@ -1974,7 +1922,6 @@ _GL_FUNCDECL_SYS (unlockpt, int, (int fd), );
1974_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); 1922_GL_CXXALIAS_SYS (unlockpt, int, (int fd));
1975_GL_CXXALIASWARN (unlockpt); 1923_GL_CXXALIASWARN (unlockpt);
1976#elif defined GNULIB_POSIXCHECK 1924#elif defined GNULIB_POSIXCHECK
1977# undef unlockpt
1978# if HAVE_RAW_DECL_UNLOCKPT 1925# if HAVE_RAW_DECL_UNLOCKPT
1979_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " 1926_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - "
1980 "use gnulib module unlockpt for portability"); 1927 "use gnulib module unlockpt for portability");
@@ -2000,7 +1947,6 @@ _GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
2000_GL_CXXALIASWARN (unsetenv); 1947_GL_CXXALIASWARN (unsetenv);
2001# endif 1948# endif
2002#elif defined GNULIB_POSIXCHECK 1949#elif defined GNULIB_POSIXCHECK
2003# undef unsetenv
2004# if HAVE_RAW_DECL_UNSETENV 1950# if HAVE_RAW_DECL_UNSETENV
2005_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " 1951_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
2006 "use gnulib module unsetenv for portability"); 1952 "use gnulib module unsetenv for portability");
@@ -2027,6 +1973,18 @@ _GL_CXXALIASWARN (wctomb);
2027 1973
2028_GL_INLINE_HEADER_END 1974_GL_INLINE_HEADER_END
2029 1975
1976
1977/* Includes that provide only macros that don't need to be overridden.
1978 (Includes that are needed for type definitions and function declarations
1979 have their place above, before the function overrides.) */
1980
1981/* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>.
1982 glibc 2.41 defines WCOREDUMP in <sys/wait.h>, not in <stdlib.h>. */
1983#if @GNULIB_SYSTEM_POSIX@ && !(defined WEXITSTATUS && defined WCOREDUMP)
1984# include <sys/wait.h>
1985#endif
1986
1987
2030#endif /* _@GUARD_PREFIX@_STDLIB_H */ 1988#endif /* _@GUARD_PREFIX@_STDLIB_H */
2031#endif /* _@GUARD_PREFIX@_STDLIB_H */ 1989#endif /* _@GUARD_PREFIX@_STDLIB_H */
2032#endif 1990#endif