Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _INC_SIGNAL
      7 #define _INC_SIGNAL
      8 
      9 #include <crtdefs.h>
     10 
     11 #ifdef __cplusplus
     12 extern "C" {
     13 #endif
     14 
     15 #ifndef _SIG_ATOMIC_T_DEFINED
     16 #define _SIG_ATOMIC_T_DEFINED
     17   typedef int sig_atomic_t;
     18 #endif
     19 
     20 #define NSIG 23
     21 
     22 #define SIGINT 2
     23 #define SIGILL 4
     24 #define SIGABRT_COMPAT 6
     25 #define SIGFPE 8
     26 #define SIGSEGV 11
     27 #define SIGTERM 15
     28 #define SIGBREAK 21
     29 #define SIGABRT 22       /* used by abort, replace SIGIOT in the future */
     30 #define SIGABRT2 22
     31 
     32 #ifdef _POSIX
     33 #define	SIGHUP	1	/* hangup */
     34 #define	SIGQUIT	3	/* quit */
     35 #define	SIGTRAP	5	/* trace trap (not reset when caught) */
     36 #define SIGIOT  6       /* IOT instruction */
     37 #define	SIGEMT	7	/* EMT instruction */
     38 #define	SIGKILL	9	/* kill (cannot be caught or ignored) */
     39 #define	SIGBUS	10	/* bus error */
     40 #define	SIGSYS	12	/* bad argument to system call */
     41 #define	SIGPIPE	13	/* write on a pipe with no one to read it */
     42 #ifdef __USE_MINGW_ALARM
     43 #define	SIGALRM	14	/* alarm clock */
     44 #endif
     45 #endif
     46 
     47   typedef	void (*__p_sig_fn_t)(int);
     48 
     49 #define SIG_DFL (__p_sig_fn_t)0
     50 #define SIG_IGN (__p_sig_fn_t)1
     51 #define SIG_GET (__p_sig_fn_t)2
     52 #define SIG_SGE (__p_sig_fn_t)3
     53 #define SIG_ACK (__p_sig_fn_t)4
     54 #define SIG_ERR (__p_sig_fn_t)-1
     55 
     56   extern void **__cdecl __pxcptinfoptrs(void);
     57 #define _pxcptinfoptrs (*__pxcptinfoptrs())
     58 
     59   __p_sig_fn_t __cdecl signal(int _SigNum,__p_sig_fn_t _Func);
     60   int __cdecl raise(int _SigNum);
     61 
     62 #ifdef __cplusplus
     63 }
     64 #endif
     65 #endif
     66