[857] | 1 | // (C) Copyright John Maddock 2001 - 2002.
|
---|
| 2 | // (C) Copyright Darin Adler 2001.
|
---|
| 3 | // (C) Copyright Jens Maurer 2001.
|
---|
| 4 | // Use, modification and distribution are subject to the
|
---|
| 5 | // Boost Software License, Version 1.0. (See accompanying file
|
---|
| 6 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
---|
| 7 |
|
---|
| 8 | // See http://www.boost.org for most recent version.
|
---|
| 9 |
|
---|
| 10 | // STLPort standard library config:
|
---|
| 11 |
|
---|
| 12 | #if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
---|
| 13 | # include <utility>
|
---|
| 14 | # if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
---|
| 15 | # error "This is not STLPort!"
|
---|
| 16 | # endif
|
---|
| 17 | #endif
|
---|
| 18 |
|
---|
| 19 | //
|
---|
| 20 | // __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
---|
| 21 | // for versions prior to 4.1(beta)
|
---|
| 22 | //
|
---|
| 23 | #if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400)
|
---|
| 24 | # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
---|
| 25 | #endif
|
---|
| 26 |
|
---|
| 27 | //
|
---|
| 28 | // If STLport thinks that there is no partial specialisation, then there is no
|
---|
| 29 | // std::iterator traits:
|
---|
| 30 | //
|
---|
| 31 | #if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION))
|
---|
| 32 | # define BOOST_NO_STD_ITERATOR_TRAITS
|
---|
| 33 | #endif
|
---|
| 34 |
|
---|
| 35 | //
|
---|
| 36 | // No new style iostreams on GCC without STLport's iostreams enabled:
|
---|
| 37 | //
|
---|
| 38 | #if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS))
|
---|
| 39 | # define BOOST_NO_STRINGSTREAM
|
---|
| 40 | #endif
|
---|
| 41 |
|
---|
| 42 | //
|
---|
| 43 | // No new iostreams implies no std::locale, and no std::stringstream:
|
---|
| 44 | //
|
---|
| 45 | #if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS)
|
---|
| 46 | # define BOOST_NO_STD_LOCALE
|
---|
| 47 | # define BOOST_NO_STRINGSTREAM
|
---|
| 48 | #endif
|
---|
| 49 |
|
---|
| 50 | //
|
---|
| 51 | // If the streams are not native, and we have a "using ::x" compiler bug
|
---|
| 52 | // then the io stream facets are not available in namespace std::
|
---|
| 53 | //
|
---|
| 54 | #ifdef _STLPORT_VERSION
|
---|
| 55 | # if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
|
---|
| 56 | # define BOOST_NO_STD_LOCALE
|
---|
| 57 | # endif
|
---|
| 58 | #else
|
---|
| 59 | # if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
|
---|
| 60 | # define BOOST_NO_STD_LOCALE
|
---|
| 61 | # endif
|
---|
| 62 | #endif
|
---|
| 63 |
|
---|
| 64 | //
|
---|
| 65 | // Without member template support enabled, their are no template
|
---|
| 66 | // iterate constructors, and no std::allocator:
|
---|
| 67 | //
|
---|
| 68 | #if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES))
|
---|
| 69 | # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
---|
| 70 | # define BOOST_NO_STD_ALLOCATOR
|
---|
| 71 | #endif
|
---|
| 72 | //
|
---|
| 73 | // however we always have at least a partial allocator:
|
---|
| 74 | //
|
---|
| 75 | #define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
---|
| 76 |
|
---|
| 77 | #if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
|
---|
| 78 | # define BOOST_NO_STD_ALLOCATOR
|
---|
| 79 | #endif
|
---|
| 80 |
|
---|
| 81 | #if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
|
---|
| 82 | # define BOOST_NO_STD_ALLOCATOR
|
---|
| 83 | #endif
|
---|
| 84 |
|
---|
| 85 | //
|
---|
| 86 | // If STLport thinks there is no wchar_t at all, then we have to disable
|
---|
| 87 | // the support for the relevant specilazations of std:: templates.
|
---|
| 88 | //
|
---|
| 89 | #if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT)
|
---|
| 90 | # ifndef BOOST_NO_STD_WSTRING
|
---|
| 91 | # define BOOST_NO_STD_WSTRING
|
---|
| 92 | # endif
|
---|
| 93 | # ifndef BOOST_NO_STD_WSTREAMBUF
|
---|
| 94 | # define BOOST_NO_STD_WSTREAMBUF
|
---|
| 95 | # endif
|
---|
| 96 | #endif
|
---|
| 97 |
|
---|
| 98 | //
|
---|
| 99 | // We always have SGI style hash_set, hash_map, and slist:
|
---|
| 100 | //
|
---|
| 101 | #define BOOST_HAS_HASH
|
---|
| 102 | #define BOOST_HAS_SLIST
|
---|
| 103 |
|
---|
| 104 | //
|
---|
| 105 | // STLport does a good job of importing names into namespace std::,
|
---|
| 106 | // but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our
|
---|
| 107 | // workaround does not conflict with STLports:
|
---|
| 108 | //
|
---|
| 109 | //
|
---|
| 110 | // Harold Howe says:
|
---|
| 111 | // Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with
|
---|
| 112 | // BCB6 does cause problems. If we detect C++ Builder, then don't define
|
---|
| 113 | // BOOST_NO_STDC_NAMESPACE
|
---|
| 114 | //
|
---|
| 115 | #if !defined(__BORLANDC__) && !defined(__DMC__)
|
---|
| 116 | //
|
---|
| 117 | // If STLport is using it's own namespace, and the real names are in
|
---|
| 118 | // the global namespace, then we duplicate STLport's using declarations
|
---|
| 119 | // (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't
|
---|
| 120 | // necessarily import all the names we need into namespace std::
|
---|
| 121 | //
|
---|
| 122 | # if (defined(__STL_IMPORT_VENDOR_CSTD) \
|
---|
| 123 | || defined(__STL_USE_OWN_NAMESPACE) \
|
---|
| 124 | || defined(_STLP_IMPORT_VENDOR_CSTD) \
|
---|
| 125 | || defined(_STLP_USE_OWN_NAMESPACE)) \
|
---|
| 126 | && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD))
|
---|
| 127 | # define BOOST_NO_STDC_NAMESPACE
|
---|
| 128 | # define BOOST_NO_EXCEPTION_STD_NAMESPACE
|
---|
| 129 | # endif
|
---|
| 130 | #elif defined(__BORLANDC__) && __BORLANDC__ < 0x560
|
---|
| 131 | // STLport doesn't import std::abs correctly:
|
---|
| 132 | #include <stdlib.h>
|
---|
| 133 | namespace std { using ::abs; }
|
---|
| 134 | // and strcmp/strcpy don't get imported either ('cos they are macros)
|
---|
| 135 | #include <string.h>
|
---|
| 136 | #ifdef strcpy
|
---|
| 137 | # undef strcpy
|
---|
| 138 | #endif
|
---|
| 139 | #ifdef strcmp
|
---|
| 140 | # undef strcmp
|
---|
| 141 | #endif
|
---|
| 142 | #ifdef _STLP_VENDOR_CSTD
|
---|
| 143 | namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; }
|
---|
| 144 | #endif
|
---|
| 145 | #endif
|
---|
| 146 |
|
---|
| 147 | //
|
---|
| 148 | // std::use_facet may be non-standard, uses a class instead:
|
---|
| 149 | //
|
---|
| 150 | #if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
|
---|
| 151 | # define BOOST_NO_STD_USE_FACET
|
---|
| 152 | # define BOOST_HAS_STLP_USE_FACET
|
---|
| 153 | #endif
|
---|
| 154 |
|
---|
| 155 | //
|
---|
| 156 | // If STLport thinks there are no wide functions, <cwchar> etc. is not working; but
|
---|
| 157 | // only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import
|
---|
| 158 | // into std:: ourselves).
|
---|
| 159 | //
|
---|
| 160 | #if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE)
|
---|
| 161 | # define BOOST_NO_CWCHAR
|
---|
| 162 | # define BOOST_NO_CWCTYPE
|
---|
| 163 | #endif
|
---|
| 164 |
|
---|
| 165 | //
|
---|
| 166 | // If STLport for some reason was configured so that it thinks that wchar_t
|
---|
| 167 | // is not an intrinsic type, then we have to disable the support for it as
|
---|
| 168 | // well (we would be missing required specializations otherwise).
|
---|
| 169 | //
|
---|
| 170 | #if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT)
|
---|
| 171 | # undef BOOST_NO_INTRINSIC_WCHAR_T
|
---|
| 172 | # define BOOST_NO_INTRINSIC_WCHAR_T
|
---|
| 173 | #endif
|
---|
| 174 |
|
---|
| 175 | //
|
---|
| 176 | // Borland ships a version of STLport with C++ Builder 6 that lacks
|
---|
| 177 | // hashtables and the like:
|
---|
| 178 | //
|
---|
| 179 | #if defined(__BORLANDC__) && (__BORLANDC__ == 0x560)
|
---|
| 180 | # undef BOOST_HAS_HASH
|
---|
| 181 | #endif
|
---|
| 182 |
|
---|
| 183 | //
|
---|
| 184 | // gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max
|
---|
| 185 | //
|
---|
| 186 | #if defined(__GNUC__) && (__GNUC__ < 3)
|
---|
| 187 | # include <algorithm> // for std::min and std::max
|
---|
| 188 | # define BOOST_USING_STD_MIN() ((void)0)
|
---|
| 189 | # define BOOST_USING_STD_MAX() ((void)0)
|
---|
| 190 | namespace boost { using std::min; using std::max; }
|
---|
| 191 | #endif
|
---|
| 192 |
|
---|
| 193 | #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
|
---|
| 194 |
|
---|
| 195 |
|
---|
| 196 |
|
---|
| 197 |
|
---|
| 198 |
|
---|
| 199 |
|
---|
| 200 |
|
---|
| 201 |
|
---|