aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/internal-signals.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/internal-signals.h b/sysdeps/unix/sysv/linux/internal-signals.h
index 01d8bf0a4c..a496c7174c 100644
--- a/sysdeps/unix/sysv/linux/internal-signals.h
+++ b/sysdeps/unix/sysv/linux/internal-signals.h
@@ -22,6 +22,7 @@
#include <signal.h>
#include <sigsetops.h>
#include <stdbool.h>
+#include <limits.h>
#include <sysdep.h>
/* The signal used for asynchronous cancelation. */
@@ -53,15 +54,16 @@ __clear_internal_signals (sigset_t *set)
__sigdelset (set, SIGSETXID);
}
-#define SIGALL_SET \
- ((__sigset_t) { .__val = {[0 ... _SIGSET_NWORDS-1 ] = -1 } })
+static const sigset_t sigall_set = {
+ .__val = {[0 ... _SIGSET_NWORDS-1 ] = -1 }
+};
/* Block all signals, including internal glibc ones. */
static inline int
__libc_signal_block_all (sigset_t *set)
{
INTERNAL_SYSCALL_DECL (err);
- return INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_BLOCK, &SIGALL_SET,
+ return INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_BLOCK, &sigall_set,
set, _NSIG / 8);
}
@@ -69,11 +71,11 @@ __libc_signal_block_all (sigset_t *set)
static inline int
__libc_signal_block_app (sigset_t *set)
{
- sigset_t allset = SIGALL_SET;
+ sigset_t allset = sigall_set;
__clear_internal_signals (&allset);
INTERNAL_SYSCALL_DECL (err);
- return INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_BLOCK, &allset, set,
- _NSIG / 8);
+ return INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_BLOCK, &allset,
+ set, _NSIG / 8);
}
/* Restore current process signal mask. */