STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
setjmpex.h
Go to the documentation of this file.
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 #pragma once
15 
16 #ifndef _INC_SETJMPEX
17 #define _INC_SETJMPEX
18 
19 #if !defined (_WIN32)
20 #error ERROR: Only Win32 target supported!
21 #endif /* !defined (_WIN32) */
22 
23 /*
24  * Definitions specific to particular setjmp implementations.
25  */
26 
27 #if defined (_M_IX86)
28 
29 /*
30  * MS compiler for x86
31  */
32 
33 #define setjmp _setjmp
34 #define longjmp _longjmpex
35 
36 #else /* defined (_M_IX86) */
37 
38 #ifdef setjmp
39 #undef setjmp
40 #endif /* setjmp */
41 #define setjmp _setjmpex
42 
43 #endif /* defined (_M_IX86) */
44 
45 #include <setjmp.h>
46 
47 #endif /* _INC_SETJMPEX */