From c2ecaf87e462fd6600ce5ee6a29cb352de042714 Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Wed, 24 Sep 2025 22:26:00 +0200 Subject: update --- WWW/Library/Implementation/www_wait.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 WWW/Library/Implementation/www_wait.h (limited to 'WWW/Library/Implementation/www_wait.h') 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 + +#ifdef HAVE_SYS_WAIT_H +#include +#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 */ -- cgit v1.2.3