]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* hurd/hurdsig.c (_hurd_internal_post_signal): Support SA_RESETHAND
authorRoland McGrath <roland@gnu.org>
Mon, 23 Jul 2001 07:20:28 +0000 (07:20 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 23 Jul 2001 07:20:28 +0000 (07:20 +0000)
and SA_NODEFER options.  Spurred to action by Igor Khavkine.

* sysdeps/generic/bits/sigaction.h [__USE_UNIX98 || __USE_MISC]
(SA_NODEFER, SA_RESETHAND): New macros, same bit values as FreeBSD.
[__USE_MISC] (SA_INTERRUPT): New macro, value 0.
[__USE_MISC] (SA_NOMASK, SA_ONESHOT, SA_STACK): New macros, aliases
as in other sysdeps versions of this file.

        * sysdeps/generic/bits/sigaction.h (struct sigaction): Use a union
and provide sa_handler and sa_sigaction member names as macros, as
done in other sysdeps versions of this file.
Suggested by Igor Khavkine <i_khavki@alcor.concordia.ca>.

ChangeLog
bits/sigaction.h
sysdeps/generic/bits/sigaction.h

index 290599641d98900b33f923e9897591fd5c7df7c6..59d15c159408dd8f4afcc204b2db4e6006467026 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2001-07-22  Roland McGrath  <roland@frob.com>
+
+       * hurd/hurdsig.c (_hurd_internal_post_signal): Support SA_RESETHAND
+       and SA_NODEFER options.  Spurred to action by Igor Khavkine.
+
+       * sysdeps/generic/bits/sigaction.h [__USE_UNIX98 || __USE_MISC]
+       (SA_NODEFER, SA_RESETHAND): New macros, same bit values as FreeBSD.
+       [__USE_MISC] (SA_INTERRUPT): New macro, value 0.
+       [__USE_MISC] (SA_NOMASK, SA_ONESHOT, SA_STACK): New macros, aliases
+       as in other sysdeps versions of this file.
+
+        * sysdeps/generic/bits/sigaction.h (struct sigaction): Use a union
+       and provide sa_handler and sa_sigaction member names as macros, as
+       done in other sysdeps versions of this file.
+       Suggested by Igor Khavkine <i_khavki@alcor.concordia.ca>.
+
 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
 
        * posix/regex.c: Revamp memory allocation for WCHAR functions to
index 67981e8a2b5745e1678dcd2627d3ebf5518f9001..e23a96cd9d5841bfa01b0fb9ba12ea7b1c1d861a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,96,97,98,2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 struct sigaction
   {
     /* Signal handler.  */
-    __sighandler_t sa_handler;
+    union {
+      __sighandler_t sa_handler;
+      void (*sa_sigaction) (int, siginfo_t *, void *);
+    } __sigaction_handler;
+# define sa_handler    __sigaction_handler.sa_handler
+# define sa_sigaction  __sigaction_handler.sa_sigaction
 
     /* Additional set of signals to be blocked.  */
     __sigset_t sa_mask;
@@ -43,9 +48,21 @@ struct sigaction
 #if defined __USE_UNIX98 || defined __USE_MISC
 # define SA_ONSTACK    0x0001  /* Take signal on signal stack.  */
 # define SA_RESTART    0x0002  /* Restart syscall on signal return.  */
+# define SA_NODEFER    0x0010  /* Don't automatically block the signal when
+                                   its handler is being executed.  */
+# define SA_RESETHAND  0x0004  /* Reset to SIG_DFL on entry to handler.  */
 #endif
 #define        SA_NOCLDSTOP    0x0008  /* Don't send SIGCHLD when children stop.  */
 
+#ifdef __USE_MISC
+# define SA_INTERRUPT  0       /* Historical no-op ("not SA_RESTART").  */
+
+/* Some aliases for the SA_ constants.  */
+# define SA_NOMASK    SA_NODEFER
+# define SA_ONESHOT   SA_RESETHAND
+# define SA_STACK     SA_ONSTACK
+#endif
+
 
 /* Values for the HOW argument to `sigprocmask'.  */
 #define        SIG_BLOCK       1       /* Block signals.  */
index 67981e8a2b5745e1678dcd2627d3ebf5518f9001..e23a96cd9d5841bfa01b0fb9ba12ea7b1c1d861a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,96,97,98,2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 struct sigaction
   {
     /* Signal handler.  */
-    __sighandler_t sa_handler;
+    union {
+      __sighandler_t sa_handler;
+      void (*sa_sigaction) (int, siginfo_t *, void *);
+    } __sigaction_handler;
+# define sa_handler    __sigaction_handler.sa_handler
+# define sa_sigaction  __sigaction_handler.sa_sigaction
 
     /* Additional set of signals to be blocked.  */
     __sigset_t sa_mask;
@@ -43,9 +48,21 @@ struct sigaction
 #if defined __USE_UNIX98 || defined __USE_MISC
 # define SA_ONSTACK    0x0001  /* Take signal on signal stack.  */
 # define SA_RESTART    0x0002  /* Restart syscall on signal return.  */
+# define SA_NODEFER    0x0010  /* Don't automatically block the signal when
+                                   its handler is being executed.  */
+# define SA_RESETHAND  0x0004  /* Reset to SIG_DFL on entry to handler.  */
 #endif
 #define        SA_NOCLDSTOP    0x0008  /* Don't send SIGCHLD when children stop.  */
 
+#ifdef __USE_MISC
+# define SA_INTERRUPT  0       /* Historical no-op ("not SA_RESTART").  */
+
+/* Some aliases for the SA_ constants.  */
+# define SA_NOMASK    SA_NODEFER
+# define SA_ONESHOT   SA_RESETHAND
+# define SA_STACK     SA_ONSTACK
+#endif
+
 
 /* Values for the HOW argument to `sigprocmask'.  */
 #define        SIG_BLOCK       1       /* Block signals.  */