From 87bbc4cf1e95400e17670a38684c041319c3187b Mon Sep 17 00:00:00 2001 From: Yury Norov Date: Tue, 31 Oct 2017 15:31:40 -0200 Subject: Remove useless #ifdefs from Linux sig*.c syscalls sigprocmask.c, sigtimedwait.c, sigwait.c and sigwaitinfo.c files from sysdeps/unix/sysv/linux include nptl-signals.h via nptl/pthreadP.h, and so SIGCANCEL and SIGSETXID become defined unconditionally. But later in the code, there are some checks weither symbols defined, which is useless. This patch removes useless checks. Checked on x86_64-linux-gnu. * sysdeps/unix/sysv/linux/sigprocmask.c: Remove useless #ifdefs. * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. * sysdeps/unix/sysv/linux/sigwait.c: Likewise. * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Signed-off-by: Yury Norov Reviewed-by: Andreas Schwab Reviewed-by: Adhemerval Zanella --- sysdeps/unix/sysv/linux/sigtimedwait.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'sysdeps/unix/sysv/linux/sigtimedwait.c') diff --git a/sysdeps/unix/sysv/linux/sigtimedwait.c b/sysdeps/unix/sysv/linux/sigtimedwait.c index ab1a84ef1c..42afbce22c 100644 --- a/sysdeps/unix/sysv/linux/sigtimedwait.c +++ b/sysdeps/unix/sysv/linux/sigtimedwait.c @@ -29,25 +29,18 @@ int __sigtimedwait (const sigset_t *set, siginfo_t *info, const struct timespec *timeout) { -#ifdef SIGCANCEL sigset_t tmpset; if (set != NULL && (__builtin_expect (__sigismember (set, SIGCANCEL), 0) -# ifdef SIGSETXID - || __builtin_expect (__sigismember (set, SIGSETXID), 0) -# endif - )) + || __builtin_expect (__sigismember (set, SIGSETXID), 0))) { /* Create a temporary mask without the bit for SIGCANCEL set. */ // We are not copying more than we have to. memcpy (&tmpset, set, _NSIG / 8); __sigdelset (&tmpset, SIGCANCEL); -# ifdef SIGSETXID __sigdelset (&tmpset, SIGSETXID); -# endif set = &tmpset; } -#endif /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ -- cgit v1.2.3