projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build-aux/compile: sync from automake
[gnulib.git]
/
lib
/
nanosleep.c
diff --git
a/lib/nanosleep.c
b/lib/nanosleep.c
index
1732c59
..
7a7cc02
100644
(file)
--- a/
lib/nanosleep.c
+++ b/
lib/nanosleep.c
@@
-42,7
+42,7
@@
enum { BILLION = 1000 * 1000 * 1000 };
#if HAVE_BUG_BIG_NANOSLEEP
#if HAVE_BUG_BIG_NANOSLEEP
-void
+
static
void
getnow (struct timespec *t)
{
# if defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME
getnow (struct timespec *t)
{
# if defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME
@@
-147,14
+147,18
@@
rpl_nanosleep (const struct timespec *requested_delay,
/* set up sig handler */
if (! initialized)
{
/* set up sig handler */
if (! initialized)
{
- struct sigaction oldact, newact;
- newact.sa_handler = sighandler;
- sigemptyset (&newact.sa_mask);
- newact.sa_flags = 0;
+ struct sigaction oldact;
sigaction (SIGCONT, NULL, &oldact);
if (get_handler (&oldact) != SIG_IGN)
sigaction (SIGCONT, NULL, &oldact);
if (get_handler (&oldact) != SIG_IGN)
- sigaction (SIGCONT, &newact, NULL);
+ {
+ struct sigaction newact;
+
+ newact.sa_handler = sighandler;
+ sigemptyset (&newact.sa_mask);
+ newact.sa_flags = 0;
+ sigaction (SIGCONT, &newact, NULL);
+ }
initialized = true;
}
initialized = true;
}