aboutsummaryrefslogtreecommitdiff
path: root/include/signal.h
diff options
context:
space:
mode:
authorPeter Dufault <dufault@FreeBSD.org>1998-03-08 17:25:38 +0000
committerPeter Dufault <dufault@FreeBSD.org>1998-03-08 17:25:38 +0000
commitaac4ad2c994742defc0623bd489206743241552c (patch)
tree0dff9523762d4433c9265778cf79490f9378d188 /include/signal.h
parentaac18d035f1c8256522613d417dc9ae2731641ec (diff)
downloadsrc-aac4ad2c994742defc0623bd489206743241552c.tar.gz
src-aac4ad2c994742defc0623bd489206743241552c.zip
Reviewed by: bde
Changes to support building with _POSIX_SOURCE set to 199309L: 1. Add sys/_posix.h to handle those preprocessor defs that POSIX says have effects when defined before including any header files; 2. Change POSIX4_VISIBLE back to _POSIX4_VISIBLE 3. Add _POSIX4_VISIBLE_HISTORICALLY for pre-existing BSD features now defined in POSIX. These show up when: _POSIX_SOURCE and _POSIX_C_SOURCE are not set or _POSIX_C_SOURCE is set >= 199309L and vanish when: _POSIX_SOURCE is set or _POSIX_C_SOURCE is < 199309L. 4. Explain these in man 9 posix4; 5. Include _posix.h and conditionalize on new feature test.
Notes
Notes: svn path=/head/; revision=34319
Diffstat (limited to 'include/signal.h')
-rw-r--r--include/signal.h36
1 files changed, 33 insertions, 3 deletions
diff --git a/include/signal.h b/include/signal.h
index dd6dc8a934f1..9f38bf576d1e 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -39,6 +39,7 @@
#include <sys/cdefs.h>
#include <sys/signal.h>
#include <machine/ansi.h>
+#include <sys/_posix.h>
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
extern __const char *__const sys_signame[NSIG];
@@ -63,10 +64,39 @@ int signanosleep __P((const struct timespec *, struct timespec *,
int sigpending __P((sigset_t *));
int sigprocmask __P((int, const sigset_t *, sigset_t *));
int sigsuspend __P((const sigset_t *));
-#ifdef POSIX4_VISIBLE
+
+#ifdef _POSIX4_VISIBLE_HISTORICALLY
+
+/* Async event notification */
+
+union sigval {
+ int sival_int;
+ void *sival_ptr;
+};
+struct sigevent {
+ int sigev_notify; /* Notification type */
+ int sigev_signo; /* Signal number */
+ union sigval sigev_value; /* Signal value */
+};
+#define SIGEV_NONE 0 /* No async notification */
+#define SIGEV_SIGNAL 1 /* Queue signal with value */
+
+#endif /* _POSIX4_VISIBLE_HISTORICALLY */
+
+#ifdef _POSIX4_VISIBLE
+
+typedef struct siginfo {
+ int si_signo; /* Signal number */
+ int si_code; /* Cause of the signal */
+ union sigval si_value; /* Signal value */
+} siginfo_t;
+
+__BEGIN_DECLS
int sigqueue __P((_BSD_PID_T_, int, const union sigval));
-int sigtimedwait __P((const sig_set_t *, siginfo_t *));
-int sigwaitinfo __P((const sig_set_t *, siginfo_t *));
+int sigtimedwait __P((const sigset_t *, siginfo_t *));
+int sigwaitinfo __P((const sigset_t *, siginfo_t *));
+__END_DECLS
+
#endif
#ifndef _POSIX_SOURCE
int killpg __P((_BSD_PID_T_, int));