Module Name: src
Committed By: dholland
Date: Sat Aug 6 19:53:24 UTC 2011
Modified Files:
src/games/hack: config.h hack.pager.c
Log Message:
<sys/wait.h> is standard, so just use it instead of fiddling about with
ifdefs for long-dead systems. While here, remove union wait.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/games/hack/config.h
cvs rdiff -u -r1.15 -r1.16 src/games/hack/hack.pager.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/hack/config.h
diff -u src/games/hack/config.h:1.9 src/games/hack/config.h:1.10
--- src/games/hack/config.h:1.9 Sat Aug 6 19:47:54 2011
+++ src/games/hack/config.h Sat Aug 6 19:53:24 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: config.h,v 1.9 2011/08/06 19:47:54 dholland Exp $ */
+/* $NetBSD: config.h,v 1.10 2011/08/06 19:53:24 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -83,7 +83,6 @@
/* #define STUPID */ /* avoid some complicated expressions if
your C compiler chokes on them */
-/* #define NOWAITINCLUDE */ /* neither <wait.h> nor <sys/wait.h> exists */
#define WIZARD "bruno" /* the person allowed to use the -D option */
#define RECORD "record"/* the file containing the list of topscorers */
Index: src/games/hack/hack.pager.c
diff -u src/games/hack/hack.pager.c:1.15 src/games/hack/hack.pager.c:1.16
--- src/games/hack/hack.pager.c:1.15 Mon May 23 22:53:25 2011
+++ src/games/hack/hack.pager.c Sat Aug 6 19:53:24 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.pager.c,v 1.15 2011/05/23 22:53:25 joerg Exp $ */
+/* $NetBSD: hack.pager.c,v 1.16 2011/08/06 19:53:24 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.pager.c,v 1.15 2011/05/23 22:53:25 joerg Exp $");
+__RCSID("$NetBSD: hack.pager.c,v 1.16 2011/08/06 19:53:24 dholland Exp $");
#endif /* not lint */
/* This file contains the command routine dowhatis() and a pager. */
@@ -73,6 +73,7 @@
*/
#include <sys/types.h>
+#include <sys/wait.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
@@ -438,25 +439,6 @@
}
#endif /* SHELL */
-#ifdef NOWAITINCLUDE
-union wait { /* used only for the cast (union wait *) 0 */
- int w_status;
- struct {
- unsigned short w_Termsig:7;
- unsigned short w_Coredump:1;
- unsigned short w_Retcode:8;
- } w_T;
-};
-
-#else
-
-#ifdef BSD
-#include <sys/wait.h>
-#else
-#include <wait.h>
-#endif /* BSD */
-#endif /* NOWAITINCLUDE */
-
static int
child(int wt)
{