sys/wait.h: add WCOREDUMP as alternative to WIFCORED

As this is part of POSIX since 2024, WCOREDUMP is the new default name.
WIFCORED is retained under _DEFAULT_SOURCE.

Fixes #19735.

Change-Id: Ic3f65e47b436bae92fe82ef73c3094be6bc9f29d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9622
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Joachim Mairböck
2025-09-01 16:33:57 +00:00
committed by waddlesplash
parent 53930893f4
commit b54f586058
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -6,6 +6,7 @@
#define _SYS_WAIT_H
#include <features.h>
#include <sys/types.h>
#include <signal.h>
@@ -25,9 +26,14 @@
#define WTERMSIG(value) (((value) >> 8) & 0xff)
#define WIFSTOPPED(value) ((((value) >> 16) & 0xff) != 0)
#define WSTOPSIG(value) (((value) >> 16) & 0xff)
#define WIFCORED(value) ((value) & 0x10000)
#define WCOREDUMP(value) ((value) & 0x10000)
#define WIFCONTINUED(value) ((value) & 0x20000)
#ifdef _DEFAULT_SOURCE
/* non-standard macro for backwards compatibility */
#define WIFCORED(value) WCOREDUMP(value)
#endif
/* ID types for waitid() */
typedef enum {
P_ALL, /* wait for any children, ignore ID */