/***************************************************************************
 *  Pinfo is a ncurses based lynx style info documentation browser
 *
 *  Copyright (C) 1999  Przemek Borys <pborys@dione.ids.pl>
 *  Copyright (C) 2005  Bas Zoetekouw <bas@debian.org>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of version 2 of the GNU General Public License as
 *  published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 *  USA
 ***************************************************************************/

#ifndef _SIG_H
#define _SIG_H

#ifndef sigmask
/* from bash */
#define sigmask(x) (1 << ((x)-1))
/* from glibc */
/* #define sigmask(sig)  (((sigset_t) 1) << ((sig) - 1)) */
#endif /* HAVE_SIGMASK */

#if !defined (SIG_BLOCK)
#define SIG_UNBLOCK   1
#define SIG_BLOCK     2
#define SIG_SETMASK   3
#endif /* SIG_BLOCK */

/* #define BLOCK_SIGNAL(sig, nvar, ovar) \
   sigemptyset (&nvar); \
   sigaddset (&nvar, sig); \
   sigemptyset (&ovar); \
   sigprocmask (SIG_BLOCK, &nvar, &ovar) */

#ifndef HAVE_SIGBLOCK
int sigblock (int mask);
#endif /* HAVE_SIGBLOCK */

#endif /* _SIG_H */
