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.

72 lines
1.9 KiB

  1. /***
  2. *setjmpex.h - definitions/declarations for extended setjmp/longjmp routines
  3. *
  4. * Copyright (c) 1993-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file causes _setjmpex to be called which will enable safe
  8. * setjmp/longjmp that work correctly with try/except/finally.
  9. *
  10. * [Public]
  11. *
  12. *Revision History:
  13. * 03-23-93 SRW Created.
  14. * 04-23-93 SRW Modified to not use a global variable.
  15. * 10-11-93 GJF Moved into crtwin32 tree (Dolphin product), over-
  16. * writing Jonm's stub.
  17. * 01-13-94 PML #define longjmp so setjmp still an intrinsic
  18. * 02-11-95 CFW Add _CRTBLD to avoid users getting wrong headers.
  19. * 02-14-95 CFW Clean up Mac merge.
  20. * 12-14-95 JWM Add "#pragma once".
  21. * 04-15-95 BWT Add _setjmpVfp (setjmp with Virtual Frame Pointer) for MIPS
  22. * 08-13-96 BWT Redefine _setjmpex to _setjmpVfp on MIPS also
  23. * 02-24-97 GJF Detab-ed.
  24. * 05-17-99 PML Remove all Macintosh support.
  25. * 07-15-01 PML Remove all ALPHA, MIPS, and PPC code
  26. *
  27. ****/
  28. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  29. #pragma once
  30. #endif
  31. #ifndef _INC_SETJMPEX
  32. #define _INC_SETJMPEX
  33. #if !defined(_WIN32)
  34. #error ERROR: Only Win32 target supported!
  35. #endif
  36. #ifndef _CRTBLD
  37. /* This version of the header files is NOT for user programs.
  38. * It is intended for use when building the C runtimes ONLY.
  39. * The version intended for public use will not have this message.
  40. */
  41. #error ERROR: Use of C runtime library internal header file.
  42. #endif /* _CRTBLD */
  43. /*
  44. * Definitions specific to particular setjmp implementations.
  45. */
  46. #if defined(_M_IX86)
  47. /*
  48. * MS compiler for x86
  49. */
  50. #define setjmp _setjmp
  51. #define longjmp _longjmpex
  52. #else
  53. #ifdef setjmp
  54. #undef setjmp
  55. #endif
  56. #define setjmp _setjmpex
  57. #endif
  58. #include <setjmp.h>
  59. #endif /* _INC_SETJMPEX */