epoc32/include/tools/stlport/errno.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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 #if !defined (_STLP_OUTERMOST_HEADER_ID)
    17 #  define _STLP_OUTERMOST_HEADER_ID 0x205
    18 #  include <stl/_prolog.h>
    19 #elif (_STLP_OUTERMOST_HEADER_ID == 0x205) && !defined (_STLP_DONT_POP_HEADER_ID)
    20 #  define _STLP_DONT_POP_HEADER_ID
    21 #endif
    22 
    23 #ifdef _STLP_WCE
    24 // only show message when directly including this file in a non-library build
    25 #  if !defined(__BUILDING_STLPORT) && (_STLP_OUTERMOST_HEADER_ID == 0x205)
    26 #    pragma message("eMbedded Visual C++ 3 and .NET don't have a errno.h header; STLport won't include native errno.h here")
    27 #  endif
    28 #else
    29 #  ifndef errno
    30 /* We define the following macro first to guaranty the header reentrancy: */
    31 #    define _STLP_NATIVE_ERRNO_H_INCLUDED
    32 #    include _STLP_NATIVE_C_HEADER(errno.h)
    33 #  endif /* errno */
    34 
    35 #  if !defined (_STLP_NATIVE_ERRNO_H_INCLUDED)
    36 /* If errno has been defined before inclusion of native errno.h including it from STLport errno.h
    37  * becomes impossible because if:
    38  * #define errno foo
    39  * then
    40  * #include _STLP_NATIVE_C_HEADER(errno.h)
    41  * becomes:
    42  * #include _STLP_NATIVE_C_HEADER(foo.h)
    43  *
    44  * To fix this problem you have to find where this definition comes from and include errno.h before it.
    45  */
    46 #    error errno has been defined before inclusion of errno.h header.
    47 #  endif
    48 
    49 #  ifdef __cplusplus
    50 #    ifndef errno /* errno still not defined */
    51 _STLP_BEGIN_NAMESPACE
    52 #      if !defined (__BORLANDC__)
    53 using ::errno;
    54 #      else
    55 using _STLP_VENDOR_CSTD::errno;
    56 #      endif
    57 _STLP_END_NAMESPACE
    58 #   endif /* errno */
    59 #  endif /* __cplusplus */
    60 
    61 #endif
    62 
    63 #if (_STLP_OUTERMOST_HEADER_ID == 0x205)
    64 #  if ! defined (_STLP_DONT_POP_HEADER_ID)
    65 #    include <stl/_epilog.h>
    66 #    undef  _STLP_OUTERMOST_HEADER_ID
    67 #  endif
    68 #  undef  _STLP_DONT_POP_HEADER_ID
    69 #endif
    70 
    71 /* Local Variables:
    72  * mode:C++
    73  * End:
    74  */