home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / setjmpex.h < prev    next >
C/C++ Source or Header  |  1998-06-16  |  974b  |  56 lines

  1. /***
  2. *setjmpex.h - definitions/declarations for extended setjmp/longjmp routines
  3. *
  4. *       Copyright (c) 1993-1997, 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. ****/
  13.  
  14. #if     _MSC_VER > 1000
  15. #pragma once
  16. #endif
  17.  
  18. #ifndef _INC_SETJMPEX
  19. #define _INC_SETJMPEX
  20.  
  21. #if     !defined(_WIN32) && !defined(_MAC)
  22. #error ERROR: Only Mac or Win32 targets supported!
  23. #endif
  24.  
  25.  
  26. /*
  27.  * Definitions specific to particular setjmp implementations.
  28.  */
  29.  
  30. #if     defined(_M_IX86)
  31.  
  32. /*
  33.  * MS compiler for x86
  34.  */
  35.  
  36. #define setjmp  _setjmp
  37. #define longjmp _longjmpex
  38.  
  39. #elif   defined(_M_MRX000)
  40.  
  41. #if     _MSC_VER >= 1100
  42. #define _setjmpex _setjmpexVfp
  43. #endif
  44.  
  45. #define setjmp _setjmpex
  46.  
  47. #else
  48.  
  49. #define setjmp _setjmpex
  50.  
  51. #endif
  52.  
  53. #include <setjmp.h>
  54.  
  55. #endif  /* _INC_SETJMPEX */
  56.