about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/www_wait.h
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation/www_wait.h')
-rw-r--r--WWW/Library/Implementation/www_wait.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/WWW/Library/Implementation/www_wait.h b/WWW/Library/Implementation/www_wait.h
new file mode 100644
index 00000000..730b3ec5
--- /dev/null
+++ b/WWW/Library/Implementation/www_wait.h
@@ -0,0 +1,26 @@
+#ifndef WWW_WAIT_H
+#define WWW_WAIT_H 1
+
+#include <HTUtils.h>
+
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
+#ifndef WEXITSTATUS
+# ifdef HAVE_TYPE_UNIONWAIT
+#  define	WEXITSTATUS(status)	(status.w_retcode)
+# else
+#  define	WEXITSTATUS(status)	(((status) & 0xff00) >> 8)
+# endif
+#endif
+
+#ifndef WTERMSIG
+# ifdef HAVE_TYPE_UNIONWAIT
+#  define	WTERMSIG(status)	(status.w_termsig)
+# else
+#  define	WTERMSIG(status)	((status) & 0x7f)
+# endif
+#endif
+
+#endif /* WWW_WAIT_H */