diff options
Diffstat (limited to 'gl/stdlib.in.h')
| -rw-r--r-- | gl/stdlib.in.h | 84 |
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 |
