From: Perl 5 Porters Date: Thu, 22 Aug 1996 02:15:39 +0000 (+0000) Subject: perl 5.003_03: pp_sys.c X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=76c323317ad9a796473522e3835ea0540e094a92;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_03: pp_sys.c Include , , and . (The latter two are especially for NetBSD.) Don't assume sys/time.h and sys/select.h can't coexist. Use Pause macro. --- diff --git a/pp_sys.c b/pp_sys.c index d733c34..0e44eee 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -17,14 +17,17 @@ #include "EXTERN.h" #include "perl.h" -/* XXX Omit this -- it causes too much grief on mixed systems. - Next time, I should force broken systems to unset i_unistd in - hint files. -*/ -#if 0 -# ifdef I_UNISTD -# include -# endif +/* XXX If this causes problems, set i_unistd=undef in the hint file. */ +#ifdef I_UNISTD +# include +#endif + +#ifdef I_SYS_WAIT +# include +#endif + +#ifdef I_SYS_RESOURCE +# include #endif /* Put this after #includes because fork and vfork prototypes may @@ -46,11 +49,9 @@ #ifdef HAS_SELECT #ifdef I_SYS_SELECT -#ifndef I_SYS_TIME #include #endif #endif -#endif #ifdef HOST_NOT_FOUND extern int h_errno; @@ -3169,7 +3170,7 @@ PP(pp_sleep) (void)time(&lasttime); if (MAXARG < 1) - pause(); + Pause(); else { duration = POPi; sleep((unsigned int)duration); @@ -4046,12 +4047,9 @@ PP(pp_syscall) locking module. */ -/* We might need because it sometimes defines the lockf() - constants. Unfortunately, causes troubles on some mixed - (BSD/POSIX) systems, such as SunOS 4.1.3. We could just try including - here in this part of the file, but that might - conflict with various other #defines and includes above, such as - #define vfork fork above. +/* The lockf() constants might have been defined in . + Unfortunately, causes troubles on some mixed + (BSD/POSIX) systems, such as SunOS 4.1.3. Further, the lockf() constants aren't POSIX, so they might not be visible if we're compiling with _POSIX_SOURCE defined. Thus, we'll