summaryrefslogtreecommitdiff
path: root/libc/include/bsd/signal.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/include/bsd/signal.h')
-rw-r--r--libc/include/bsd/signal.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/libc/include/bsd/signal.h b/libc/include/bsd/signal.h
new file mode 100644
index 0000000..24d4502
--- /dev/null
+++ b/libc/include/bsd/signal.h
@@ -0,0 +1,25 @@
+#ifndef _BSD_SIGNAL_H
+#define _BSD_SIGNAL_H
+
+/* make sure we get BSD style signals (that don't need to be reset) */
+
+#define __USE_BSD_SIGNAL
+#include_next <signal.h>
+
+/* use rough approximation of sigaction to sigvec, not completely safe! */
+
+#define sigvec sigaction
+#define sv_mask sa_mask
+#define sv_flags sa_flags
+#define sv_handler sa_handler
+#define sv_onstack sa_mask /* ouch, this one really hurts */
+
+/* BSD uses some non-POSIX signals without ifdefs */
+
+#define SIGSYS SIGUNUSED
+
+/* BSD wants this typedef for signal handlers */
+
+#define sig_t __sighandler_t
+
+#endif /* _BSD_SIGNAL_H */