1 /*************************************************************************** 2 * Pinfo is a ncurses based lynx style info documentation browser 3 * 4 * Copyright (C) 1999 Przemek Borys <pborys@dione.ids.pl> 5 * Copyright (C) 2005 Bas Zoetekouw <bas@debian.org> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of version 2 of the GNU General Public License as 9 * published by the Free Software Foundation. 10 * 11 * This program is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 19 * USA 20 ***************************************************************************/ 21 22 #ifndef _SIG_H 23 #define _SIG_H 24 25 #ifndef sigmask 26 /* from bash */ 27 #define sigmask(x) (1 << ((x)-1)) 28 /* from glibc */ 29 /* #define sigmask(sig) (((sigset_t) 1) << ((sig) - 1)) */ 30 #endif /* HAVE_SIGMASK */ 31 32 #if !defined (SIG_BLOCK) 33 #define SIG_UNBLOCK 1 34 #define SIG_BLOCK 2 35 #define SIG_SETMASK 3 36 #endif /* SIG_BLOCK */ 37 38 /* #define BLOCK_SIGNAL(sig, nvar, ovar) \ 39 sigemptyset (&nvar); \ 40 sigaddset (&nvar, sig); \ 41 sigemptyset (&ovar); \ 42 sigprocmask (SIG_BLOCK, &nvar, &ovar) */ 43 44 #ifndef HAVE_SIGBLOCK 45 int sigblock (int mask); 46 #endif /* HAVE_SIGBLOCK */ 47 48 #endif /* _SIG_H */ 49