From: Paul Eggert Date: Mon, 2 Aug 2004 22:51:56 +0000 (+0000) Subject: nanosleep.c (errno): Remove decl; we now assume C89 or better. X-Git-Tag: v5.3.0~921 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd24faad5fbb8ab6a14b04a38ebb3c35802b7c18;p=thirdparty%2Fcoreutils.git nanosleep.c (errno): Remove decl; we now assume C89 or better. Include stdbool.h. (rpl_nanosleep): Usee bool for booleans. --- diff --git a/lib/nanosleep.c b/lib/nanosleep.c index c5451ffc4f..2f91c31d83 100644 --- a/lib/nanosleep.c +++ b/lib/nanosleep.c @@ -23,14 +23,12 @@ prototype for rpl_nanosleep. (they'd conflict e.g., on alpha-dec-osf3.2) */ #undef nanosleep +#include #include #include #include #include -#ifndef errno -extern int errno; -#endif #if HAVE_UNISTD_H # include @@ -77,7 +75,7 @@ int rpl_nanosleep (const struct timespec *requested_delay, struct timespec *remaining_delay) { - static int initialized; + static bool initialized; #ifdef SA_NOCLDSTOP struct sigaction oldact, newact; @@ -100,7 +98,7 @@ rpl_nanosleep (const struct timespec *requested_delay, if (signal (SIGCONT, SIG_IGN) != SIG_IGN) signal (SIGCONT, sighandler); #endif - initialized = 1; + initialized = true; } my_usleep (requested_delay);