summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps/pthread/sigaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl/sysdeps/pthread/sigaction.c')
-rw-r--r--libpthread/nptl/sysdeps/pthread/sigaction.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/libpthread/nptl/sysdeps/pthread/sigaction.c b/libpthread/nptl/sysdeps/pthread/sigaction.c
index 0877e534f..54b5d2de4 100644
--- a/libpthread/nptl/sysdeps/pthread/sigaction.c
+++ b/libpthread/nptl/sysdeps/pthread/sigaction.c
@@ -20,20 +20,21 @@
/* This is tricky. GCC doesn't like #include_next in the primary
source file and even if it did, the first #include_next is this
exact file anyway. */
+#ifndef LIBC_SIGACTION
+
#include <pthreadP.h>
-#include <features.h>
-#include <errno.h>
-#include <signal.h>
-extern __typeof(sigaction) __libc_sigaction;
-extern __typeof(sigaction) __sigaction;
/* We use the libc implementation but we tell it to not allow
SIGCANCEL or SIGTIMER to be handled. */
+# define LIBC_SIGACTION 1
+
+# include <sigaction.c>
+
int
-__sigaction (sig, act, oact)
- int sig;
- const struct sigaction *act;
- struct sigaction *oact;
+sigaction (int sig, const struct sigaction *act, struct sigaction *oact);
+
+int
+__sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
if (__builtin_expect (sig == SIGCANCEL || sig == SIGSETXID, 0))
{
@@ -46,3 +47,8 @@ __sigaction (sig, act, oact)
libc_hidden_proto(sigaction)
weak_alias (__sigaction, sigaction)
libc_hidden_weak(sigaction)
+#else
+
+# include_next <sigaction.c>
+
+#endif /* LIBC_SIGACTION */