diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-02-23 14:32:55 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-02-23 14:32:55 -0500 |
commit | 24b12bbab225f688a266e6e37ca044b194afb598 (patch) | |
tree | f3b061e9b032022ede0cb3bb4f90ed554a39e318 /src/sys | |
parent | a8d68c3f9c4e2a1d07b9d27cebe0a7bf9edaacb0 (diff) |
implement proper function-like macro
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/wait/WEXITSTATUS.c | 3 | ||||
-rw-r--r-- | src/sys/wait/WSTOPSIG.c | 3 | ||||
-rw-r--r-- | src/sys/wait/WTERMSIG.c | 3 |
3 files changed, 3 insertions, 6 deletions
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 <sys/wait.h> - -#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 <sys/wait.h> - -#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 <sys/wait.h> - -#define WTERMSIG 7 +#define WTERMSIG(__stat_val) (__stat_val & 0xff) /* POSIX(1) */ |