]> Savannah Git Hosting - gnulib.git/commitdiff
stdlib-h: Define WCOREDUMP, as required by POSIX:2024.
authorBruno Haible <bruno@clisp.org>
Mon, 13 Jan 2025 09:04:04 +0000 (10:04 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Jan 2025 09:04:45 +0000 (10:04 +0100)
* lib/stdlib.in.h: Include <sys/wait.h> also when WCOREDUMP is not
defined.
* doc/posix-headers/stdlib.texi: Document the glibc bug.

ChangeLog
doc/posix-headers/stdlib.texi
lib/stdlib.in.h

index b884aa202c64f1765e2720dab11cb266742c1885..bf54cbd8368db3aec7a9833223129108ca2a913c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-01-13  Bruno Haible  <bruno@clisp.org>
+
+       stdlib-h: Define WCOREDUMP, as required by POSIX:2024.
+       * lib/stdlib.in.h: Include <sys/wait.h> also when WCOREDUMP is not
+       defined.
+       * doc/posix-headers/stdlib.texi: Document the glibc bug.
+
 2025-01-12  Collin Funk  <collin.funk1@gmail.com>
 
        crc: Respect Automake's silent-rules.
index 6c62771c13837b510a4c189baca04a0d7959b42a..ee7ab194496bffa92c15ee0d7ee06ca1d95b5f4b 100644 (file)
@@ -33,6 +33,11 @@ The macros @code{WIFSIGNALED}, @code{WIFEXITED}, @code{WIFSTOPPED},
 @code{WSTOPSIG} are not defined in this header file (only in
 @code{<sys/wait.h>}) on some platforms:
 MirBSD 10.
+@item
+The macro @code{WCOREDUMP} is not defined in this header file (only in
+@code{<sys/wait.h>}) on some platforms:
+@c https://sourceware.org/bugzilla/show_bug.cgi?id=32551
+glibc 2.40.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index f8e2a6ce344ec111da57898256717ada6ecc6ef9..bd82086ff37862ec832d1c86c353b8ecdada1811 100644 (file)
@@ -62,8 +62,9 @@
 /* NetBSD 5.0 mis-defines NULL.  */
 #include <stddef.h>
 
-/* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>.  */
-#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS
+/* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>.
+   glibc 2.40 defines WCOREDUMP in <sys/wait.h>, not in <stdlib.h>.  */
+#if @GNULIB_SYSTEM_POSIX@ && !(defined WEXITSTATUS && defined WCOREDUMP)
 # include <sys/wait.h>
 #endif