$NetBSD: patch-ai,v 1.4 2006/11/28 16:48:31 tv Exp $ --- utils.c.orig 1992-09-09 10:31:16.000000000 -0400 +++ utils.c @@ -18,6 +18,7 @@ Please read the file COPYRIGHT for furth #include #include #include +#include #include #include #ifdef ISC @@ -25,8 +26,10 @@ Please read the file COPYRIGHT for furth #else #include #endif +#include #include "globals.h" +extern void initialize_siglist A((void)) ; /* Signal handler, print message and exit */ SIG_HANDLER_RET exitsig(sig) @@ -70,10 +73,10 @@ char *s ; /* set up signal handling. All except TSTP, CONT, CLD, and QUIT * are caught with exitsig(). */ -init_signals() +void init_signals() { int i ; -#ifdef SIG_SETMASK /* only with BSD signals */ +#if defined(SIG_SETMASK) && !defined(__NetBSD__) /* only with BSD signals */ static struct sigvec svec = { exitsig, ~0, 0 } ; #endif @@ -103,7 +106,7 @@ init_signals() case SIGQUIT: /* if the user wants a core dump, */ continue ; /* they can have it. */ default: -#ifdef SIG_SETMASK +#if defined(SIG_SETMASK) && !defined(__NetBSD__) sigvec(i, &svec, NULL) ; #else signal(i, exitsig) ; @@ -173,12 +176,12 @@ char *prog ; void wait_for_children() { int wret, status ; -#ifndef ISC +#if !defined(ISC) && !defined(__INTERIX) struct rusage rusage ; #endif /* Just do a wait, forget result */ -#ifndef ISC +#if !defined(ISC) && !defined(__INTERIX) while ((wret = wait3(&status, WNOHANG, &rusage)) > 0) ; #else while ((wret = waitpid(-1, &status, WNOHANG)) > 0) ;