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.

119 lines
2.4 KiB

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