Back to index

tetex-bin  3.0
SigAction.h
Go to the documentation of this file.
00001 /****************************************************************************
00002  * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
00003  *                                                                          *
00004  * Permission is hereby granted, free of charge, to any person obtaining a  *
00005  * copy of this software and associated documentation files (the            *
00006  * "Software"), to deal in the Software without restriction, including      *
00007  * without limitation the rights to use, copy, modify, merge, publish,      *
00008  * distribute, distribute with modifications, sublicense, and/or sell       *
00009  * copies of the Software, and to permit persons to whom the Software is    *
00010  * furnished to do so, subject to the following conditions:                 *
00011  *                                                                          *
00012  * The above copyright notice and this permission notice shall be included  *
00013  * in all copies or substantial portions of the Software.                   *
00014  *                                                                          *
00015  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
00016  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
00017  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
00018  * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
00019  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
00020  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
00021  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
00022  *                                                                          *
00023  * Except as contained in this notice, the name(s) of the above copyright   *
00024  * holders shall not be used in advertising or otherwise to promote the     *
00025  * sale, use or other dealings in this Software without prior written       *
00026  * authorization.                                                           *
00027  ****************************************************************************/
00028 
00029 /****************************************************************************
00030  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
00031  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
00032  ****************************************************************************/
00033 
00034 /*
00035  * $Id: SigAction.h,v 1.7 2003/12/07 01:00:03 tom Exp $
00036  *
00037  * This file exists to handle non-POSIX systems which don't have <unistd.h>,
00038  * and usually no sigaction() nor <termios.h>
00039  */
00040 
00041 #ifndef _SIGACTION_H
00042 #define _SIGACTION_H
00043 
00044 #ifndef HAVE_SIGACTION
00045 #define HAVE_SIGACTION 0
00046 #endif
00047 
00048 #ifndef HAVE_SIGVEC
00049 #define HAVE_SIGVEC 0
00050 #endif
00051 
00052 #if HAVE_SIGACTION
00053 
00054 #if !HAVE_TYPE_SIGACTION
00055 typedef struct sigaction sigaction_t;
00056 #endif
00057 
00058 #else  /* !HAVE_SIGACTION */
00059 
00060 #if HAVE_SIGVEC
00061 
00062 #if HAVE_LIBC_H
00063 #include <libc.h>
00064 #endif
00065 
00066 #undef  SIG_BLOCK
00067 #define SIG_BLOCK       00
00068 
00069 #undef  SIG_UNBLOCK
00070 #define SIG_UNBLOCK     01
00071 
00072 #undef  SIG_SETMASK
00073 #define SIG_SETMASK     02
00074 
00075        /*
00076         * <bsd/signal.h> is in the Linux 1.2.8 + gcc 2.7.0 configuration,
00077         * and is useful for testing this header file.
00078         */
00079 #if HAVE_BSD_SIGNAL_H
00080 #include <bsd/signal.h>
00081 #endif
00082 
00083 typedef struct sigvec sigaction_t;
00084 
00085 #define sigset_t _nc_sigset_t
00086 typedef unsigned long sigset_t;
00087 
00088 #undef  sa_mask
00089 #define sa_mask sv_mask
00090 #undef  sa_handler
00091 #define sa_handler sv_handler
00092 #undef  sa_flags
00093 #define sa_flags sv_flags
00094 
00095 #undef  sigaction
00096 #define sigaction   _nc_sigaction
00097 #undef  sigprocmask
00098 #define sigprocmask _nc_sigprocmask
00099 #undef  sigemptyset
00100 #define sigemptyset _nc_sigemptyset
00101 #undef  sigsuspend
00102 #define sigsuspend  _nc_sigsuspend
00103 #undef  sigdelset
00104 #define sigdelset   _nc_sigdelset
00105 #undef  sigaddset
00106 #define sigaddset   _nc_sigaddset
00107 
00108 /* tty/lib_tstp.c is the only user */
00109 #include <base/sigaction.c>
00110 
00111 #endif /* HAVE_SIGVEC */
00112 #endif /* HAVE_SIGACTION */
00113 #endif /* !defined(_SIGACTION_H) */