]> ncurses.scripts.mit.edu Git - ncurses.git/blob - ncurses/SigAction.h
ncurses 4.1
[ncurses.git] / ncurses / SigAction.h
1
2 /***************************************************************************
3 *                            COPYRIGHT NOTICE                              *
4 ****************************************************************************
5 *                ncurses is copyright (C) 1992-1995                        *
6 *                          Zeyd M. Ben-Halim                               *
7 *                          zmbenhal@netcom.com                             *
8 *                          Eric S. Raymond                                 *
9 *                          esr@snark.thyrsus.com                           *
10 *                                                                          *
11 *        Permission is hereby granted to reproduce and distribute ncurses  *
12 *        by any means and for any fee, whether alone or as part of a       *
13 *        larger distribution, in source or in binary form, PROVIDED        *
14 *        this notice is included with any such distribution, and is not    *
15 *        removed from any of its header files. Mention of ncurses in any   *
16 *        applications linked with it is highly appreciated.                *
17 *                                                                          *
18 *        ncurses comes AS IS with no warranty, implied or expressed.       *
19 *                                                                          *
20 ***************************************************************************/
21
22
23 /* This file exists to handle non-POSIX systems which don't have <unistd.h>,
24  * and usually no sigaction() nor <termios.h>
25  */
26
27 #ifndef _SIGACTION_H
28 #define _SIGACTION_H
29
30 #if HAVE_LIBC_H
31 #include <libc.h>
32 #endif
33
34 #undef  SIG_BLOCK
35 #define SIG_BLOCK       00
36
37 #undef  SIG_UNBLOCK
38 #define SIG_UNBLOCK     01
39
40 #undef  SIG_SETMASK
41 #define SIG_SETMASK     02
42
43         /*
44          * <bsd/signal.h> is in the Linux 1.2.8 + gcc 2.7.0 configuration,
45          * and is useful for testing this header file.
46          */
47 #if HAVE_BSD_SIGNAL_H
48 #include <bsd/signal.h>
49 #endif
50
51 typedef struct sigvec sigaction_t;
52
53 #define sigset_t _nc_sigset_t
54 typedef unsigned long sigset_t;
55
56 #undef  sa_mask
57 #define sa_mask sv_mask
58 #undef  sa_handler
59 #define sa_handler sv_handler
60 #undef  sa_flags
61 #define sa_flags sv_flags
62
63 #undef  sigaction
64 #define sigaction   _nc_sigaction
65 #undef  sigprocmask
66 #define sigprocmask _nc_sigprocmask
67 #undef  sigemptyset
68 #define sigemptyset _nc_sigemptyset
69 #undef  sigsuspend
70 #define sigsuspend  _nc_sigsuspend
71 #undef  sigdelset
72 #define sigdelset   _nc_sigdelset
73 #undef  sigaddset
74 #define sigaddset   _nc_sigaddset
75
76 extern int sigaction (int sig, sigaction_t * sigact, sigaction_t *  osigact);
77 extern int sigprocmask (int how, sigset_t *mask, sigset_t *omask);
78 extern int sigemptyset (sigset_t *mask);
79 extern int sigsuspend (sigset_t *mask);
80 extern int sigdelset (sigset_t *mask, int sig);
81 extern int sigaddset (sigset_t *mask, int sig);
82
83 #endif