exception 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /******************************************************************************/
  2. /* This file was taken from STLport <www.stlport.org> and modified by */
  3. /* Texas Instruments. */
  4. /******************************************************************************/
  5. /*
  6. * Copyright (c) 1996,1997
  7. * Silicon Graphics Computer Systems, Inc.
  8. *
  9. * Copyright (c) 1999
  10. * Boris Fomitchev
  11. *
  12. * Copyright (c) 2014-2014 Texas Instruments Incorporated
  13. *
  14. * This material is provided "as is", with absolutely no warranty expressed
  15. * or implied. Any use is at your own risk.
  16. *
  17. * Permission to use or copy this software for any purpose is hereby granted
  18. * without fee, provided the above notices are retained on all copies.
  19. * Permission to modify the code and to distribute modified code is granted,
  20. * provided the above notices are retained, and a notice that the code was
  21. * modified is included with the above copyright notice.
  22. */
  23. // This header exists solely for portability. Normally it just includes
  24. // the native header <exception>.
  25. #ifndef _STLP_EXCEPTION
  26. #if !defined (_STLP_OUTERMOST_HEADER_ID)
  27. # define _STLP_OUTERMOST_HEADER_ID 0x423
  28. # include <s__prolog.h>
  29. #elif (_STLP_OUTERMOST_HEADER_ID == 0x423)
  30. # define _STLP_DONT_POP_HEADER_ID
  31. # define _STLP_EXCEPTION
  32. #endif
  33. #if (_STLP_OUTERMOST_HEADER_ID == 0x423) && !defined (_STLP_DONT_POP_HEADER_ID)
  34. # ifndef _STLP_INTERNAL_EXCEPTION
  35. # include <s__exception.h>
  36. # endif
  37. #endif
  38. #if (_STLP_OUTERMOST_HEADER_ID != 0x423) || defined (_STLP_DONT_POP_HEADER_ID) || defined (_STLP_IMPORT_VENDOR_STD)
  39. /* If we are here it means that we are in an include called
  40. * from the native lib which means that we can simply forward this
  41. * call to the native exception header:
  42. */
  43. # if defined (_STLP_HAS_INCLUDE_NEXT)
  44. #include <e_exception>
  45. # else
  46. # include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception)
  47. # endif
  48. #endif
  49. #if (_STLP_OUTERMOST_HEADER_ID == 0x423)
  50. # if !defined(_STLP_DONT_POP_HEADER_ID)
  51. # include <s__epilog.h>
  52. # undef _STLP_OUTERMOST_HEADER_ID
  53. # else
  54. # undef _STLP_DONT_POP_HEADER_ID
  55. # endif
  56. #endif
  57. #endif /* _STLP_EXCEPTION */
  58. // Local Variables:
  59. // mode:C++
  60. // End: