diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 137644702..90c72210b 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -138,6 +138,7 @@ unix: don't autosave if hangup occurs after game is over linux: add example use of nroff on recent Linux distros linux: use random() by default instead of lrand48() OpenBSD: time() prototype and correct default Mail program +Gnome: compilation problems on Solaris General New Features @@ -149,4 +150,5 @@ Platform- and/or Interface-Specific New Features win32tty: keystroke handlers can be dynamically loaded to assist in resolving internationalization issues win32tty: add Ray Chason's code for international keyboard handling +Solaris (and other SystemV variants): TIMED_DELAY support diff --git a/include/extern.h b/include/extern.h index 976bb1b8c..0e16dd579 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2070,6 +2070,9 @@ E void VDECL(error, (const char *,...)) PRINTF_F(1,2); #ifdef UNIX E void NDECL(getlock); E void FDECL(regularize, (char *)); +# if defined(TIMED_DELAY) && !defined(msleep) && defined(SYSV) +E void FDECL(msleep, (unsigned)); +# endif # ifdef SHELL E int NDECL(dosh); # endif /* SHELL */ diff --git a/sys/unix/unixres.c b/sys/unix/unixres.c index 8c234e573..3e7f9899d 100644 --- a/sys/unix/unixres.c +++ b/sys/unix/unixres.c @@ -61,6 +61,10 @@ uid_t *ruid, *euid, *suid; # else /* SYS_getresuid */ +#ifdef SVR4 +#include +#endif /* SVR4 */ + static int real_getresuid(ruid, euid, suid) uid_t *ruid, *euid, *suid; diff --git a/sys/unix/unixunix.c b/sys/unix/unixunix.c index ed17c91c1..6950b820b 100644 --- a/sys/unix/unixunix.c +++ b/sys/unix/unixunix.c @@ -219,6 +219,21 @@ register char *s; #endif } +#if defined(TIMED_DELAY) && !defined(msleep) && defined(SYSV) +#include + +void +msleep(msec) +unsigned msec; /* milliseconds */ +{ + struct pollfd unused; + int msecs = msec; /* poll API is signed */ + + if (msecs < 0) msecs = 0; /* avoid infinite sleep */ + (void) poll(&unused, (unsigned long)0, msecs); +} +#endif /* TIMED_DELAY for SYSV */ + #ifdef SHELL int dosh()