]> diplodocus.org Git - nmh/blob - h/signals.h
Sigh. I put the documentation about the -tls switch in the long description,
[nmh] / h / signals.h
1
2 /*
3 * signals.h -- header file for nmh signal interface
4 */
5
6 #include <config.h>
7
8 /*
9 * The type for a signal handler
10 */
11 typedef RETSIGTYPE (*SIGNAL_HANDLER)(int);
12
13 /*
14 * If not a POSIX machine, then we create our
15 * own POSIX style signal sets functions. This
16 * currently assumes you have 31 signals, which
17 * should be true on most pure BSD machines.
18 */
19 #ifndef POSIX_SIGNALS
20 # define sigemptyset(s) (*(s) = 0)
21 # define sigfillset(s) (*(s) = ~((sigset_t) 0), 0)
22 # define sigaddset(s,n) (*(s) |= (1 << ((n) - 1)), 0)
23 # define sigdelset(s,n) (*(s) &= ~(1 << ((n) - 1)), 0)
24 # define sigismember(s,n) ((*(s) & (1 << ((n) - 1))) != 0)
25 #endif
26
27 /*
28 * prototypes
29 */
30 int SIGPROCMASK (int, const sigset_t *, sigset_t *);
31 SIGNAL_HANDLER SIGNAL (int, SIGNAL_HANDLER);
32 SIGNAL_HANDLER SIGNAL2 (int, SIGNAL_HANDLER);