1197781Srwatson/**************************************************************************** 2197781Srwatson * Copyright (c) 1998,2000 Free Software Foundation, Inc. * 3197781Srwatson * * 4197781Srwatson * Permission is hereby granted, free of charge, to any person obtaining a * 5197781Srwatson * copy of this software and associated documentation files (the * 6197781Srwatson * "Software"), to deal in the Software without restriction, including * 7197781Srwatson * without limitation the rights to use, copy, modify, merge, publish, * 8197781Srwatson * distribute, distribute with modifications, sublicense, and/or sell * 9197781Srwatson * copies of the Software, and to permit persons to whom the Software is * 10197781Srwatson * furnished to do so, subject to the following conditions: * 11197781Srwatson * * 12197781Srwatson * The above copyright notice and this permission notice shall be included * 13197781Srwatson * in all copies or substantial portions of the Software. * 14197781Srwatson * * 15197781Srwatson * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 16197781Srwatson * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 17197781Srwatson * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 18197781Srwatson * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 19197781Srwatson * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 20197781Srwatson * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 21197781Srwatson * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 22197781Srwatson * * 23197781Srwatson * Except as contained in this notice, the name(s) of the above copyright * 24197781Srwatson * holders shall not be used in advertising or otherwise to promote the * 25197781Srwatson * sale, use or other dealings in this Software without prior written * 26197781Srwatson * authorization. * 27197781Srwatson ****************************************************************************/ 28197781Srwatson 29197781Srwatson/**************************************************************************** 30197781Srwatson * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * 31197781Srwatson * and: Eric S. Raymond <esr@snark.thyrsus.com> * 32197781Srwatson ****************************************************************************/ 33197781Srwatson 34197781Srwatson/* 35197781Srwatson * $Id: SigAction.h,v 1.8 2005/08/06 20:05:32 tom Exp $ 36197781Srwatson * 37197781Srwatson * This file exists to handle non-POSIX systems which don't have <unistd.h>, 38197781Srwatson * and usually no sigaction() nor <termios.h> 39197781Srwatson */ 40197781Srwatson 41197781Srwatson#ifndef _SIGACTION_H 42197781Srwatson#define _SIGACTION_H 43197781Srwatson 44197781Srwatson#ifndef HAVE_SIGACTION 45197781Srwatson#define HAVE_SIGACTION 0 46197781Srwatson#endif 47197781Srwatson 48197781Srwatson#ifndef HAVE_SIGVEC 49197781Srwatson#define HAVE_SIGVEC 0 50197781Srwatson#endif 51197781Srwatson 52197781Srwatson#if HAVE_SIGACTION 53197781Srwatson 54197781Srwatson#if !HAVE_TYPE_SIGACTION 55197781Srwatsontypedef struct sigaction sigaction_t; 56197781Srwatson#endif 57197781Srwatson 58197781Srwatson#else /* !HAVE_SIGACTION */ 59197781Srwatson 60197781Srwatson#if HAVE_SIGVEC 61197781Srwatson 62197781Srwatson#undef SIG_BLOCK 63197781Srwatson#define SIG_BLOCK 00 64197781Srwatson 65197781Srwatson#undef SIG_UNBLOCK 66197781Srwatson#define SIG_UNBLOCK 01 67197781Srwatson 68197781Srwatson#undef SIG_SETMASK 69197781Srwatson#define SIG_SETMASK 02 70197781Srwatson 71197781Srwatson /* 72197781Srwatson * <bsd/signal.h> is in the Linux 1.2.8 + gcc 2.7.0 configuration, 73197781Srwatson * and is useful for testing this header file. 74197781Srwatson */ 75197781Srwatson#if HAVE_BSD_SIGNAL_H 76197781Srwatson#include <bsd/signal.h> 77197781Srwatson#endif 78197781Srwatson 79197781Srwatsontypedef struct sigvec sigaction_t; 80197781Srwatson 81197781Srwatson#define sigset_t _nc_sigset_t 82197781Srwatsontypedef unsigned long sigset_t; 83197781Srwatson 84197781Srwatson#undef sa_mask 85197781Srwatson#define sa_mask sv_mask 86197781Srwatson#undef sa_handler 87197781Srwatson#define sa_handler sv_handler 88197781Srwatson#undef sa_flags 89197781Srwatson#define sa_flags sv_flags 90197781Srwatson 91197781Srwatson#undef sigaction 92197781Srwatson#define sigaction _nc_sigaction 93197781Srwatson#undef sigprocmask 94197781Srwatson#define sigprocmask _nc_sigprocmask 95197781Srwatson#undef sigemptyset 96197781Srwatson#define sigemptyset _nc_sigemptyset 97197781Srwatson#undef sigsuspend 98197781Srwatson#define sigsuspend _nc_sigsuspend 99197781Srwatson#undef sigdelset 100197781Srwatson#define sigdelset _nc_sigdelset 101197781Srwatson#undef sigaddset 102197781Srwatson#define sigaddset _nc_sigaddset 103197781Srwatson 104197781Srwatson/* tty/lib_tstp.c is the only user */ 105197781Srwatson#include <base/sigaction.c> 106197781Srwatson 107197781Srwatson#endif /* HAVE_SIGVEC */ 108197781Srwatson#endif /* HAVE_SIGACTION */ 109197781Srwatson#endif /* !defined(_SIGACTION_H) */ 110197781Srwatson