From 1c26f5eca3ddbdc1ebc946456733f093001ac36d Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Sun, 16 Jun 2002 09:03:53 +0000 Subject: Fix build on -current. Submitted by: mike --- mail/mailx/files/patch-cmd2.c | 20 ++++++++++++++++++++ mail/mailx/files/patch-fio.c | 20 ++++++++++++++++++++ mail/mailx/files/patch-popen.c | 43 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 mail/mailx/files/patch-cmd2.c create mode 100644 mail/mailx/files/patch-fio.c create mode 100644 mail/mailx/files/patch-popen.c (limited to 'mail/mailx') diff --git a/mail/mailx/files/patch-cmd2.c b/mail/mailx/files/patch-cmd2.c new file mode 100644 index 000000000000..e99b5f35c967 --- /dev/null +++ b/mail/mailx/files/patch-cmd2.c @@ -0,0 +1,20 @@ +--- cmd2.c Sun Mar 8 04:46:25 1998 ++++ cmd2.c Tue Jun 4 20:59:44 2002 +@@ -367,7 +367,7 @@ + core() + { + int pid; +- extern union wait wait_status; ++ extern int wait_status; + + switch (pid = vfork()) { + case -1: +@@ -380,7 +380,7 @@ + printf("Okie dokie"); + fflush(stdout); + wait_child(pid); +- if (wait_status.w_coredump) ++ if (WCOREDUMP(wait_status)) + printf(" -- Core dumped.\n"); + else + printf(" -- Can't dump core.\n"); diff --git a/mail/mailx/files/patch-fio.c b/mail/mailx/files/patch-fio.c new file mode 100644 index 000000000000..b33b93648794 --- /dev/null +++ b/mail/mailx/files/patch-fio.c @@ -0,0 +1,20 @@ +--- fio.c Tue Jun 4 21:05:13 2002 ++++ fio.c Tue Jun 4 21:05:42 2002 +@@ -313,7 +313,7 @@ + register char *cp, *shell; + int pivec[2]; + struct stat sbuf; +- extern union wait wait_status; ++ extern int wait_status; + + /* + * The order of evaluation is "%" and "#" expand into constants. +@@ -365,7 +365,7 @@ + close(pivec[1]); + l = read(pivec[0], xname, BUFSIZ); + close(pivec[0]); +- if (wait_child(pid) < 0 && wait_status.w_termsig != SIGPIPE) { ++ if (wait_child(pid) < 0 && WTERMSIG(wait_status) != SIGPIPE) { + fprintf(stderr, "\"%s\": Expansion failed.\n", name); + return NOSTR; + } diff --git a/mail/mailx/files/patch-popen.c b/mail/mailx/files/patch-popen.c new file mode 100644 index 000000000000..ec49cf92886e --- /dev/null +++ b/mail/mailx/files/patch-popen.c @@ -0,0 +1,43 @@ +--- popen.c Fri May 27 08:32:06 1994 ++++ popen.c Tue Jun 4 21:07:45 2002 +@@ -55,7 +55,7 @@ + int pid; + char done; + char free; +- union wait status; ++ int status; + struct child *link; + }; + static struct child *child; +@@ -320,11 +320,11 @@ + int signo; + { + int pid; +- union wait status; ++ int status; + register struct child *cp; + + while ((pid = +- wait3((int *)&status, WNOHANG, (struct rusage *)0)) > 0) { ++ wait3(&status, WNOHANG, (struct rusage *)0)) > 0) { + cp = findchild(pid); + if (cp->free) + delchild(cp); +@@ -335,7 +335,7 @@ + } + } + +-union wait wait_status; ++int wait_status; + + /* + * Wait for a specific child to die. +@@ -352,7 +352,7 @@ + wait_status = cp->status; + delchild(cp); + sigsetmask(mask); +- return wait_status.w_status ? -1 : 0; ++ return wait_status ? -1 : 0; + } + + /* -- cgit v1.2.3