signal.h 1.5 KB

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