1 /****************************************************************************
2 * Copyright 2020 Thomas E. Dickey *
3 * Copyright 1998-2003,2005 Free Software Foundation, Inc. *
5 * Permission is hereby granted, free of charge, to any person obtaining a *
6 * copy of this software and associated documentation files (the *
7 * "Software"), to deal in the Software without restriction, including *
8 * without limitation the rights to use, copy, modify, merge, publish, *
9 * distribute, distribute with modifications, sublicense, and/or sell *
10 * copies of the Software, and to permit persons to whom the Software is *
11 * furnished to do so, subject to the following conditions: *
13 * The above copyright notice and this permission notice shall be included *
14 * in all copies or substantial portions of the Software. *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
24 * Except as contained in this notice, the name(s) of the above copyright *
25 * holders shall not be used in advertising or otherwise to promote the *
26 * sale, use or other dealings in this Software without prior written *
28 ****************************************************************************/
30 /****************************************************************************
31 * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
32 * and: Eric S. Raymond <esr@snark.thyrsus.com> *
33 ****************************************************************************/
36 * $Id: SigAction.h,v 1.10 2020/02/02 23:34:34 tom Exp $
38 * This file exists to handle non-POSIX systems which don't have <unistd.h>,
39 * and usually no sigaction() nor <termios.h>
45 #ifndef HAVE_SIGACTION
46 #define HAVE_SIGACTION 0
55 #if !HAVE_TYPE_SIGACTION
56 typedef struct sigaction sigaction_t;
59 #else /* !HAVE_SIGACTION */
67 #define SIG_UNBLOCK 01
70 #define SIG_SETMASK 02
73 * <bsd/signal.h> is in the Linux 1.2.8 + gcc 2.7.0 configuration,
74 * and is useful for testing this header file.
77 #include <bsd/signal.h>
80 typedef struct sigvec sigaction_t;
82 #define sigset_t _nc_sigset_t
83 typedef unsigned long sigset_t;
86 #define sa_mask sv_mask
88 #define sa_handler sv_handler
90 #define sa_flags sv_flags
93 #define sigaction _nc_sigaction
95 #define sigprocmask _nc_sigprocmask
97 #define sigemptyset _nc_sigemptyset
99 #define sigsuspend _nc_sigsuspend
101 #define sigdelset _nc_sigdelset
103 #define sigaddset _nc_sigaddset
105 /* tty/lib_tstp.c is the only user */
106 #include <base/sigaction.c>
108 #endif /* HAVE_SIGVEC */
109 #endif /* HAVE_SIGACTION */
110 #endif /* !defined(_SIGACTION_H) */