aboutsummaryrefslogtreecommitdiff
path: root/gdb/wait.h
diff options
context:
space:
mode:
authorgdb-2.4+.aux.coff <gdb@fsf.org>1988-01-16 04:39:57 +0000
committerPedro Alves <palves@redhat.com>2012-06-03 15:36:30 +0100
commit7b4ac7e1ed2c4616bce56d1760807798be87ac9e (patch)
tree777c9f6aba126e91e4a25d7b1fa34c2213d038da /gdb/wait.h
downloadfsf-binutils-gdb-7b4ac7e1ed2c4616bce56d1760807798be87ac9e.zip
fsf-binutils-gdb-7b4ac7e1ed2c4616bce56d1760807798be87ac9e.tar.gz
fsf-binutils-gdb-7b4ac7e1ed2c4616bce56d1760807798be87ac9e.tar.bz2
gdb-2.4+.aux.coff
Diffstat (limited to 'gdb/wait.h')
-rw-r--r--gdb/wait.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/wait.h b/gdb/wait.h
new file mode 100644
index 0000000..fe7f384
--- /dev/null
+++ b/gdb/wait.h
@@ -0,0 +1,25 @@
+
+/* 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 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 WSETSTOP(w,sig) \
+ ((w).stopsig = (sig), (w).coredump = 0, (w).termsig = 0177)
+#endif