Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Update namespace protection for siginfo; originally ...



details:   https://anonhg.NetBSD.org/src/rev/51d0cfd14448
branches:  trunk
changeset: 566394:51d0cfd14448
user:      kleink <kleink%NetBSD.org@localhost>
date:      Fri May 07 23:54:48 2004 +0000

description:
Update namespace protection for siginfo; originally from Christos.

diffstat:

 sys/sys/signal.h |  19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diffs (74 lines):

diff -r c2fdcdf7b186 -r 51d0cfd14448 sys/sys/signal.h
--- a/sys/sys/signal.h  Fri May 07 23:05:30 2004 +0000
+++ b/sys/sys/signal.h  Fri May 07 23:54:48 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: signal.h,v 1.57 2004/03/26 15:01:16 drochner Exp $     */
+/*     $NetBSD: signal.h,v 1.58 2004/05/07 23:54:48 kleink Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -125,7 +125,10 @@
 #define sigminusset(s, t)      __sigminusset(s, t)
 #endif /* _KERNEL */
 
+#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \
+    defined(_NETBSD_SOURCE)
 #include <sys/siginfo.h>
+#endif
 
 #if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
     (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
@@ -138,14 +141,20 @@
 struct sigaction {
        union {
                void (*_sa_handler) __P((int));
+#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \
+    defined(_NETBSD_SOURCE)
                void (*_sa_sigaction) __P((int, siginfo_t *, void *));
+#endif
        } _sa_u;        /* signal handler */
        sigset_t sa_mask;               /* signal mask to apply */
        int     sa_flags;               /* see signal options below */
 };
 
 #define sa_handler _sa_u._sa_handler
+#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \
+    defined(_NETBSD_SOURCE)
 #define sa_sigaction _sa_u._sa_sigaction
+#endif
 
 #include <machine/signal.h>    /* sigcontext; codes for SIGILL, SIGFPE */
 
@@ -155,11 +164,14 @@
 #define SA_RESTART     0x0002  /* restart system on signal return */
 #define SA_RESETHAND   0x0004  /* reset to SIG_DFL when taking signal */
 #define SA_NODEFER     0x0010  /* don't mask the signal we're delivering */
-#define SA_SIGINFO     0x0040
 #endif /* _XOPEN_SOURCE_EXTENDED || XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
 /* Only valid for SIGCHLD. */
 #define SA_NOCLDSTOP   0x0008  /* do not generate SIGCHLD on child stop */
 #define SA_NOCLDWAIT   0x0020  /* do not generate zombies on unwaited child */
+#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \
+    defined(_NETBSD_SOURCE)
+#define SA_SIGINFO     0x0040  /* take sa_sigaction handler */
+#endif /* (_POSIX_C_SOURCE - 0) >= 199309L || ... */
 #ifdef _KERNEL
 #define        SA_ALLBITS      0x007f
 #endif
@@ -227,6 +239,8 @@
 #define        BADSIG          SIG_ERR
 #endif /* _NETBSD_SOURCE */
 
+#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \
+    defined(_NETBSD_SOURCE)
 struct sigevent {
        int     sigev_notify;
        int     sigev_signo;
@@ -239,6 +253,7 @@
 #define SIGEV_SIGNAL   1
 #define SIGEV_THREAD   2
 #define SIGEV_SA       3
+#endif /* (_POSIX_C_SOURCE - 0) >= 199309L || ... */
      
 #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
 



Home | Main Index | Thread Index | Old Index