/* Existing defs in pqsignal.h */
typedef void (*pqsigfunc) (int);
extern pqsigfunc pqsignal(int signo, pqsigfunc func);

/* New defs */

void pg_signal_initialize(void);
int sigsetmask(int mask);
#define sigmask(sig) (1 << (sig - 1))

int kill(int pid, int sig);
int raise(int sig);

extern HANDLE pg_main_thread_handle;
#define PG_POLL_SIGNALS() WaitForSingleObjectEx(pg_main_thread_handle,0,TRUE);

#undef SIGHUP
#define	SIGHUP	1	/* hangup */

#undef	SIGINT	
#define	SIGINT	2	/* interrupt */

#undef	SIGQUIT	
#define	SIGQUIT	3	/* quit */

#undef	SIGILL	
#define	SIGILL	4	/* illegal instruction (not reset when caught) */

#undef	SIGTRAP	
#define	SIGTRAP	5	/* trace trap (not reset when caught) */

#undef	SIGABRT	
#define	SIGABRT	6	/* abort(void) */

#undef	SIGIOT	
#define	SIGIOT	SIGABRT	/* compatibility */

#undef	SIGEMT	
#define	SIGEMT	7	/* EMT instruction */

#undef	SIGFPE	
#define	SIGFPE	8	/* floating point exception */

#undef	SIGKILL	
#define	SIGKILL	9	/* kill (cannot be caught or ignored) */

#undef	SIGBUS	
#define	SIGBUS	10	/* bus error */

#undef	SIGSEGV	
#define	SIGSEGV	11	/* segmentation violation */

#undef	SIGSYS	
#define	SIGSYS	12	/* non-existent system call invoked */

#undef	SIGSYS	
#define	SIGPIPE	13	/* write on a pipe with no one to read it */

#undef	SIGALRM	
#define	SIGALRM	14	/* alarm clock */

#undef	SIGTERM	
#define	SIGTERM	15	/* software termination signal from kill */

#undef	SIGURG	
#define	SIGURG	16	/* urgent condition on IO channel */

#undef	SIGSTOP	
#define	SIGSTOP	17	/* sendable stop signal not from tty */

#undef	SIGTSTP	
#define	SIGTSTP	18	/* stop signal from tty */

#undef	SIGCONT	
#define	SIGCONT	19	/* continue a stopped process */

#undef	SIGCHLD	
#define	SIGCHLD	20	/* to parent on child stop or exit */

#undef	SIGTTIN	
#define	SIGTTIN	21	/* to readers pgrp upon background tty read */

#undef	SIGTTOU	
#define	SIGTTOU	22	/* like TTIN for output if (tp->t_local&LTOSTOP) */

#undef	SIGIO	
#define	SIGIO	23	/* input/output possible signal */

#undef	SIGXCPU	
#define	SIGXCPU	24	/* exceeded CPU time limit */

#undef	SIGXFSZ	
#define	SIGXFSZ	25	/* exceeded file size limit */

#undef	SIGVTALR
#define	SIGVTALRM 26	/* virtual time alarm */

#undef	SIGPROF	
#define	SIGPROF	27	/* profiling time alarm */

#undef SIGWINCH 
#define SIGWINCH 28	/* window size changes */

#undef SIGINFO	
#define SIGINFO	29	/* information request */

#undef SIGUSR1 
#define SIGUSR1 30	/* user defined signal 1 */

#undef SIGUSR2 
#define SIGUSR2 31	/* user defined signal 2 */


#define SIG_DFL ((pqsigfunc)0)
#define SIG_ERR ((pqsigfunc)-1)
#define SIG_IGN ((pqsigfunc)1)
