diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-04-21 14:27:28 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-04-21 14:27:28 -0400 |
commit | 4b5f054098e484baa6d457aebe8bdab0eeb90215 (patch) | |
tree | 75489953a06be344241bbeea95a6eac5cb3cddfc /include/stdlib.h | |
parent | f492c95401b3a6fedb3973631496ee329447b25e (diff) | |
download | musl-4b5f054098e484baa6d457aebe8bdab0eeb90215.tar.gz |
move wait.h macros out of bits. they do not vary.
Diffstat (limited to 'include/stdlib.h')
-rw-r--r-- | include/stdlib.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/stdlib.h b/include/stdlib.h index a12192f0..023f6e78 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -81,7 +81,14 @@ size_t wcstombs (char *, const wchar_t *, size_t); || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) #ifndef WEXITSTATUS -#include <bits/wexitstatus.h> +#define WEXITSTATUS(s) (((s) & 0xff00) >> 8) +#define WTERMSIG(s) ((s) & 0x7f) +#define WSTOPSIG(s) WEXITSTATUS(s) +#define WCOREDUMP(s) ((s) & 0x80) +#define WIFEXITED(s) (!WTERMSIG(s)) +#define WIFSTOPPED(s) (((s) & 0xff) == 0x7f) +#define WIFSIGNALED(s) (((signed char) (((s) & 0x7f) + 1) >> 1) > 0) +#define WIFCONTINUED(s) ((s) == 0xffff) #endif int posix_memalign (void **, size_t, size_t); |