From: Bruno Haible Date: Mon, 13 Jan 2025 09:04:04 +0000 (+0100) Subject: stdlib-h: Define WCOREDUMP, as required by POSIX:2024. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=54636e00ee0fb69518b8eb3a111a6c566cc11bde;p=gnulib.git stdlib-h: Define WCOREDUMP, as required by POSIX:2024. * lib/stdlib.in.h: Include also when WCOREDUMP is not defined. * doc/posix-headers/stdlib.texi: Document the glibc bug. --- diff --git a/ChangeLog b/ChangeLog index b884aa202c..bf54cbd836 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-01-13 Bruno Haible + + stdlib-h: Define WCOREDUMP, as required by POSIX:2024. + * lib/stdlib.in.h: Include also when WCOREDUMP is not + defined. + * doc/posix-headers/stdlib.texi: Document the glibc bug. + 2025-01-12 Collin Funk crc: Respect Automake's silent-rules. diff --git a/doc/posix-headers/stdlib.texi b/doc/posix-headers/stdlib.texi index 6c62771c13..ee7ab19449 100644 --- a/doc/posix-headers/stdlib.texi +++ b/doc/posix-headers/stdlib.texi @@ -33,6 +33,11 @@ The macros @code{WIFSIGNALED}, @code{WIFEXITED}, @code{WIFSTOPPED}, @code{WSTOPSIG} are not defined in this header file (only in @code{}) on some platforms: MirBSD 10. +@item +The macro @code{WCOREDUMP} is not defined in this header file (only in +@code{}) on some platforms: +@c https://sourceware.org/bugzilla/show_bug.cgi?id=32551 +glibc 2.40. @end itemize Portability problems not fixed by Gnulib: diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index f8e2a6ce34..bd82086ff3 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -62,8 +62,9 @@ /* NetBSD 5.0 mis-defines NULL. */ #include -/* MirBSD 10 defines WEXITSTATUS in , not in . */ -#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS +/* MirBSD 10 defines WEXITSTATUS in , not in . + glibc 2.40 defines WCOREDUMP in , not in . */ +#if @GNULIB_SYSTEM_POSIX@ && !(defined WEXITSTATUS && defined WCOREDUMP) # include #endif