diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1995-08-19 21:30:30 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1995-08-19 21:30:30 +0000 |
| commit | 6ec4b3339bbd81ee311eb50fe25a13676e2a02a7 (patch) | |
| tree | e1ea6a3b65e0f2e9f5d6e0f0f3956a82ada4b85b /gnu/libexec/uucp/libunix/pause.c | |
| parent | ea76f9453e3fc27708741a121e0757ba0c87bd05 (diff) | |
Notes
Diffstat (limited to 'gnu/libexec/uucp/libunix/pause.c')
| -rw-r--r-- | gnu/libexec/uucp/libunix/pause.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/gnu/libexec/uucp/libunix/pause.c b/gnu/libexec/uucp/libunix/pause.c index 8155db327260..8b2b698ba0dc 100644 --- a/gnu/libexec/uucp/libunix/pause.c +++ b/gnu/libexec/uucp/libunix/pause.c @@ -7,27 +7,29 @@ #include "system.h" /* Pick a timing routine to use. I somewhat arbitrarily picked usleep - above nap above napms above poll above select. */ -#if HAVE_USLEEP || HAVE_NAP || HAVE_NAPMS || HAVE_POLL + above napms above poll above select above nap. The nap function is + last because on different systems the argument has different + meanings. */ +#if HAVE_USLEEP || HAVE_NAPMS || HAVE_POLL || HAVE_SELECT +#undef HAVE_NAP +#define HAVE_NAP 0 +#endif + +#if HAVE_USLEEP || HAVE_NAPMS || HAVE_POLL #undef HAVE_SELECT #define HAVE_SELECT 0 #endif -#if HAVE_USLEEP || HAVE_NAP || HAVE_NAPMS +#if HAVE_USLEEP || HAVE_NAPMS #undef HAVE_POLL #define HAVE_POLL 0 #endif -#if HAVE_USLEEP || HAVE_NAP +#if HAVE_USLEEP #undef HAVE_NAPMS #define HAVE_NAPMS 0 #endif -#if HAVE_USLEEP -#undef HAVE_NAP -#define HAVE_NAP 0 -#endif - #if HAVE_SELECT #if HAVE_SYS_TIME_H #include <sys/time.h> @@ -81,6 +83,7 @@ usysdep_pause () /* We need to pass an unused pollfd structure because poll checks the address before checking the number of elements. */ + memset (&sdummy, 0, sizeof sdummy); poll (&sdummy, 0, 500); #endif /* HAVE_POLL */ #if HAVE_SELECT |
