aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-08-23 03:07:50 +0000
committerRoland McGrath <roland@gnu.org>2001-08-23 03:07:50 +0000
commitbedbf86c74436b1bc6d0dec4e282a286fddc9fbd (patch)
treea00e98c32f429e81e077ba4d30c241188bb365ec
parent40b145c443205234d7996c8f2bb6200905b13a4b (diff)
downloadglibc-bedbf86c74436b1bc6d0dec4e282a286fddc9fbd.tar
glibc-bedbf86c74436b1bc6d0dec4e282a286fddc9fbd.tar.gz
glibc-bedbf86c74436b1bc6d0dec4e282a286fddc9fbd.tar.bz2
glibc-bedbf86c74436b1bc6d0dec4e282a286fddc9fbd.zip
2001-08-22 Roland McGrath <roland@frob.com>
* sysdeps/generic/bits/sigaction.h (struct sigaction): Fix up conditionalization of sa_handler/sa_sigaction member types to match the sysdeps/unix/sysv/linux file.
-rw-r--r--bits/sigaction.h20
-rw-r--r--sysdeps/generic/bits/sigaction.h20
2 files changed, 28 insertions, 12 deletions
diff --git a/bits/sigaction.h b/bits/sigaction.h
index e23a96cd9d..adcc276cc8 100644
--- a/bits/sigaction.h
+++ b/bits/sigaction.h
@@ -30,12 +30,20 @@
struct sigaction
{
/* Signal 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
+#ifdef __USE_POSIX199309
+ union
+ {
+ /* Used if SA_SIGINFO is not set. */
+ __sighandler_t sa_handler;
+ /* Used if SA_SIGINFO is set. */
+ void (*sa_sigaction) (int, siginfo_t *, void *);
+ }
+ __sigaction_handler;
+# define sa_handler __sigaction_handler.sa_handler
+# define sa_sigaction __sigaction_handler.sa_sigaction
+#else
+ __sighandler_t sa_handler;
+#endif
/* Additional set of signals to be blocked. */
__sigset_t sa_mask;
diff --git a/sysdeps/generic/bits/sigaction.h b/sysdeps/generic/bits/sigaction.h
index e23a96cd9d..adcc276cc8 100644
--- a/sysdeps/generic/bits/sigaction.h
+++ b/sysdeps/generic/bits/sigaction.h
@@ -30,12 +30,20 @@
struct sigaction
{
/* Signal 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
+#ifdef __USE_POSIX199309
+ union
+ {
+ /* Used if SA_SIGINFO is not set. */
+ __sighandler_t sa_handler;
+ /* Used if SA_SIGINFO is set. */
+ void (*sa_sigaction) (int, siginfo_t *, void *);
+ }
+ __sigaction_handler;
+# define sa_handler __sigaction_handler.sa_handler
+# define sa_sigaction __sigaction_handler.sa_sigaction
+#else
+ __sighandler_t sa_handler;
+#endif
/* Additional set of signals to be blocked. */
__sigset_t sa_mask;