aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1993-08-02 15:55:05 +0000
committerStu Grossman <grossman@cygnus>1993-08-02 15:55:05 +0000
commitd93e0582faab13b272d265f2db620d9d8f07545a (patch)
tree6840fc4d2f288046d7fc9efc87e243b3c73609d1
parentdb691e4b554f2b81c950172238e6a9c8a455352f (diff)
downloadgdb-d93e0582faab13b272d265f2db620d9d8f07545a.zip
gdb-d93e0582faab13b272d265f2db620d9d8f07545a.tar.gz
gdb-d93e0582faab13b272d265f2db620d9d8f07545a.tar.bz2
Mon Aug 2 08:49:30 1993 Stu Grossman (grossman at cygnus.com)
* wait.h (WEXITSTATUS, WSTOPSIG): Mask down to 8 bits. This is for systems that store stuff into the high 16 bits of a wait status.
-rw-r--r--include/wait.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/wait.h b/include/wait.h
index 4093258..a72943c 100644
--- a/include/wait.h
+++ b/include/wait.h
@@ -25,9 +25,9 @@
#define WIFSTOPPED(w) (((w)&0377) == 0177)
#endif
-#define WEXITSTATUS(w) ((w) >> 8) /* same as WRETCODE */
+#define WEXITSTATUS(w) (((w) >> 8) & 0377) /* same as WRETCODE */
#define WTERMSIG(w) ((w) & 0177)
-#define WSTOPSIG(w) ((w) >> 8)
+#define WSTOPSIG WEXITSTATUS
/* These are not defined in POSIX, but are used by our programs. */