1 /***
2 *setjmpex.h - definitions/declarations for extended setjmp/longjmp routines
3 *
4 *           Copyright (c) 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)
22 #error ERROR: Only Win32 target supported!
23 #endif
Lines 24 ... 28 are skipped.
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 #else
40
41 #ifdef setjmp
42 #undef setjmp
43 #endif
44 #define setjmp _setjmpex
45
46 #endif
47
48 #include <setjmp.h>
49
50 #endif  /* _INC_SETJMPEX */
51