summaryrefslogtreecommitdiffstats
path: root/WWW/Library/Implementation/www_wait.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:21:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:21:21 +0000
commit510ed32cfbffa6148018869f5ade416505a450b3 (patch)
tree0aafabcf3dfaab7685fa0fcbaa683dafe287807e /WWW/Library/Implementation/www_wait.h
parentInitial commit. (diff)
downloadlynx-510ed32cfbffa6148018869f5ade416505a450b3.tar.xz
lynx-510ed32cfbffa6148018869f5ade416505a450b3.zip
Adding upstream version 2.9.0rel.0.upstream/2.9.0rel.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'WWW/Library/Implementation/www_wait.h')
-rw-r--r--WWW/Library/Implementation/www_wait.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/WWW/Library/Implementation/www_wait.h b/WWW/Library/Implementation/www_wait.h
new file mode 100644
index 0000000..3e40e88
--- /dev/null
+++ b/WWW/Library/Implementation/www_wait.h
@@ -0,0 +1,34 @@
+#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
+
+#ifndef WSTOPSIG
+# ifdef HAVE_TYPE_UNIONWAIT
+# define WSTOPSIG(status) (status.w_stopsig)
+# else
+# define WSTOPSIG(status) WEXITSTATUS(status)
+# endif
+#endif
+
+#endif /* WWW_WAIT_H */