exception 2.0 KB

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