X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Futils.c;h=ba7f5a6c7bdb3dbf11c5e8fb16395c9a5d19327e;hb=b317cb1c6dabd6390c039acf5b89789f1e8d3959;hp=fc6aea09094c54b821bab487c3129ecafb4aabd3;hpb=63dcf343f140162aa5e22089d090424dcf137e1a;p=wget diff --git a/src/utils.c b/src/utils.c index fc6aea09..ba7f5a6c 100644 --- a/src/utils.c +++ b/src/utils.c @@ -81,10 +81,8 @@ so, delete this exception statement from your version. */ #endif #undef USE_SIGNAL_TIMEOUT -#ifdef HAVE_SIGNAL -# if defined(HAVE_SIGSETJMP) || defined(HAVE_SIGBLOCK) -# define USE_SIGNAL_TIMEOUT -# endif +#if defined(HAVE_SIGSETJMP) || defined(HAVE_SIGBLOCK) +# define USE_SIGNAL_TIMEOUT #endif #include "wget.h" @@ -1800,12 +1798,11 @@ xsleep (double seconds) seconds -= (long) seconds; } usleep (seconds * 1000000); -#elif defined(HAVE_SELECT) - /* Note that, although Windows supports select, this sleeping - strategy doesn't work there because Winsock's select doesn't - implement timeout when it is passed NULL pointers for all fd - sets. (But it does work under Cygwin, which implements its own - select.) */ +#else /* fall back select */ + /* Note that, although Windows supports select, it can't be used to + implement sleeping because Winsock's select doesn't implement + timeout when it is passed NULL pointers for all fd sets. (But it + does under Cygwin, which implements Unix-compatible select.) */ struct timeval sleep; sleep.tv_sec = (long) seconds; sleep.tv_usec = 1000000 * (seconds - (long) seconds); @@ -1814,8 +1811,6 @@ xsleep (double seconds) interrupted by a signal. But without knowing how long we've actually slept, we can't return to sleep. Using gettimeofday to track sleeps is slow and unreliable due to clock skew. */ -#else /* none of the above */ - sleep (seconds); #endif }