_csetjmp.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. #ifndef _STLP_INTERNAL_CSETJMP
  16. #define _STLP_INTERNAL_CSETJMP
  17. // if the macro is on, the header is already there
  18. #if !defined (setjmp)
  19. # if defined (_STLP_USE_NEW_C_HEADERS)
  20. # if defined (_STLP_HAS_INCLUDE_NEXT)
  21. # include_next <csetjmp>
  22. # else
  23. # include _STLP_NATIVE_CPP_C_HEADER(csetjmp)
  24. # endif
  25. # else
  26. # include <setjmp.h>
  27. # endif
  28. #endif
  29. #if defined (_STLP_IMPORT_VENDOR_CSTD)
  30. # if defined (__BORLANDC__) && defined (_STLP_USE_NEW_C_HEADERS)
  31. /* For Borland, even if stdjmp.h is included symbols won't be in global namespace
  32. * so we need to reach them in vendor namespace:
  33. */
  34. # undef _STLP_NATIVE_SETJMP_H_INCLUDED
  35. # endif
  36. _STLP_BEGIN_NAMESPACE
  37. # if !defined (_STLP_NATIVE_SETJMP_H_INCLUDED)
  38. using _STLP_VENDOR_CSTD::jmp_buf;
  39. # else
  40. // if setjmp.h was included first, this is in global namespace, not in
  41. // vendor's std. - 2005-08-04, ptr
  42. using ::jmp_buf;
  43. # endif
  44. # if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
  45. # if !defined (setjmp)
  46. # if !defined (__MSL__) || ((__MSL__ > 0x7001) && (__MSL__ < 0x8000))
  47. # ifndef _STLP_NATIVE_SETJMP_H_INCLUDED
  48. using _STLP_VENDOR_CSTD::setjmp;
  49. # else
  50. using ::setjmp;
  51. # endif
  52. # endif
  53. # endif
  54. # if !defined (_STLP_NATIVE_SETJMP_H_INCLUDED)
  55. using _STLP_VENDOR_CSTD::longjmp;
  56. # else
  57. using ::longjmp;
  58. # endif
  59. # endif
  60. _STLP_END_NAMESPACE
  61. #endif /* _STLP_IMPORT_VENDOR_CSTD */
  62. #endif