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