aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorK. Richard Pixley <rich@cygnus>1991-03-25 22:25:13 +0000
committerK. Richard Pixley <rich@cygnus>1991-03-25 22:25:13 +0000
commit16423a4a99210a59fc20ea069a5305ccee9414a5 (patch)
treea667132e7e517dadc8e0a9c08f9b9b166f91b440
parent61a153e5c167fceabc6fd145d7659efef2046d6d (diff)
parentb37af01c89edaa40b7ece325dcb2c46eb377d1e1 (diff)
downloadgdb-16423a4a99210a59fc20ea069a5305ccee9414a5.zip
gdb-16423a4a99210a59fc20ea069a5305ccee9414a5.tar.gz
gdb-16423a4a99210a59fc20ea069a5305ccee9414a5.tar.bz2
This commit was generated by cvs2svn to track changes on a CVS vendor
branch.
-rw-r--r--include/wait.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/wait.h b/include/wait.h
new file mode 100644
index 0000000..339c2eb
--- /dev/null
+++ b/include/wait.h
@@ -0,0 +1,27 @@
+
+/* Define how to access the structure that the wait system call stores.
+ On many systems, there is a structure defined for this.
+ But on vanilla-ish USG systems there is not. */
+
+#ifndef HAVE_WAIT_STRUCT
+#define WAITTYPE int
+#define WIFSTOPPED(w) (((w)&0377) == 0177)
+#define WIFSIGNALED(w) (((w)&0377) != 0177 && ((w)&~0377) == 0)
+#define WIFEXITED(w) (((w)&0377) == 0)
+#define WRETCODE(w) ((w) >> 8)
+#define WSTOPSIG(w) ((w) >> 8)
+#define WCOREDUMP(w) (((w)&0200) != 0)
+#define WTERMSIG(w) ((w) & 0177)
+#define WSETEXIT(w, status) ((w) = (status))
+#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8)))
+#else
+#include <sys/wait.h>
+#define WAITTYPE union wait
+#define WRETCODE(w) (w).w_retcode
+#define WSTOPSIG(w) (w).w_stopsig
+#define WCOREDUMP(w) (w).w_coredump
+#define WTERMSIG(w) (w).w_termsig
+#define WSETEXIT(w, status) ((w).w_status = (status))
+#define WSETSTOP(w,sig) \
+ ((w).w_stopsig = (sig), (w).w_coredump = 0, (w).w_termsig = 0177)
+#endif