• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* STLport configuration file
2  * It is internal STLport header - DO NOT include it directly
3  * Microsoft Visual C++ 6.0, 7.0, 7.1, 8.0, ICL
4  */
5 
6 #if !defined (_STLP_COMPILER)
7 #  define _STLP_COMPILER "Microsoft Visual Studio C++"
8 #endif
9 
10 #if !defined (__ICL) && !defined (_STLP_MSVC)
11 #  define _STLP_MSVC _MSC_VER
12 #endif
13 
14 #if !defined (_STLP_MSVC_LIB)
15 #  define _STLP_MSVC_LIB _MSC_VER
16 #endif
17 
18 #if defined (__BUILDING_STLPORT) && defined (_MANAGED)
19 /* Building a managed version of STLport is not supported because we haven't
20  * found a good reason to support it. However, building a managed translation
21  * unit using STLport _is_ supported.
22  */
23 #  error Sorry but building a managed version of STLport is not supported.
24 #endif
25 
26 #if defined (_STLP_USING_PLATFORM_SDK_COMPILER)
27 /* This is a specific section for compilers coming with platform SDKs. Native
28  * library coming with it is different from the one coming with commercial
29  * MSVC compilers so there is some specific settings.
30  */
31 #  define _STLP_NATIVE_INCLUDE_PATH ../crt
32 #  define _STLP_VENDOR_GLOBAL_CSTD
33 #  define _STLP_VENDOR_TERMINATE_STD
34 #  define _STLP_GLOBAL_NEW_HANDLER
35 #  if (_STLP_MSVC_LIB <= 1400)
36 /* We hope this bug will be fixed in future versions. */
37 #    define _STLP_NEW_DONT_THROW_BAD_ALLOC 1
38 #  endif
39 #endif
40 
41 #define _STLP_CALL __cdecl
42 
43 #ifndef _STLP_LONG_LONG
44 #  define _STLP_LONG_LONG __int64
45 #endif
46 
47 #define _STLP_PRAGMA_ONCE
48 
49 /* These switches depend on compiler flags. We are hoping here that compilers
50  * simulating MSVC behavior use identical macros to report compilation context.
51  * Otherwise those macros will have to be undef in specific compiler configuration
52  * files.
53  */
54 #ifndef _CPPUNWIND
55 #  define _STLP_DONT_USE_EXCEPTIONS 1
56 #endif
57 
58 #ifndef _CPPRTTI
59 #  define _STLP_NO_RTTI 1
60 #endif
61 
62 #if defined (_MT) && !defined (_STLP_NO_THREADS)
63 #  define _STLP_THREADS 1
64 #endif
65 
66 #if !defined (_NATIVE_WCHAR_T_DEFINED)
67 #  define _STLP_WCHAR_T_IS_USHORT 1
68 #endif
69 
70 #define _STLP_NO_VENDOR_STDLIB_L 1
71 
72 #if defined (_STLP_MSVC)
73 
74 #  if (_STLP_MSVC < 1200)
75 #    error Microsoft Visual C++ compilers before version 6 (SP5) are not supported.
76 #  endif
77 
78 #  define _STLP_NORETURN_FUNCTION __declspec(noreturn)
79 
80 /* Full compiler version comes from boost library intrinsics.hpp header. */
81 #  if defined (_MSC_FULL_VER) && (_MSC_FULL_VER >= 140050215)
82 #    define _STLP_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
83 #    define _STLP_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T)
84 #    define _STLP_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T)
85 #    define _STLP_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
86 #    define _STLP_IS_POD(T) __is_pod(T)
87 #    define _STLP_HAS_TYPE_TRAITS_INTRINSICS
88 #  endif
89 
90 #  ifndef _STLP_MSVC50_COMPATIBILITY
91 #    define _STLP_MSVC50_COMPATIBILITY   1
92 #  endif
93 
94 #  define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1
95 #  define _STLP_HAS_SPECIFIC_PROLOG_EPILOG 1
96 #  define _STLP_NO_STATIC_CONST_DEFINITION 1
97 
98 /* # ifndef __BUILDING_STLPORT
99  * #  define _STLP_USE_TEMPLATE_EXPORT 1
100  * # endif
101  */
102 
103 /** Note: the macro _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT is defined
104 unconditionally and undef'ed here when applicable. */
105 #  if defined (UNDER_CE)
106 /* eVCx:
107 uncaught_exception is declared in the SDKs delivered with eVC4 (eVC3 is
108 unknown) and they all reside in namespace 'std' there. However, they are not
109 part of any lib so linking fails. When using VC8 to crosscompile for CE 5 on
110 an ARMV4I, the uncaught_exception test fails, the function returns the wrong
111 value. */
112 /* All eVCs up to at least VC8/CE5 have a broken new operator that
113    returns null instead of throwing bad_alloc. */
114 #    define _STLP_NEW_DONT_THROW_BAD_ALLOC 1
115 #  else
116 /* VCx:
117 These are present at least since VC6, but the uncaught_exception() of VC6 is
118 broken, it returns the wrong value in the unittests. 7.1 and later seem to
119 work, 7.0 is still unknown (we assume it works until negative report). */
120 #    if (_STLP_MSVC >= 1300)// VC7 and later
121 #      undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
122 #    endif
123 #    if (_STLP_MSVC < 1300)
124 #      define _STLP_NOTHROW
125 #    endif
126 #  endif
127 
128 #  if (_STLP_MSVC <= 1300)
129 #    define _STLP_STATIC_CONST_INIT_BUG   1
130 #    define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
131 #    define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
132 /* There is no partial spec, and MSVC breaks on simulating it for iterator_traits queries */
133 #    define _STLP_USE_OLD_HP_ITERATOR_QUERIES
134 #    define _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER
135 #    define _STLP_NO_METHOD_SPECIALIZATION 1
136 #    define _STLP_DEF_CONST_PLCT_NEW_BUG 1
137 #    define _STLP_NO_TYPENAME_ON_RETURN_TYPE 1
138 /* VC++ cannot handle default allocator argument in template constructors */
139 #    define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
140 #    define _STLP_NO_QUALIFIED_FRIENDS    1
141 #  endif
142 
143 #  if (_STLP_MSVC < 1300) /* including MSVC 6.0 */
144 #    define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
145 #    define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1
146 #  endif
147 
148 #  define _STLP_HAS_NATIVE_FLOAT_ABS 1
149 
150 // TODO: some eVC4 compilers report _MSC_VER 1201 or 1202, which category do they belong to?
151 #  if (_STLP_MSVC > 1200) && (_STLP_MSVC < 1310)
152 #    define _STLP_NO_MOVE_SEMANTIC
153 #  endif
154 
155 #  if (_STLP_MSVC < 1300)
156 /* TODO: remove this if it is handled and documented elsewhere
157  * dums: VC6 do not handle correctly member templates of class that are explicitely
158  * instanciated to be exported. There is a workaround, seperate the non template methods
159  * from the template ones within 2 different classes and only export the non template one.
160  * It is implemented for basic_string and locale at the writing of this note.
161  * However this problem hos not  been considered as important enough to remove template member
162  * methods for other classes. Moreover Boost (www.boost.org) required it to be granted.
163  * The workaround is activated thanks to the _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND macro defined
164  * later in this config file.
165  */
166 /*
167 #    if defined (_DLL)
168 #      define _STLP_NO_MEMBER_TEMPLATES 1
169 #    endif
170 */
171 
172 /* Boris : not defining this macro for SP5 causes other problems */
173 /*#    if !defined (_MSC_FULL_VER) || (_MSC_FULL_VER < 12008804 ) */
174 #    define _STLP_NO_USING_FOR_GLOBAL_FUNCTIONS 1
175 /*#    endif */
176 #    define _STLP_DONT_USE_BOOL_TYPEDEF 1
177 #    define _STLP_DONT_RETURN_VOID 1
178 #  endif
179 
180 #  if (_STLP_MSVC < 1300) /* MSVC 6.0 and earlier */
181 #    define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
182 /* defined for DEBUG and NDEBUG too, to allow user mix own debug build with STLP release library */
183 #    define _STLP_USE_ABBREVS
184 #  endif
185 
186 #endif /* _STLP_MSVC */
187 
188 /* The desktop variants starting with VC8 have a set of more secure replacements
189  * for the error-prone string handling functions of the C standard lib. */
190 /* When user do not consider 'unsafe' string functions as deprecated using _CRT_SECURE_NO_DEPRECATE
191  * macro we use 'unsafe' functions for performance reasons. */
192 #if (_STLP_MSVC_LIB >= 1400) && !defined (_STLP_USING_PLATFORM_SDK_COMPILER) && !defined (UNDER_CE) && \
193     !defined (_CRT_SECURE_NO_DEPRECATE)
194 #  define _STLP_USE_SAFE_STRING_FUNCTIONS 1
195 #endif
196 
197 #if (_STLP_MSVC_LIB <= 1310)
198 #  define _STLP_VENDOR_GLOBAL_CSTD
199 #endif
200 
201 #if (_STLP_MSVC_LIB >= 1300) && !defined(UNDER_CE)
202 /* Starting with MSVC 7.0 and compilers simulating it,
203  * we assume that the new SDK is granted:
204  */
205 #  define _STLP_NEW_PLATFORM_SDK 1
206 #endif
207 
208 #if (_STLP_MSVC_LIB < 1300) /* including MSVC 6.0 */
209 #  define _STLP_GLOBAL_NEW_HANDLER 1
210 #  define _STLP_VENDOR_UNEXPECTED_STD
211 #  define _STLP_NEW_DONT_THROW_BAD_ALLOC 1
212 #endif
213 
214 #define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
215 #define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
216 #define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
217 #define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
218 
219 #if defined (__DLL) || defined (_DLL) || defined (_RTLDLL) || defined (_AFXDLL)
220 #  define _STLP_RUNTIME_DLL
221 #endif
222 #if defined (__BUILDING_STLPORT) && \
223    (defined (_STLP_USE_DYNAMIC_LIB) || \
224     defined (_STLP_RUNTIME_DLL) && !defined (_STLP_USE_STATIC_LIB))
225 #  define _STLP_DLL
226 #endif
227 #include <stl/config/_detect_dll_or_lib.h>
228 #undef _STLP_RUNTIME_DLL
229 #undef _STLP_DLL
230 
231 #if defined (_STLP_USE_DYNAMIC_LIB)
232 #  undef  _STLP_USE_DECLSPEC
233 #  define _STLP_USE_DECLSPEC 1
234 #  if defined (_STLP_MSVC) && (_STLP_MSVC < 1300)
235 #    define _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND 1
236 #  endif
237 #endif
238 
239 #if !defined (_STLP_IMPORT_TEMPLATE_KEYWORD)
240 #  if !defined (_MSC_EXTENSIONS) || defined (_STLP_MSVC) && (_STLP_MSVC >= 1300)
241 #    define _STLP_IMPORT_TEMPLATE_KEYWORD
242 #  else
243 #    define _STLP_IMPORT_TEMPLATE_KEYWORD extern
244 #  endif
245 #endif
246 #define _STLP_EXPORT_TEMPLATE_KEYWORD
247 
248 #include <stl/config/_auto_link.h>
249 
250 #if defined (_STLP_USING_PLATFORM_SDK_COMPILER)
251 /* The Windows 64 bits SDK required for the moment link to bufferoverflowU.lib for
252  * additional buffer overrun checks. Rather than require the STLport build system and
253  * users to explicitely link with it we use the MSVC auto link feature.
254  */
255 #  if !defined (_STLP_DONT_USE_AUTO_LINK) || defined (__BUILDING_STLPORT)
256 #    pragma comment (lib, "bufferoverflowU.lib")
257 #    if defined (_STLP_VERBOSE)
258 #      pragma message ("STLport: Auto linking to bufferoverflowU.lib")
259 #    endif
260 #  endif
261 #endif
262 
263 #if defined (_STLP_MSVC)
264 #  include <stl/config/_feedback.h>
265 #endif
266