The only change to sys/wait.h in POSIX 2024 is that WCOREDUMP is now standardized. I've pushed the two attached patches updating a source comment and adding a test for the definition that was missing.
Collin
>From 1cff0e266d469d149144456e2a745f4e40a01dab Mon Sep 17 00:00:00 2001 From: Collin Funk <collin.fu...@gmail.com> Date: Fri, 10 Jan 2025 11:27:29 -0800 Subject: [PATCH 1/2] sys_wait-h: Update comment. * lib/sys_wait.in.h (WCOREDUMP): Remove comment about this macro being non-standardized since it was added by POSIX.1-2024. --- ChangeLog | 6 ++++++ lib/sys_wait.in.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d33a584ad8..99f913f1e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-01-10 Collin Funk <collin.fu...@gmail.com> + + sys_wait-h: Update comment. + * lib/sys_wait.in.h (WCOREDUMP): Remove comment about this macro being + non-standardized since it was added by POSIX.1-2024. + 2025-01-10 Paul Eggert <egg...@cs.ucla.edu> doc: document some file system portability issues diff --git a/lib/sys_wait.in.h b/lib/sys_wait.in.h index 0a83ebc84c..b8c04cc92e 100644 --- a/lib/sys_wait.in.h +++ b/lib/sys_wait.in.h @@ -80,7 +80,7 @@ # define WSTOPSIG(x) (((x) >> 8) & 0x7f) # endif -/* True if the process dumped core. Not standardized by POSIX. */ +/* True if the process dumped core. */ # ifndef WCOREDUMP # define WCOREDUMP(x) ((x) & 0x80) # endif -- 2.47.1
>From 4668f758dc2ac3f0702e8f9c56a8e669ebcc5f13 Mon Sep 17 00:00:00 2001 From: Collin Funk <collin.fu...@gmail.com> Date: Fri, 10 Jan 2025 11:34:06 -0800 Subject: [PATCH 2/2] sys_wait-h tests: Check that WCOREDUMP is defined. * tests/test-sys_wait-h.h (test_sys_wait_macros): Check that WCOREDUMP is defined and can be used. --- ChangeLog | 4 ++++ tests/test-sys_wait-h.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 99f913f1e5..b655cbe3bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2025-01-10 Collin Funk <collin.fu...@gmail.com> + sys_wait-h tests: Check that WCOREDUMP is defined. + * tests/test-sys_wait-h.h (test_sys_wait_macros): Check that WCOREDUMP + is defined and can be used. + sys_wait-h: Update comment. * lib/sys_wait.in.h (WCOREDUMP): Remove comment about this macro being non-standardized since it was added by POSIX.1-2024. diff --git a/tests/test-sys_wait-h.h b/tests/test-sys_wait-h.h index 20701bd4c6..cb160d8d69 100644 --- a/tests/test-sys_wait-h.h +++ b/tests/test-sys_wait-h.h @@ -38,7 +38,7 @@ test_sys_wait_macros (void) if (!!WIFSIGNALED (i) + !!WIFEXITED (i) + !!WIFSTOPPED (i) != 1) return 1; } - i = WEXITSTATUS (i) + WSTOPSIG (i) + WTERMSIG (i); + i = WEXITSTATUS (i) + WSTOPSIG (i) + WTERMSIG (i) + WCOREDUMP (i); #if 0 switch (i) -- 2.47.1