Chris@16: // (C) Copyright John Maddock 2001 - 2002. Chris@16: // (C) Copyright Darin Adler 2001. Chris@16: // (C) Copyright Jens Maurer 2001. Chris@16: // Use, modification and distribution are subject to the Chris@16: // Boost Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // See http://www.boost.org for most recent version. Chris@16: Chris@16: // STLPort standard library config: Chris@16: Chris@16: #if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) Chris@16: # include Chris@16: # if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) Chris@16: # error "This is not STLPort!" Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: // Apple doesn't seem to reliably defined a *unix* macro Chris@16: #if !defined(CYGWIN) && ( defined(__unix__) \ Chris@16: || defined(__unix) \ Chris@16: || defined(unix) \ Chris@16: || defined(__APPLE__) \ Chris@16: || defined(__APPLE) \ Chris@16: || defined(APPLE)) Chris@16: # include Chris@16: #endif Chris@16: Chris@16: // Chris@16: // __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS Chris@16: // for versions prior to 4.1(beta) Chris@16: // Chris@16: #if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400) Chris@16: # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // If STLport thinks that there is no partial specialisation, then there is no Chris@16: // std::iterator traits: Chris@16: // Chris@16: #if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION)) Chris@16: # define BOOST_NO_STD_ITERATOR_TRAITS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // No new style iostreams on GCC without STLport's iostreams enabled: Chris@16: // Chris@16: #if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS)) Chris@16: # define BOOST_NO_STRINGSTREAM Chris@16: #endif Chris@16: Chris@16: // Chris@16: // No new iostreams implies no std::locale, and no std::stringstream: Chris@16: // Chris@16: #if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS) Chris@16: # define BOOST_NO_STD_LOCALE Chris@16: # define BOOST_NO_STRINGSTREAM Chris@16: #endif Chris@16: Chris@16: // Chris@16: // If the streams are not native, and we have a "using ::x" compiler bug Chris@16: // then the io stream facets are not available in namespace std:: Chris@16: // Chris@16: #ifdef _STLPORT_VERSION Chris@16: # if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) Chris@16: # define BOOST_NO_STD_LOCALE Chris@16: # endif Chris@16: #else Chris@16: # if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) Chris@16: # define BOOST_NO_STD_LOCALE Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: #if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520) Chris@16: # define BOOST_HAS_TR1_UNORDERED_SET Chris@16: # define BOOST_HAS_TR1_UNORDERED_MAP Chris@16: #endif Chris@16: // Chris@16: // Without member template support enabled, their are no template Chris@16: // iterate constructors, and no std::allocator: Chris@16: // Chris@16: #if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES)) Chris@16: # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS Chris@16: # define BOOST_NO_STD_ALLOCATOR Chris@16: #endif Chris@16: // Chris@16: // however we always have at least a partial allocator: Chris@16: // Chris@16: #define BOOST_HAS_PARTIAL_STD_ALLOCATOR Chris@16: Chris@16: #if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) Chris@16: # define BOOST_NO_STD_ALLOCATOR Chris@16: #endif Chris@16: Chris@16: #if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) Chris@16: # define BOOST_NO_STD_ALLOCATOR Chris@16: #endif Chris@16: Chris@16: // Chris@16: // If STLport thinks there is no wchar_t at all, then we have to disable Chris@16: // the support for the relevant specilazations of std:: templates. Chris@16: // Chris@16: #if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT) Chris@16: # ifndef BOOST_NO_STD_WSTRING Chris@16: # define BOOST_NO_STD_WSTRING Chris@16: # endif Chris@16: # ifndef BOOST_NO_STD_WSTREAMBUF Chris@16: # define BOOST_NO_STD_WSTREAMBUF Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: // Chris@16: // We always have SGI style hash_set, hash_map, and slist: Chris@16: // Chris@16: #ifndef _STLP_NO_EXTENSIONS Chris@16: #define BOOST_HAS_HASH Chris@16: #define BOOST_HAS_SLIST Chris@16: #endif Chris@16: Chris@16: // Chris@16: // STLport does a good job of importing names into namespace std::, Chris@16: // but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our Chris@16: // workaround does not conflict with STLports: Chris@16: // Chris@16: // Chris@16: // Harold Howe says: Chris@16: // Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with Chris@16: // BCB6 does cause problems. If we detect C++ Builder, then don't define Chris@16: // BOOST_NO_STDC_NAMESPACE Chris@16: // Chris@16: #if !defined(__BORLANDC__) && !defined(__DMC__) Chris@16: // Chris@16: // If STLport is using it's own namespace, and the real names are in Chris@16: // the global namespace, then we duplicate STLport's using declarations Chris@16: // (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't Chris@16: // necessarily import all the names we need into namespace std:: Chris@16: // Chris@16: # if (defined(__STL_IMPORT_VENDOR_CSTD) \ Chris@16: || defined(__STL_USE_OWN_NAMESPACE) \ Chris@16: || defined(_STLP_IMPORT_VENDOR_CSTD) \ Chris@16: || defined(_STLP_USE_OWN_NAMESPACE)) \ Chris@16: && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD)) Chris@16: # define BOOST_NO_STDC_NAMESPACE Chris@16: # define BOOST_NO_EXCEPTION_STD_NAMESPACE Chris@16: # endif Chris@16: #elif defined(__BORLANDC__) && __BORLANDC__ < 0x560 Chris@16: // STLport doesn't import std::abs correctly: Chris@16: #include Chris@16: namespace std { using ::abs; } Chris@16: // and strcmp/strcpy don't get imported either ('cos they are macros) Chris@16: #include Chris@16: #ifdef strcpy Chris@16: # undef strcpy Chris@16: #endif Chris@16: #ifdef strcmp Chris@16: # undef strcmp Chris@16: #endif Chris@16: #ifdef _STLP_VENDOR_CSTD Chris@16: namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; } Chris@16: #endif Chris@16: #endif Chris@16: Chris@16: // Chris@16: // std::use_facet may be non-standard, uses a class instead: Chris@16: // Chris@16: #if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) Chris@16: # define BOOST_NO_STD_USE_FACET Chris@16: # define BOOST_HAS_STLP_USE_FACET Chris@16: #endif Chris@16: Chris@16: // Chris@16: // If STLport thinks there are no wide functions, etc. is not working; but Chris@16: // only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import Chris@16: // into std:: ourselves). Chris@16: // Chris@16: #if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE) Chris@16: # define BOOST_NO_CWCHAR Chris@16: # define BOOST_NO_CWCTYPE Chris@16: #endif Chris@16: Chris@16: // Chris@16: // If STLport for some reason was configured so that it thinks that wchar_t Chris@16: // is not an intrinsic type, then we have to disable the support for it as Chris@16: // well (we would be missing required specializations otherwise). Chris@16: // Chris@16: #if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT) Chris@16: # undef BOOST_NO_INTRINSIC_WCHAR_T Chris@16: # define BOOST_NO_INTRINSIC_WCHAR_T Chris@16: #endif Chris@16: Chris@16: // Chris@16: // Borland ships a version of STLport with C++ Builder 6 that lacks Chris@16: // hashtables and the like: Chris@16: // Chris@16: #if defined(__BORLANDC__) && (__BORLANDC__ == 0x560) Chris@16: # undef BOOST_HAS_HASH Chris@16: #endif Chris@16: Chris@16: // Chris@16: // gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max Chris@16: // Chris@16: #if defined(__GNUC__) && (__GNUC__ < 3) Chris@16: # include // for std::min and std::max Chris@16: # define BOOST_USING_STD_MIN() ((void)0) Chris@16: # define BOOST_USING_STD_MAX() ((void)0) Chris@16: namespace boost { using std::min; using std::max; } Chris@16: #endif Chris@16: Chris@16: // C++0x headers not yet implemented Chris@16: // Chris@16: # define BOOST_NO_CXX11_HDR_ARRAY Chris@16: # define BOOST_NO_CXX11_HDR_CHRONO Chris@16: # define BOOST_NO_CXX11_HDR_CODECVT Chris@16: # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE Chris@16: # define BOOST_NO_CXX11_HDR_FORWARD_LIST Chris@16: # define BOOST_NO_CXX11_HDR_FUTURE Chris@16: # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST Chris@16: # define BOOST_NO_CXX11_HDR_MUTEX Chris@16: # define BOOST_NO_CXX11_HDR_RANDOM Chris@16: # define BOOST_NO_CXX11_HDR_RATIO Chris@16: # define BOOST_NO_CXX11_HDR_REGEX Chris@16: # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR Chris@16: # define BOOST_NO_CXX11_HDR_THREAD Chris@16: # define BOOST_NO_CXX11_HDR_TUPLE Chris@16: # define BOOST_NO_CXX11_HDR_TYPE_TRAITS Chris@16: # define BOOST_NO_CXX11_HDR_TYPEINDEX Chris@16: # define BOOST_NO_CXX11_HDR_UNORDERED_MAP Chris@16: # define BOOST_NO_CXX11_HDR_UNORDERED_SET Chris@16: # define BOOST_NO_CXX11_NUMERIC_LIMITS Chris@16: # define BOOST_NO_CXX11_ALLOCATOR Chris@16: # define BOOST_NO_CXX11_ATOMIC_SMART_PTR Chris@16: # define BOOST_NO_CXX11_SMART_PTR Chris@16: # define BOOST_NO_CXX11_HDR_FUNCTIONAL Chris@101: # define BOOST_NO_CXX11_HDR_ATOMIC Chris@101: # define BOOST_NO_CXX11_STD_ALIGN Chris@101: # define BOOST_NO_CXX11_ADDRESSOF Chris@16: Chris@16: #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) Chris@16: Chris@16: Chris@16: Chris@16: Chris@16: Chris@16: Chris@16: Chris@16: