OSDN Git Service

Try to mimic glibc sigaction, sjhill, could you please test w/ this version?
authorPeter S. Mazinger <ps.m@gmx.net>
Thu, 8 Dec 2005 20:07:39 +0000 (20:07 -0000)
committerPeter S. Mazinger <ps.m@gmx.net>
Thu, 8 Dec 2005 20:07:39 +0000 (20:07 -0000)
libc/signal/sigaction.c
libc/signal/sigignore.c
libc/signal/sigintr.c
libc/signal/signal.c
libc/signal/sigset.c
libc/signal/sysv_signal.c
libc/sysdeps/linux/arm/sigaction.c
libc/sysdeps/linux/common/ssp.c
libc/sysdeps/linux/i386/sigaction.c
libc/sysdeps/linux/mips/sigaction.c
libc/sysdeps/linux/x86_64/sigaction.c

index 0976e82..c6fcddf 100644 (file)
@@ -32,8 +32,8 @@
 
 /* If ACT is not NULL, change the action for SIG to *ACT.
    If OACT is not NULL, put the old action for SIG in *OACT.  */
-int attribute_hidden
-__sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int
+__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 {
        int result;
        struct kernel_sigaction kact, koact;
@@ -69,8 +69,8 @@ __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oa
 
 /* If ACT is not NULL, change the action for SIG to *ACT.
    If OACT is not NULL, put the old action for SIG in *OACT.  */
-int attribute_hidden
-__sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int
+__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 {
        int result;
        struct old_kernel_sigaction kact, koact;
@@ -102,6 +102,5 @@ __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oa
 
 #endif
 
-strong_alias(__sigaction_internal,__libc_sigaction)
-weak_alias(__sigaction_internal,__sigaction)
-weak_alias(__sigaction_internal,sigaction)
+hidden_weak_alias(__libc_sigaction,__sigaction)
+weak_alias(__libc_sigaction,sigaction)
index 490cc38..3f8b898 100644 (file)
@@ -18,7 +18,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define sigaction __sigaction_internal
+#define sigaction __sigaction
 
 #define _GNU_SOURCE
 #include <errno.h>
index c55d586..797c528 100644 (file)
@@ -16,7 +16,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define sigaction __sigaction_internal
+#define sigaction __sigaction
 
 #include <stddef.h>
 #include <signal.h>
index f835525..9e489f6 100644 (file)
@@ -18,7 +18,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define sigaction __sigaction_internal
+#define sigaction __sigaction
 
 #include <errno.h>
 #include <signal.h>
index 7860669..305cd96 100644 (file)
@@ -16,7 +16,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define sigaction __sigaction_internal
+#define sigaction __sigaction
 
 #include <errno.h>
 #define __need_NULL
index 78c9696..608aef2 100644 (file)
@@ -16,7 +16,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define sigaction __sigaction_internal
+#define sigaction __sigaction
 
 #include <errno.h>
 #include <signal.h>
index e2da4f8..a2d27eb 100644 (file)
@@ -46,7 +46,7 @@ extern void __default_rt_sa_restorer(void);
 
 /* If ACT is not NULL, change the action for SIG to *ACT.
    If OACT is not NULL, put the old action for SIG in *OACT.  */
-int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 {
     int result;
     struct kernel_sigaction kact, koact;
@@ -94,7 +94,7 @@ int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act,
 
 /* If ACT is not NULL, change the action for SIG to *ACT.
    If OACT is not NULL, put the old action for SIG in *OACT.  */
-int __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 {
     int result;
     struct old_kernel_sigaction kact, koact;
@@ -127,6 +127,6 @@ int __sigaction_internal (int sig, const struct sigaction *act, struct sigaction
 }
 
 #endif
-strong_alias(__sigaction_internal,__libc_sigaction)
-weak_alias(__sigaction_internal, sigaction)
+hidden_weak_alias(__libc_sigaction,__sigaction)
+weak_alias(__libc_sigaction,sigaction)
 
index 49d2cbf..05e53c2 100644 (file)
@@ -31,7 +31,7 @@
 #define closelog __closelog
 #define sigfillset __sigfillset_internal
 #define sigdelset __sigdelset_internal
-#define sigaction __sigaction_internal
+#define sigaction __sigaction
 #define kill __kill
 
 #include <string.h>
index d7898c5..2e50284 100644 (file)
@@ -34,7 +34,7 @@ extern void restore (void) asm ("__restore") attribute_hidden;
 
 /* If ACT is not NULL, change the action for SIG to *ACT.
    If OACT is not NULL, put the old action for SIG in *OACT.  */
-int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 {
     int result;
     struct kernel_sigaction kact, koact;
@@ -76,7 +76,7 @@ extern void restore (void) asm ("__restore") attribute_hidden;
 
 /* If ACT is not NULL, change the action for SIG to *ACT.
    If OACT is not NULL, put the old action for SIG in *OACT.  */
-int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 {
     int result;
     struct old_kernel_sigaction kact, koact;
@@ -119,8 +119,8 @@ int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act,
 }
 
 #endif
-strong_alias(__sigaction_internal,__libc_sigaction)
-weak_alias(__sigaction_internal, sigaction)
+hidden_weak_alias(__libc_sigaction,__sigaction)
+weak_alias(__libc_sigaction,sigaction)
 
 
 
index f703f33..dfc2598 100644 (file)
@@ -32,7 +32,7 @@
 
 /* If ACT is not NULL, change the action for SIG to *ACT.
    If OACT is not NULL, put the old action for SIG in *OACT.  */
-int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 {
     int result;
     struct kernel_sigaction kact, koact;
@@ -77,7 +77,7 @@ extern void restore (void) asm ("__restore") attribute_hidden;
 
 /* If ACT is not NULL, change the action for SIG to *ACT.
    If OACT is not NULL, put the old action for SIG in *OACT.  */
-int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 {
     int result;
     struct old_kernel_sigaction kact, koact;
@@ -118,5 +118,5 @@ int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act,
 }
 
 #endif
-strong_alias(__sigaction_internal,__libc_sigaction)
-weak_alias(__sigaction_internal,sigaction)
+hidden_weak_alias(__libc_sigaction,__sigaction)
+weak_alias(__libc_sigaction,sigaction)
index 32b13c0..41f9a8c 100644 (file)
@@ -46,8 +46,8 @@ extern void restore (void) asm ("__restore") attribute_hidden;
    If OACT is not NULL, put the old action for SIG in *OACT.  */
 /* psm: couldn't use __sigaction, if building w/ disabled hidden,
  *      it will conflict w/ the one in libpthread */
-int attribute_hidden
-__sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int
+__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 {
        int result;
        struct kernel_sigaction kact, koact;
@@ -79,8 +79,8 @@ extern void restore (void) asm ("__restore") attribute_hidden;
 
 /* If ACT is not NULL, change the action for SIG to *ACT.
    If OACT is not NULL, put the old action for SIG in *OACT.  */
-int attribute_hidden
-__sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int
+__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 {
        int result;
        struct old_kernel_sigaction kact, koact;
@@ -119,8 +119,8 @@ __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oa
        return result;
 }
 #endif
-strong_alias(__sigaction_internal,__libc_sigaction)
-weak_alias(__sigaction_internal,sigaction)
+hidden_weak_alias(__libc_sigaction,__sigaction)
+weak_alias(__libc_sigaction,sigaction)
 
 /* NOTE: Please think twice before making any changes to the bits of
    code below.  GDB needs some intimate knowledge about it to