Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 18 Sep 2002 08:27:02 +0000 (08:27 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 18 Sep 2002 08:27:02 +0000 (08:27 +0000)
* sysdeps/unix/sysv/linux/sigaction.c: If SIGCANCEL is defined
define sigaction and __sigaction as wrappers around
__libc_sigaction which rejects changing SIGCANCEL.
* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.

ChangeLog
sysdeps/unix/sysv/linux/i386/sigaction.c
sysdeps/unix/sysv/linux/sigaction.c

index 289c35d..73577f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2002-09-18  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/unix/sysv/linux/sigaction.c: If SIGCANCEL is defined
+       define sigaction and __sigaction as wrappers around
+       __libc_sigaction which rejects changing SIGCANCEL.
+       * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
+
        * sysdeps/unix/sysv/linux/i386/clone.S: Add support for SETTLS and
        SETTID/CLEARTID.
 
index 57634c1..9474721 100644 (file)
@@ -157,9 +157,28 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 #endif
 }
 
+#ifndef SIGCANCEL
 weak_alias (__libc_sigaction, __sigaction)
 libc_hidden_weak (__sigaction)
 weak_alias (__libc_sigaction, sigaction)
+#else
+int
+__sigaction (sig, act, oact)
+     int sig;
+     const struct sigaction *act;
+     struct sigaction *oact;
+{
+  if (sig == SIGCANCEL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return __libc_sigaction (sig, act, oact);
+}
+libc_hidden_weak (__sigaction)
+weak_alias (__sigaction, sigaction)
+#endif
 
 /* NOTE: Please think twice before making any changes to the bits of
    code below.  GDB needs some intimate knowledge about it to
index c95e3d1..d8f1d26 100644 (file)
@@ -133,6 +133,25 @@ __libc_sigaction (sig, act, oact)
 #endif
 }
 
+#ifndef SIGCANCEL
 weak_alias (__libc_sigaction, __sigaction)
 libc_hidden_weak (__sigaction)
 weak_alias (__libc_sigaction, sigaction)
+#else
+int
+__sigaction (sig, act, oact)
+     int sig;
+     const struct sigaction *act;
+     struct sigaction *oact;
+{
+  if (sig == SIGCANCEL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return __libc_sigaction (sig, act, oact);
+}
+libc_hidden_weak (__sigaction)
+weak_alias (__sigaction, sigaction)
+#endif