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.

79 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. *
  26. ****/
  27. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  28. #pragma once
  29. #endif
  30. #ifndef _INC_SETJMPEX
  31. #define _INC_SETJMPEX
  32. #if !defined(_WIN32)
  33. #error ERROR: Only Win32 target supported!
  34. #endif
  35. #ifndef _CRTBLD
  36. /* This version of the header files is NOT for user programs.
  37. * It is intended for use when building the C runtimes ONLY.
  38. * The version intended for public use will not have this message.
  39. */
  40. #error ERROR: Use of C runtime library internal header file.
  41. #endif /* _CRTBLD */
  42. /*
  43. * Definitions specific to particular setjmp implementations.
  44. */
  45. #if defined(_M_IX86)
  46. /*
  47. * MS compiler for x86
  48. */
  49. #define setjmp _setjmp
  50. #define longjmp _longjmpex
  51. #elif defined(_M_MRX000)
  52. #if _MSC_VER >= 1100 /*IFSTRIP=IGN*/
  53. #define _setjmpex _setjmpexVfp
  54. #endif
  55. #define setjmp _setjmpex
  56. #else
  57. #ifdef setjmp
  58. #undef setjmp
  59. #endif
  60. #define setjmp _setjmpex
  61. #endif
  62. #include <setjmp.h>
  63. #endif /* _INC_SETJMPEX */