diff options
Diffstat (limited to 'libc/sysdeps/linux/common/sigprocmask.c')
-rw-r--r-- | libc/sysdeps/linux/common/sigprocmask.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libc/sysdeps/linux/common/sigprocmask.c b/libc/sysdeps/linux/common/sigprocmask.c index 6ca040c59..cbaea0f62 100644 --- a/libc/sysdeps/linux/common/sigprocmask.c +++ b/libc/sysdeps/linux/common/sigprocmask.c @@ -2,9 +2,9 @@ /* * sigprocmask() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org> + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> * - * GNU Library General Public License (LGPL) version 2 or later. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #include "syscalls.h" @@ -12,9 +12,11 @@ #undef sigprocmask +libc_hidden_proto(sigprocmask) + #ifdef __NR_rt_sigprocmask -#define __NR___rt_sigprocmask __NR_rt_sigprocmask +# define __NR___rt_sigprocmask __NR_rt_sigprocmask static inline _syscall4(int, __rt_sigprocmask, int, how, const sigset_t *, set, sigset_t *, oldset, size_t, size); @@ -22,13 +24,13 @@ _syscall4(int, __rt_sigprocmask, int, how, const sigset_t *, set, int sigprocmask(int how, const sigset_t * set, sigset_t * oldset) { if (set && -#if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2) +# if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2) (((unsigned int) how) > 2) -#else -#warning "compile time assumption violated.. slow path..." +# else +# warning "compile time assumption violated.. slow path..." ((how != SIG_BLOCK) && (how != SIG_UNBLOCK) && (how != SIG_SETMASK)) -#endif +# endif ) { __set_errno(EINVAL); return -1; @@ -39,7 +41,7 @@ int sigprocmask(int how, const sigset_t * set, sigset_t * oldset) #else -#define __NR___syscall_sigprocmask __NR_sigprocmask +# define __NR___syscall_sigprocmask __NR_sigprocmask static inline _syscall3(int, __syscall_sigprocmask, int, how, const sigset_t *, set, sigset_t *, oldset); @@ -47,13 +49,13 @@ _syscall3(int, __syscall_sigprocmask, int, how, const sigset_t *, set, int sigprocmask(int how, const sigset_t * set, sigset_t * oldset) { if (set && -#if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2) +# if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2) (((unsigned int) how) > 2) -#else -#warning "compile time assumption violated.. slow path..." +# else +# warning "compile time assumption violated.. slow path..." ((how != SIG_BLOCK) && (how != SIG_UNBLOCK) && (how != SIG_SETMASK)) -#endif +# endif ) { __set_errno(EINVAL); return -1; @@ -61,6 +63,4 @@ int sigprocmask(int how, const sigset_t * set, sigset_t * oldset) return (__syscall_sigprocmask(how, set, oldset)); } #endif - -libc_hidden_proto(sigprocmask) libc_hidden_def(sigprocmask) |