about summary refs log tree commit diff
path: root/arch/x86_64/bits
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-02-19 02:23:29 -0500
committerRich Felker <dalias@aerifal.cx>2011-02-19 02:23:29 -0500
commitf3ef7a61245c5ace26ca13bccf14a28876ea7bfc (patch)
tree4ae8bcc4e7bc772e28e89b59e58adf9f736df271 /arch/x86_64/bits
parentb386d8186226f28e1b610be657a89e357768efa1 (diff)
downloadmusl-f3ef7a61245c5ace26ca13bccf14a28876ea7bfc.tar.gz
musl-f3ef7a61245c5ace26ca13bccf14a28876ea7bfc.tar.xz
musl-f3ef7a61245c5ace26ca13bccf14a28876ea7bfc.zip
add missing WIFCONTINUED macro and improve WIFSIGNALED
Diffstat (limited to 'arch/x86_64/bits')
-rw-r--r--arch/x86_64/bits/wexitstatus.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86_64/bits/wexitstatus.h b/arch/x86_64/bits/wexitstatus.h
index 34a80238..591d401a 100644
--- a/arch/x86_64/bits/wexitstatus.h
+++ b/arch/x86_64/bits/wexitstatus.h
@@ -5,5 +5,6 @@
 #define WCOREDUMP(s) ((s) & 0x80)
 #define WIFEXITED(s) (!WTERMSIG(s))
 #define WIFSTOPPED(s) (((s) & 0xff) == 0x7f)
-#define WIFSIGNALED(s) (!WIFSTOPPED(s) && !WIFEXITED(s))
+#define WIFSIGNALED(s) (((signed char) (((s) & 0x7f) + 1) >> 1) > 0)
+#define WIFCONTINUED(s) ((s) == 0xffff)
 #endif