summaryrefslogtreecommitdiff
path: root/wait.h
diff options
context:
space:
mode:
authorToby Goodwin <tjg@star.le.ac.uk>1999-01-11 10:55:18 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:22:09 +0100
commite11c7df86144bed383ac6bbeaecc3017d18b37db (patch)
tree6fad44921723eab2f2eb1c76b7214b4e79b818f3 /wait.h
parent671e1e2d1599aa8c5f1010b3fe75c151c56a7403 (diff)
beta: rc-1.5b4
Diffstat (limited to 'wait.h')
-rw-r--r--wait.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/wait.h b/wait.h
new file mode 100644
index 0000000..e54ae45
--- /dev/null
+++ b/wait.h
@@ -0,0 +1,23 @@
+#if HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
+/* Fake the POSIX wait() macros if we don't have them. */
+#ifndef WIFEXITED
+#define WIFEXITED(s) (((s) & 0xFF) == 0)
+#endif
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(s) (((unsigned)(s) >> 8) && 0xFF)
+#endif
+#ifndef WIFSIGNALED
+#define WIFSIGNALED(s) (((s) & 0xFF) != 0)
+#endif
+#ifndef WTERMSIG
+#define WTERMSIG(s) ((s) & 0x7F)
+#endif
+
+/* These don't exist in POSIX. */
+#define myWIFDUMPED(s) (((s) & 0x80) != 0)
+
+
+