1157016Sdes/*	$OpenBSD: SigAction.h,v 1.3 2001/01/22 18:01:32 millert Exp $	*/
298937Sdes
398937Sdes/****************************************************************************
4157016Sdes * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
598937Sdes *                                                                          *
698937Sdes * Permission is hereby granted, free of charge, to any person obtaining a  *
798937Sdes * copy of this software and associated documentation files (the            *
898937Sdes * "Software"), to deal in the Software without restriction, including      *
998937Sdes * without limitation the rights to use, copy, modify, merge, publish,      *
1098937Sdes * distribute, distribute with modifications, sublicense, and/or sell       *
1198937Sdes * copies of the Software, and to permit persons to whom the Software is    *
1298937Sdes * furnished to do so, subject to the following conditions:                 *
1398937Sdes *                                                                          *
1498937Sdes * The above copyright notice and this permission notice shall be included  *
1598937Sdes * in all copies or substantial portions of the Software.                   *
1698937Sdes *                                                                          *
1798937Sdes * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
1898937Sdes * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
1998937Sdes * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
2098937Sdes * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
2198937Sdes * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
2298937Sdes * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
2398937Sdes * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
2498937Sdes *                                                                          *
2598937Sdes * Except as contained in this notice, the name(s) of the above copyright   *
2698937Sdes * holders shall not be used in advertising or otherwise to promote the     *
2798937Sdes * sale, use or other dealings in this Software without prior written       *
2898937Sdes * authorization.                                                           *
2998937Sdes ****************************************************************************/
3098937Sdes
3198937Sdes/****************************************************************************
3298937Sdes *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
3398937Sdes *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
3498937Sdes ****************************************************************************/
3598937Sdes
3698937Sdes/*
37157016Sdes * $From: SigAction.h,v 1.6 2000/12/10 02:36:10 tom Exp $
3898937Sdes *
3998937Sdes * This file exists to handle non-POSIX systems which don't have <unistd.h>,
4098937Sdes * and usually no sigaction() nor <termios.h>
4198937Sdes */
4298937Sdes
43157016Sdes/* OPENBSD ORIGINAL: lib/libcurses/SigAction.h */
44157016Sdes
4598937Sdes#ifndef _SIGACTION_H
4698937Sdes#define _SIGACTION_H
4798937Sdes
4898937Sdes#if !defined(HAVE_SIGACTION) && defined(HAVE_SIGVEC)
4998937Sdes
5098937Sdes#undef  SIG_BLOCK
5198937Sdes#define SIG_BLOCK       00
5298937Sdes
5398937Sdes#undef  SIG_UNBLOCK
5498937Sdes#define SIG_UNBLOCK     01
5598937Sdes
5698937Sdes#undef  SIG_SETMASK
5798937Sdes#define SIG_SETMASK     02
5898937Sdes
5998937Sdes/*
6098937Sdes * <bsd/signal.h> is in the Linux 1.2.8 + gcc 2.7.0 configuration,
6198937Sdes * and is useful for testing this header file.
6298937Sdes */
6398937Sdes#if HAVE_BSD_SIGNAL_H
6498937Sdes# include <bsd/signal.h>
6598937Sdes#endif
6698937Sdes
6798937Sdesstruct sigaction
6898937Sdes{
6998937Sdes	struct sigvec sv;
7098937Sdes};
7198937Sdes
7298937Sdestypedef unsigned long sigset_t;
7398937Sdes
7498937Sdes#undef  sa_mask
7598937Sdes#define sa_mask sv.sv_mask
7698937Sdes#undef  sa_handler
7798937Sdes#define sa_handler sv.sv_handler
7898937Sdes#undef  sa_flags
7998937Sdes#define sa_flags sv.sv_flags
8098937Sdes
8198937Sdesint sigaction(int sig, struct sigaction *sigact, struct sigaction *osigact);
8298937Sdesint sigprocmask (int how, sigset_t *mask, sigset_t *omask);
8398937Sdesint sigemptyset (sigset_t *mask);
8498937Sdesint sigsuspend (sigset_t *mask);
8598937Sdesint sigdelset (sigset_t *mask, int sig);
8698937Sdesint sigaddset (sigset_t *mask, int sig);
8798937Sdes
8898937Sdes#endif /* !defined(HAVE_SIGACTION) && defined(HAVE_SIGVEC) */
8998937Sdes
9098937Sdes#endif /* !defined(_SIGACTION_H) */
91