From 24b12bbab225f688a266e6e37ca044b194afb598 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sat, 23 Feb 2019 14:32:55 -0500 Subject: implement proper function-like macro --- src/sys/wait/WEXITSTATUS.c | 3 +-- src/sys/wait/WSTOPSIG.c | 3 +-- src/sys/wait/WTERMSIG.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/sys/wait/WEXITSTATUS.c b/src/sys/wait/WEXITSTATUS.c index f0fcafc6..4256e805 100644 --- a/src/sys/wait/WEXITSTATUS.c +++ b/src/sys/wait/WEXITSTATUS.c @@ -1,6 +1,5 @@ #include - -#define WEXITSTATUS 1 +#define WEXITSTATUS(__stat_val) (__stat_val & 0xff) /* POSIX(1) */ diff --git a/src/sys/wait/WSTOPSIG.c b/src/sys/wait/WSTOPSIG.c index 721179c8..467729e4 100644 --- a/src/sys/wait/WSTOPSIG.c +++ b/src/sys/wait/WSTOPSIG.c @@ -1,6 +1,5 @@ #include - -#define WSTOPSIG 6 +#define WSTOPSIG(__stat_val) (__stat_val & 0xff) /* POSIX(1) */ diff --git a/src/sys/wait/WTERMSIG.c b/src/sys/wait/WTERMSIG.c index 6d47fea2..d3990ec7 100644 --- a/src/sys/wait/WTERMSIG.c +++ b/src/sys/wait/WTERMSIG.c @@ -1,6 +1,5 @@ #include - -#define WTERMSIG 7 +#define WTERMSIG(__stat_val) (__stat_val & 0xff) /* POSIX(1) */ -- cgit v1.2.1