Update namespace protection for siginfo; originally from Christos.
This commit is contained in:
parent
5359887820
commit
00c99f5cd8
@ -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
|
* Copyright (c) 1982, 1986, 1989, 1991, 1993
|
||||||
@ -125,7 +125,10 @@ struct sigaction13 {
|
|||||||
#define sigminusset(s, t) __sigminusset(s, t)
|
#define sigminusset(s, t) __sigminusset(s, t)
|
||||||
#endif /* _KERNEL */
|
#endif /* _KERNEL */
|
||||||
|
|
||||||
|
#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \
|
||||||
|
defined(_NETBSD_SOURCE)
|
||||||
#include <sys/siginfo.h>
|
#include <sys/siginfo.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
|
#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
|
||||||
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
|
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
|
||||||
@ -138,14 +141,20 @@ struct sigaction13 {
|
|||||||
struct sigaction {
|
struct sigaction {
|
||||||
union {
|
union {
|
||||||
void (*_sa_handler) __P((int));
|
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 *));
|
void (*_sa_sigaction) __P((int, siginfo_t *, void *));
|
||||||
|
#endif
|
||||||
} _sa_u; /* signal handler */
|
} _sa_u; /* signal handler */
|
||||||
sigset_t sa_mask; /* signal mask to apply */
|
sigset_t sa_mask; /* signal mask to apply */
|
||||||
int sa_flags; /* see signal options below */
|
int sa_flags; /* see signal options below */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define sa_handler _sa_u._sa_handler
|
#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
|
#define sa_sigaction _sa_u._sa_sigaction
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <machine/signal.h> /* sigcontext; codes for SIGILL, SIGFPE */
|
#include <machine/signal.h> /* sigcontext; codes for SIGILL, SIGFPE */
|
||||||
|
|
||||||
@ -155,11 +164,14 @@ struct sigaction {
|
|||||||
#define SA_RESTART 0x0002 /* restart system on signal return */
|
#define SA_RESTART 0x0002 /* restart system on signal return */
|
||||||
#define SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */
|
#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_NODEFER 0x0010 /* don't mask the signal we're delivering */
|
||||||
#define SA_SIGINFO 0x0040
|
|
||||||
#endif /* _XOPEN_SOURCE_EXTENDED || XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
|
#endif /* _XOPEN_SOURCE_EXTENDED || XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
|
||||||
/* Only valid for SIGCHLD. */
|
/* Only valid for SIGCHLD. */
|
||||||
#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */
|
#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */
|
||||||
#define SA_NOCLDWAIT 0x0020 /* do not generate zombies on unwaited child */
|
#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
|
#ifdef _KERNEL
|
||||||
#define SA_ALLBITS 0x007f
|
#define SA_ALLBITS 0x007f
|
||||||
#endif
|
#endif
|
||||||
@ -227,6 +239,8 @@ struct sigstack {
|
|||||||
#define BADSIG SIG_ERR
|
#define BADSIG SIG_ERR
|
||||||
#endif /* _NETBSD_SOURCE */
|
#endif /* _NETBSD_SOURCE */
|
||||||
|
|
||||||
|
#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \
|
||||||
|
defined(_NETBSD_SOURCE)
|
||||||
struct sigevent {
|
struct sigevent {
|
||||||
int sigev_notify;
|
int sigev_notify;
|
||||||
int sigev_signo;
|
int sigev_signo;
|
||||||
@ -239,6 +253,7 @@ struct sigevent {
|
|||||||
#define SIGEV_SIGNAL 1
|
#define SIGEV_SIGNAL 1
|
||||||
#define SIGEV_THREAD 2
|
#define SIGEV_THREAD 2
|
||||||
#define SIGEV_SA 3
|
#define SIGEV_SA 3
|
||||||
|
#endif /* (_POSIX_C_SOURCE - 0) >= 199309L || ... */
|
||||||
|
|
||||||
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
|
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user