1 // (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
2 // distribute this software is granted provided this copyright notice appears
3 // in all copies. This software is provided "as is" without express or implied
4 // warranty, and with no claim as to its suitability for any purpose.
6 // See http://www.boost.org for most recent version.
8 // STLPort standard library config:
10 #if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
12 # if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
13 # error "This is not STLPort!"
18 // __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
19 // for versions prior to 4.1(beta)
21 #if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400)
22 # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
26 // If STLport thinks that there is no partial specialisation, then there is no
27 // std::iterator traits:
29 #if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION))
30 # define BOOST_NO_STD_ITERATOR_TRAITS
34 // No new style iostreams on GCC without STLport's iostreams enabled:
36 #if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS))
37 # define BOOST_NO_STRINGSTREAM
41 // No new iostreams implies no std::locale, and no std::stringstream:
43 #if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS)
44 # define BOOST_NO_STD_LOCALE
45 # define BOOST_NO_STRINGSTREAM
49 // If the streams are not native, and we have a "using ::x" compiler bug
50 // then the io stream facets are not available in namespace std::
52 #if !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
53 # define BOOST_NO_STD_LOCALE
55 #if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
56 # define BOOST_NO_STD_LOCALE
60 // Without member template support enabled, their are no template
61 // iterate constructors, and no std::allocator:
63 #if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES))
64 # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
65 # define BOOST_NO_STD_ALLOCATOR
68 #if !defined(_STLP_MEMBER_TEMPLATE_CLASSES)
69 # define BOOST_NO_STD_ALLOCATOR
73 // We always have SGI style hash_set, hash_map, and slist:
75 #define BOOST_HAS_HASH
76 #define BOOST_HAS_SLIST
79 // STLport does a good job of importing names into namespace std::,
80 // but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our
81 // workaround does not conflict with STLports:
85 // Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with
86 // BCB6 does cause problems. If we detect C++ Builder, then don't define
87 // BOOST_NO_STDC_NAMESPACE
89 #if !defined(__BORLANDC__)
91 // If STLport is using it's own namespace, and the real names are in
92 // the global namespace, then we duplicate STLport's using declarations
93 // (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't
94 // necessarily import all the names we need into namespace std::
96 # if (defined(__STL_IMPORT_VENDOR_CSTD) \
97 || defined(__STL_USE_OWN_NAMESPACE) \
98 || defined(_STLP_IMPORT_VENDOR_CSTD) \
99 || defined(_STLP_USE_OWN_NAMESPACE)) \
100 && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD))
101 # define BOOST_NO_STDC_NAMESPACE
103 #elif __BORLANDC__ < 0x560
104 // STLport doesn't import std::abs correctly:
106 namespace std { using ::abs; }
107 // and strcmp/strcpy don't get imported either ('cos they are macros)
115 #ifdef _STLP_VENDOR_CSTD
116 namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; }
121 // std::use_facet may be non-standard, uses a class instead:
123 #if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
124 # define BOOST_NO_STD_USE_FACET
125 # define BOOST_HAS_STLP_USE_FACET
129 // If STLport thinks there are no wide functions, <cwchar> etc. is not working; but
130 // only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import
131 // into std:: ourselves).
133 #if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE)
134 # define BOOST_NO_CWCHAR
135 # define BOOST_NO_CWTYPE
139 // Borland ships a version of STLport with C++ Builder 6 that lacks
140 // hashtables and the like:
142 #if defined(__BORLANDC__) && (__BORLANDC__ == 0x560)
143 # undef BOOST_HAS_HASH
147 #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)