From f6587ab7ca1ef3cc68b1c0ef6971022fff08bcee Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 26 Sep 2010 14:54:30 +0200 Subject: [PATCH] sys_wait: Implement WSTOPSIG. * lib/sys_wait.in.h (WSTOPSIG): New macro. Reported by Simon Josefsson. --- ChangeLog | 6 ++++++ lib/sys_wait.in.h | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 959a0afed6..f23c1c4fc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-09-26 Bruno Haible + + sys_wait: Implement WSTOPSIG. + * lib/sys_wait.in.h (WSTOPSIG): New macro. + Reported by Simon Josefsson. + 2010-09-26 Simon Josefsson stdlib, sys_wait: Avoid compilation error on mingw. diff --git a/lib/sys_wait.in.h b/lib/sys_wait.in.h index d30a3e6f25..0006112ead 100644 --- a/lib/sys_wait.in.h +++ b/lib/sys_wait.in.h @@ -61,6 +61,11 @@ # define WEXITSTATUS(x) (((x) >> 8) & 0xff) # endif +/* The stopping signal. Only to be accessed if WIFSTOPPED(x) is true. */ +# ifndef WSTOPSIG +# define WSTOPSIG(x) (((x) >> 8) & 0x7f) +# endif + /* True if the process dumped core. Not standardized by POSIX. */ # ifndef WCOREDUMP # define WCOREDUMP(x) ((x) & 0x80) @@ -98,6 +103,9 @@ extern "C" { # define WEXITSTATUS(x) (x) +/* There are no stopping signals. */ +# define WSTOPSIG(x) 0 + /* There are no core dumps. */ # define WCOREDUMP(x) 0 -- 2.30.2