Leaked source code of windows server 2003
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.

100 lines
2.4 KiB

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