summaryrefslogtreecommitdiff
path: root/lib/ac/wait.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ac/wait.h')
-rw-r--r--lib/ac/wait.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ac/wait.h b/lib/ac/wait.h
new file mode 100644
index 0000000..665ced5
--- /dev/null
+++ b/lib/ac/wait.h
@@ -0,0 +1,10 @@
+#include <sys/types.h>
+#if HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#endif
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif