• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 1999
3  * Boris Fomitchev
4  *
5  * This material is provided "as is", with absolutely no warranty expressed
6  * or implied. Any use is at your own risk.
7  *
8  * Permission to use or copy this software for any purpose is hereby granted
9  * without fee, provided the above notices are retained on all copies.
10  * Permission to modify the code and to distribute modified code is granted,
11  * provided the above notices are retained, and a notice that the code was
12  * modified is included with the above copyright notice.
13  *
14  */
15 
16 #ifndef _STLP_INTERNAL_CSETJMP
17 #define _STLP_INTERNAL_CSETJMP
18 
19 // if the macro is on, the header is already there
20 #if !defined (setjmp)
21 #  if defined (_STLP_USE_NEW_C_HEADERS)
22 #    if defined (_STLP_HAS_INCLUDE_NEXT)
23 #      include_next <csetjmp>
24 #    else
25 #      include _STLP_NATIVE_CPP_C_HEADER(csetjmp)
26 #    endif
27 #  else
28 #    include <setjmp.h>
29 #  endif
30 #endif
31 
32 #if defined (_STLP_IMPORT_VENDOR_CSTD)
33 
34 #  if defined (__BORLANDC__) && defined (_STLP_USE_NEW_C_HEADERS)
35 /* For Borland, even if stdjmp.h is included symbols won't be in global namespace
36  * so we need to reach them in vendor namespace:
37  */
38 #    undef _STLP_NATIVE_SETJMP_H_INCLUDED
39 #  endif
40 
41 _STLP_BEGIN_NAMESPACE
42 #  if !defined (_STLP_NATIVE_SETJMP_H_INCLUDED)
43 using _STLP_VENDOR_CSTD::jmp_buf;
44 #  else
45 // if setjmp.h was included first, this is in global namespace, not in
46 // vendor's std.  - 2005-08-04, ptr
47 using ::jmp_buf;
48 #  endif
49 #  if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
50 #    if !defined (setjmp)
51 #      if !defined (__MSL__) || ((__MSL__ > 0x7001) && (__MSL__ < 0x8000))
52 #        ifndef _STLP_NATIVE_SETJMP_H_INCLUDED
53 using _STLP_VENDOR_CSTD::setjmp;
54 #        else
55 using ::setjmp;
56 #        endif
57 #      endif
58 #    endif
59 #    if !defined (_STLP_NATIVE_SETJMP_H_INCLUDED)
60 using _STLP_VENDOR_CSTD::longjmp;
61 #    else
62 using ::longjmp;
63 #    endif
64 #  endif
65 _STLP_END_NAMESPACE
66 #endif /* _STLP_IMPORT_VENDOR_CSTD */
67 
68 #endif
69