@ -12,6 +12,8 @@ extern "C" {
# endif
# endif
# include "_ansi.h"
# include "_ansi.h"
# include <sys/features.h>
# include <sys/types.h>
typedef unsigned long sigset_t ;
typedef unsigned long sigset_t ;
@ -32,21 +34,50 @@ struct sigaction {
/* Adjusted to glibc; other values. */
/* Adjusted to glibc; other values. */
# define SA_NOCLDSTOP 1 /* only value supported now for sa_flags */
# define SA_NOCLDSTOP 1 /* only value supported now for sa_flags */
# if __POSIX_VISIBLE
# define SIG_SETMASK 2 /* set mask with sigprocmask() */
# define SIG_SETMASK 2 /* set mask with sigprocmask() */
# define SIG_BLOCK 0 /* set of signals to block */
# define SIG_BLOCK 0 /* set of signals to block */
# define SIG_UNBLOCK 1 /* set of signals to, well, unblock */
# define SIG_UNBLOCK 1 /* set of signals to, well, unblock */
int sigprocmask ( int __how , const sigset_t * __a , sigset_t * __b ) ;
# endif /* __POSIX_VISIBLE */
# ifdef _LIBC
int _kill ( pid_t , int ) ;
# endif
# if __POSIX_VISIBLE
int kill ( pid_t , int ) ;
int sigaddset ( sigset_t * , const int ) ;
int sigdelset ( sigset_t * , const int ) ;
int sigismember ( const sigset_t * , int ) ;
int sigfillset ( sigset_t * ) ;
int sigemptyset ( sigset_t * ) ;
/* These depend upon the type of sigset_t, which right now
/* These depend upon the type of sigset_t, which right now
is always a long . . They ' re in the POSIX namespace , but
is always a long . . They ' re in the POSIX namespace , but
are not ANSI . */
are not ANSI . */
# define sigaddset(what,sig) (*(what) |= (1<<(sig)))
# define sigaddset(what,sig) (*(what) |= (1<<(sig)), 0)
# define sigemptyset(what) (*(what) = 0)
# define sigdelset(what,sig) (*(what) &= ~(1<<(sig)), 0)
# define sigemptyset(what) (*(what) = 0, 0)
# define sigfillset(what) (*(what) = ~(0), 0)
# define sigismember(what,sig) (((*(what)) & (1<<(sig))) != 0)
int sigprocmask ( int __how , const sigset_t * __a , sigset_t * __b ) ;
# endif /* __POSIX_VISIBLE */
/* Using __MISC_VISIBLE until POSIX Issue 8 is officially released */
# if __MISC_VISIBLE
/* POSIX Issue 8 adds sig2str() and str2sig() */
# define SIG2STR_MAX 17 /* (sizeof("RTMAX+") + sizeof("4294967295") - 1) */
int sig2str ( int , char * ) ;
int str2sig ( const char * __restrict , int * __restrict ) ;
/* The first argument is really a pid_t, but that's just a typedef'd
# endif /* __MISC_VISIBLE */
int , so let ' s avoid requiring sys / types only for this declaration . */
int kill ( int , int ) ;
# define SIGHUP 1
# define SIGHUP 1
# define SIGINT 2
# define SIGINT 2