summaryrefslogtreecommitdiff
path: root/src/syswait.h
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-02-17 10:27:34 +0000
committerRichard M. Stallman <rms@gnu.org>1995-02-17 10:27:34 +0000
commitda149a8fb6db28d379e96e1ce59fce2286446cf5 (patch)
treeb279011478b673f583713e358d15c6e2677b12bd /src/syswait.h
parented0ce9537bcae47aada141a40e95ae41a8dc7b8b (diff)
New alternative specified by WAIT_USE_INT.
Diffstat (limited to 'src/syswait.h')
-rw-r--r--src/syswait.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/syswait.h b/src/syswait.h
index 6e21f75b7f..435b47ecfb 100644
--- a/src/syswait.h
+++ b/src/syswait.h
@@ -23,7 +23,17 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef VMS
#ifndef WAITTYPE
-#if (!defined (BSD) && !defined (UNIPLUS) && !defined (STRIDE) && !(defined (HPUX) && !defined (NOMULTIPLEJOBS)) && !defined (HAVE_WAIT_HEADER)) || defined (LINUX) || defined (WAIT_USE_INT)
+
+#ifdef WAIT_USE_INT
+/* Some systems have union wait in their header, but we should use
+ int regardless of that. */
+#include <sys/wait.h>
+#define WAITTYPE int
+#define WRETCODE(w) WEXITSTATUS (w)
+
+#else /* not WAIT_USE_INT */
+
+#if (!defined (BSD) && !defined (UNIPLUS) && !defined (STRIDE) && !(defined (HPUX) && !defined (NOMULTIPLEJOBS)) && !defined (HAVE_WAIT_HEADER)) || defined (LINUX)
#define WAITTYPE int
#define WIFSTOPPED(w) ((w&0377) == 0177)
#define WIFSIGNALED(w) ((w&0377) != 0177 && (w&~0377) == 0)
@@ -34,7 +44,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef WCOREDUMP
#define WCOREDUMP(w) ((w&0200) != 0)
#endif
+
#else
+
#ifdef BSD4_1
#include <wait.h>
#else
@@ -72,8 +84,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define WIFEXITED(w) (WTERMSIG (w) == 0)
#endif
#endif /* BSD or UNIPLUS or STRIDE */
+#endif /* not WAIT_USE_INT */
#endif /* no WAITTYPE */
+
#else /* VMS */
+
#define WAITTYPE int
#define WIFSTOPPED(w) 0
#define WIFSIGNALED(w) 0
@@ -86,4 +101,5 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <iodef.h>
#include <clidef.h>
#include "vmsproc.h"
+
#endif /* VMS */