errno.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. #if !defined (_STLP_OUTERMOST_HEADER_ID)
  16. # define _STLP_OUTERMOST_HEADER_ID 0x205
  17. # include <stl/_cprolog.h>
  18. #elif (_STLP_OUTERMOST_HEADER_ID == 0x205) && !defined (_STLP_DONT_POP_HEADER_ID)
  19. # define _STLP_DONT_POP_HEADER_ID
  20. #endif
  21. #ifdef _STLP_WCE
  22. /* only show message when directly including this file in a non-library build */
  23. # if !defined(__BUILDING_STLPORT) && (_STLP_OUTERMOST_HEADER_ID == 0x205)
  24. # pragma message("eMbedded Visual C++ 3 and .NET don't have a errno.h header; STLport won't include native errno.h here")
  25. # endif
  26. #else
  27. # ifndef errno
  28. /* We define the following macro first to guaranty the header reentrancy: */
  29. # define _STLP_NATIVE_ERRNO_H_INCLUDED
  30. # if defined (_STLP_HAS_INCLUDE_NEXT)
  31. # include_next <errno.h>
  32. # else
  33. # include _STLP_NATIVE_C_HEADER(errno.h)
  34. # endif
  35. # if defined (__BORLANDC__) && (__BORLANDC__ >= 0x590) && defined (__cplusplus)
  36. _STLP_BEGIN_NAMESPACE
  37. using _STLP_VENDOR_CSTD::__errno;
  38. _STLP_END_NAMESPACE
  39. # endif
  40. # endif /* errno */
  41. # if !defined (_STLP_SGX_CONFIG) && !defined (_STLP_NATIVE_ERRNO_H_INCLUDED)
  42. /* If errno has been defined before inclusion of native errno.h including it from STLport errno.h
  43. * becomes impossible because if:
  44. * #define errno foo
  45. * then
  46. * #include _STLP_NATIVE_C_HEADER(errno.h)
  47. * becomes:
  48. * #include _STLP_NATIVE_C_HEADER(foo.h)
  49. *
  50. * To fix this problem you have to find where this definition comes from and include errno.h before it.
  51. */
  52. # error errno has been defined before inclusion of errno.h header.
  53. # endif
  54. #endif
  55. #if (_STLP_OUTERMOST_HEADER_ID == 0x205)
  56. # if ! defined (_STLP_DONT_POP_HEADER_ID)
  57. # include <stl/_epilog.h>
  58. # undef _STLP_OUTERMOST_HEADER_ID
  59. # endif
  60. # undef _STLP_DONT_POP_HEADER_ID
  61. #endif
  62. /* Local Variables:
  63. * mode: C
  64. * End:
  65. */