diff options
Diffstat (limited to 'libc/signal')
-rw-r--r-- | libc/signal/sigempty.c | 4 | ||||
-rw-r--r-- | libc/signal/sigfillset.c | 4 | ||||
-rw-r--r-- | libc/signal/sigset-cvt-mask.h | 4 | ||||
-rw-r--r-- | libc/signal/sigwait.c | 4 |
4 files changed, 11 insertions, 5 deletions
diff --git a/libc/signal/sigempty.c b/libc/signal/sigempty.c index 96260fb92..56b62bc65 100644 --- a/libc/signal/sigempty.c +++ b/libc/signal/sigempty.c @@ -26,13 +26,15 @@ /* libc_hidden_proto(sigemptyset) */ int sigemptyset (sigset_t *set) { +#if 0 /* is it really required by standards?! */ if (set == NULL) { __set_errno (EINVAL); return -1; } +#endif - memset (set, 0, sizeof (sigset_t)); + __sigemptyset (set); return 0; } diff --git a/libc/signal/sigfillset.c b/libc/signal/sigfillset.c index 2f8fb8138..b0b093032 100644 --- a/libc/signal/sigfillset.c +++ b/libc/signal/sigfillset.c @@ -27,13 +27,15 @@ int sigfillset (sigset_t *set) { +#if 0 /* is it really required by standards?! */ if (set == NULL) { __set_errno (EINVAL); return -1; } +#endif - memset (set, 0xff, sizeof (sigset_t)); + __sigfillset (set); /* If the implementation uses a cancellation signal don't set the bit. */ #ifdef SIGCANCEL diff --git a/libc/signal/sigset-cvt-mask.h b/libc/signal/sigset-cvt-mask.h index 83be40a51..76dd01c7e 100644 --- a/libc/signal/sigset-cvt-mask.h +++ b/libc/signal/sigset-cvt-mask.h @@ -22,7 +22,9 @@ static __inline__ void __attribute__ ((unused)) sigset_set_old_mask (sigset_t *set, int mask) { - if (_SIGSET_NWORDS > 1) + if (_SIGSET_NWORDS == 2) /* typical */ + set->__val[1] = 0; + if (_SIGSET_NWORDS > 2) memset(set, 0, sizeof(*set)); set->__val[0] = (unsigned int) mask; } diff --git a/libc/signal/sigwait.c b/libc/signal/sigwait.c index 9b2c32079..64a889f7b 100644 --- a/libc/signal/sigwait.c +++ b/libc/signal/sigwait.c @@ -56,12 +56,12 @@ int __sigwait (const sigset_t *set, int *sig) int this; /* Prepare set. */ - sigfillset (&tmp_mask); + __sigfillset (&tmp_mask); /* Unblock all signals in the SET and register our nice handler. */ action.sa_handler = ignore_signal; action.sa_flags = 0; - sigfillset (&action.sa_mask); /* Block all signals for handler. */ + __sigfillset (&action.sa_mask); /* Block all signals for handler. */ /* Make sure we recognize error conditions by setting WAS_SIG to a value which does not describe a legal signal number. */ |