Browse Source

revert 13331 and sync partly header w/ glibc, __sysv_signal is referenced in header, keep it visible

Peter S. Mazinger 18 years ago
parent
commit
2fa66fcc51
3 changed files with 8 additions and 6 deletions
  1. 2 2
      include/signal.h
  2. 4 3
      libc/signal/signal.c
  3. 2 1
      libc/signal/sysv_signal.c

+ 2 - 2
include/signal.h

@@ -93,8 +93,8 @@ extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      __THROW;
 #else
 /* Make sure the used `signal' implementation is the SVID version. */
-# ifdef __REDIRECT
-extern __sighandler_t __REDIRECT (signal,
+# ifdef __REDIRECT_NTH
+extern __sighandler_t __REDIRECT_NTH (signal,
 				      (int __sig, __sighandler_t __handler),
 				      __sysv_signal);
 # else

+ 4 - 3
libc/signal/signal.c

@@ -28,8 +28,8 @@ sigset_t _sigintr attribute_hidden;		/* Set by siginterrupt.  */
 
 /* Set the handler for the signal SIG to HANDLER,
    returning the old handler, or SIG_ERR on error.  */
-__sighandler_t
-bsd_signal (int sig, __sighandler_t handler)
+attribute_hidden __sighandler_t
+__bsd_signal (int sig, __sighandler_t handler)
 {
   struct sigaction act, oact;
 
@@ -50,6 +50,7 @@ bsd_signal (int sig, __sighandler_t handler)
 
   return oact.sa_handler;
 }
-strong_alias(bsd_signal,signal)
+strong_alias(__bsd_signal,bsd_signal)
+strong_alias(__bsd_signal,signal)
 libc_hidden_proto(signal)
 libc_hidden_def(signal)

+ 2 - 1
libc/signal/sysv_signal.c

@@ -36,7 +36,7 @@ libc_hidden_proto(sigaction)
 /* Set the handler for the signal SIG to HANDLER,
    returning the old handler, or SIG_ERR on error.  */
 __sighandler_t
-sysv_signal (sig, handler)
+__sysv_signal (sig, handler)
      int sig;
      __sighandler_t handler;
 {
@@ -59,3 +59,4 @@ sysv_signal (sig, handler)
 
   return oact.sa_handler;
 }
+strong_alias(__sysv_signal,sysv_signal)