Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
2.6 KiB

  1. /***
  2. *signal.h - defines signal values and routines
  3. *
  4. * Copyright (c) 1985-1995, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file defines the signal values and declares the signal functions.
  8. * [ANSI/System V]
  9. *
  10. * [Public]
  11. *
  12. ****/
  13. #ifndef _INC_SIGNAL
  14. #define _INC_SIGNAL
  15. #if !defined(_WIN32) && !defined(_MAC)
  16. #error ERROR: Only Mac or Win32 targets supported!
  17. #endif
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  22. #ifndef _CRTAPI1
  23. #if _MSC_VER >= 800 && _M_IX86 >= 300
  24. #define _CRTAPI1 __cdecl
  25. #else
  26. #define _CRTAPI1
  27. #endif
  28. #endif
  29. /* Define _CRTAPI2 (for compatibility with the NT SDK) */
  30. #ifndef _CRTAPI2
  31. #if _MSC_VER >= 800 && _M_IX86 >= 300
  32. #define _CRTAPI2 __cdecl
  33. #else
  34. #define _CRTAPI2
  35. #endif
  36. #endif
  37. /* Define _CRTIMP */
  38. #ifndef _CRTIMP
  39. #ifdef _NTSDK
  40. /* definition compatible with NT SDK */
  41. #define _CRTIMP
  42. #else /* ndef _NTSDK */
  43. /* current definition */
  44. #ifdef _DLL
  45. #define _CRTIMP __declspec(dllimport)
  46. #else /* ndef _DLL */
  47. #define _CRTIMP
  48. #endif /* _DLL */
  49. #endif /* _NTSDK */
  50. #endif /* _CRTIMP */
  51. /* Define __cdecl for non-Microsoft compilers */
  52. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  53. #define __cdecl
  54. #endif
  55. #ifndef _SIG_ATOMIC_T_DEFINED
  56. typedef int sig_atomic_t;
  57. #define _SIG_ATOMIC_T_DEFINED
  58. #endif
  59. #define NSIG 23 /* maximum signal number + 1 */
  60. /* Signal types */
  61. #define SIGINT 2 /* interrupt */
  62. #define SIGILL 4 /* illegal instruction - invalid function image */
  63. #define SIGFPE 8 /* floating point exception */
  64. #define SIGSEGV 11 /* segment violation */
  65. #define SIGTERM 15 /* Software termination signal from kill */
  66. #define SIGBREAK 21 /* Ctrl-Break sequence */
  67. #define SIGABRT 22 /* abnormal termination triggered by abort call */
  68. /* signal action codes */
  69. #define SIG_DFL (void (__cdecl *)(int))0 /* default signal action */
  70. #define SIG_IGN (void (__cdecl *)(int))1 /* ignore signal */
  71. #define SIG_SGE (void (__cdecl *)(int))3 /* signal gets error */
  72. #define SIG_ACK (void (__cdecl *)(int))4 /* acknowledge */
  73. /* signal error value (returned by signal call on error) */
  74. #define SIG_ERR (void (__cdecl *)(int))-1 /* signal error value */
  75. /* pointer to exception information pointers structure */
  76. #if defined(_MT) || defined(_DLL)
  77. extern void * * __cdecl __pxcptinfoptrs(void);
  78. #define _pxcptinfoptrs (*__pxcptinfoptrs())
  79. #else /* ndef _MT && ndef _DLL */
  80. extern void * _pxcptinfoptrs;
  81. #endif /* _MT || _DLL */
  82. /* Function prototypes */
  83. _CRTIMP void (__cdecl * __cdecl signal(int, void (__cdecl *)(int)))(int);
  84. _CRTIMP int __cdecl raise(int);
  85. #ifdef __cplusplus
  86. }
  87. #endif
  88. #endif /* _INC_SIGNAL */