commit 7682867936110840720bc20e3a73ade7a322c375
parent d3102fa7de519677c917beb108a71b81ef9a8abc
Author: tgoodwin <tgoodwin>
Date: Mon, 27 Jul 1998 13:27:34 +0000
move <sys/wait.h> magic into "wait.h"
Diffstat:
3 files changed, 6 insertions(+), 27 deletions(-)
diff --git a/exec.c b/exec.c
@@ -1,8 +1,9 @@
/* exec.c */
-#include <signal.h>
#include <errno.h>
-#include "rc.h"
+#include <signal.h>
+#include "rc.h"
+#include "wait.h"
/*
Takes an argument list and does the appropriate thing (calls a
builtin, calls a function, etc.)
diff --git a/proto.h b/proto.h
@@ -56,29 +56,6 @@ extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
#include <unistd.h>
#endif
-#if HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-
-/* Fake the POSIX wait() macros if we don't have them. */
-#ifndef WIFEXITED
-#define WIFEXITED(s) (((s) & 0xFF) == 0)
-#endif
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(s) (((unsigned)(s) >> 8) && 0xFF)
-#endif
-#ifndef WIFSIGNALED
-#define WIFSIGNALED(s) (((s) & 0xFF) != 0)
-#endif
-#ifndef WTERMSIG
-#define WTERMSIG(s) ((s) & 0x7F)
-#endif
-
-/* These don't exist in POSIX. */
-#define myWIFDUMPED(s) (((s) & 0x80) != 0)
-
-
-
#if HAVE_SETPGRP
#if SETPGRP_VOID
@@ -92,8 +69,8 @@ extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
#else /* HAVE_SETPGRP */
/* Nothing doing. */
-#define setpgid
-#define tcsetpgrp
+#define setpgid()
+#define tcsetpgrp()
#endif /*HAVE_SETPGRP */
diff --git a/status.c b/status.c
@@ -2,6 +2,7 @@
#include "rc.h"
#include "sigmsgs.h"
+#include "wait.h"
/* status == the wait() value of the last command in the pipeline, or the last command */