From 7682867936110840720bc20e3a73ade7a322c375 Mon Sep 17 00:00:00 2001 From: tgoodwin Date: Mon, 27 Jul 1998 13:27:34 +0000 Subject: move magic into "wait.h" --- exec.c | 5 +++-- proto.h | 27 ++------------------------- status.c | 1 + 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/exec.c b/exec.c index 7bf565b..a0ba8d4 100644 --- a/exec.c +++ b/exec.c @@ -1,8 +1,9 @@ /* exec.c */ -#include #include -#include "rc.h" +#include +#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 index d8a8178..8a88829 100644 --- a/proto.h +++ b/proto.h @@ -56,29 +56,6 @@ extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); #include #endif -#if HAVE_SYS_WAIT_H -#include -#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 index 8926000..b594e4b 100644 --- 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 */ -- cgit v1.2.3