Revert use of sig-handler.h in sigprocmask.c.
authorEric Blake <ebb9@byu.net>
Mon, 23 Jun 2008 12:02:40 +0000 (06:02 -0600)
committerEric Blake <ebb9@byu.net>
Mon, 23 Jun 2008 12:02:40 +0000 (06:02 -0600)
* modules/sigprocmask (Files): Don't rely on sig-handler.h, since
it requires the existence of struct sigaction.
* lib/sigprocmask.c (handler_t): Restore typedef.
(rpl_signal, old_handlers): Use local type.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/sigprocmask.c
modules/sigprocmask

index a3bdbfe7409336d3d75ed5a400bf258ddf268e30..fe2dade74ca59f3ea52779e52a9087915879959d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-06-23  Eric Blake  <ebb9@byu.net>
+
+       Revert use of sig-handler.h in sigprocmask.c.
+       * modules/sigprocmask (Files): Don't rely on sig-handler.h, since
+       it requires the existence of struct sigaction.
+       * lib/sigprocmask.c (handler_t): Restore typedef.
+       (rpl_signal, old_handlers): Use local type.
+
 2008-06-22  Bruno Haible  <bruno@clisp.org>
 
        * tests/test-stdint.c: Disable the INTMAX_MAX preprocessor test
index 54e9c68f5bf41abbe1ed9325113409884f3e4fa5..d6daca6ae2157b713efed0e0ea4f5b75d8a8a498 100644 (file)
@@ -24,8 +24,6 @@
 #include <stdint.h>
 #include <stdlib.h>
 
-#include "sig-handler.h"
-
 /* We assume that a platform without POSIX signal blocking functions
    also does not have the POSIX sigaction() function, only the
    signal() function.  We also assume signal() has SysV semantics,
@@ -45,6 +43,8 @@
 # define SIGSTOP (-1)
 #endif
 
+typedef void (*handler_t) (int);
+
 int
 sigismember (const sigset_t *set, int sig)
 {
@@ -133,7 +133,7 @@ sigpending (sigset_t *set)
 
 /* The previous signal handlers.
    Only the array elements corresponding to blocked signals are relevant.  */
-static volatile sa_handler_t old_handlers[NSIG];
+static volatile handler_t old_handlers[NSIG];
 
 int
 sigprocmask (int operation, const sigset_t *set, sigset_t *old_set)
@@ -208,8 +208,8 @@ sigprocmask (int operation, const sigset_t *set, sigset_t *old_set)
 
 /* Install the handler FUNC for signal SIG, and return the previous
    handler.  */
-sa_handler_t
-rpl_signal (int sig, sa_handler_t handler)
+handler_t
+rpl_signal (int sig, handler_t handler)
 {
   /* We must provide a wrapper, so that a user can query what handler
      they installed even if that signal is currently blocked.  */
@@ -227,7 +227,7 @@ rpl_signal (int sig, sa_handler_t handler)
             stale information if it calls signal(B).  Oh well -
             signal handlers really shouldn't try to manipulate the
             installed handlers of unrelated signals.  */
-         sa_handler_t result = old_handlers[sig];
+         handler_t result = old_handlers[sig];
          old_handlers[sig] = handler;
          return result;
        }
index 37adc63d34c4e8b4c20ce11075aab992e5a9a2f9..e0931120386803826ed12878ba030a4e40e55f44 100644 (file)
@@ -3,7 +3,6 @@ POSIX compatible signal blocking.
 
 Files:
 lib/sigprocmask.c
-lib/sig-handler.h
 m4/signalblocking.m4
 
 Depends-on: