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