stdlib.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. /* Workaround for a "misbehaviour" when compiling resource scripts using
  16. * eMbedded Visual C++. The standard .rc file includes windows header files,
  17. * which in turn include stdlib.h, which results in warnings and errors
  18. */
  19. #if !defined (RC_INVOKED)
  20. # if !defined (_STLP_OUTERMOST_HEADER_ID)
  21. # define _STLP_OUTERMOST_HEADER_ID 0x265
  22. # include <stl/_cprolog.h>
  23. # elif (_STLP_OUTERMOST_HEADER_ID == 0x265) && !defined (_STLP_DONT_POP_HEADER_ID)
  24. # define _STLP_DONT_POP_HEADER_ID
  25. # endif
  26. # if defined (_STLP_MSVC_LIB) || (defined (__GNUC__) && defined (__MINGW32__)) || \
  27. defined (__BORLANDC__) || defined (__DMC__) || \
  28. (defined (__HP_aCC) && defined (_REENTRANT))
  29. /* Native stdlib.h contains errno macro definition making inclusion of native
  30. * errno.h in STLport errno.h impossible. We are then forced to include errno.h
  31. * first.
  32. */
  33. # include "errno.h"
  34. # endif
  35. /*
  36. forward-declaration for _exception struct; prevents warning message
  37. ../include/stdlib.h(817) : warning C4115: '_exception' : named type definition in parentheses
  38. */
  39. # if defined(_STLP_WCE_EVC3)
  40. struct _exception;
  41. # endif
  42. # if defined (_STLP_HAS_INCLUDE_NEXT)
  43. # include_next <stdlib.h>
  44. # else
  45. # include _STLP_NATIVE_C_HEADER(stdlib.h)
  46. # endif
  47. /* on evc3/evc4 including stdlib.h also defines setjmp macro */
  48. # if defined (_STLP_WCE)
  49. # define _STLP_NATIVE_SETJMP_H_INCLUDED
  50. # endif
  51. # if (_STLP_OUTERMOST_HEADER_ID == 0x265)
  52. # if ! defined (_STLP_DONT_POP_HEADER_ID)
  53. # include <stl/_epilog.h>
  54. # undef _STLP_OUTERMOST_HEADER_ID
  55. # else
  56. # undef _STLP_DONT_POP_HEADER_ID
  57. # endif
  58. # endif
  59. #endif /* RC_INVOKED */