williamr@4: /* STLport configuration file williamr@4: * It is internal STLport header - DO NOT include it directly williamr@4: * Microsoft Visual C++ 6.0, 7.0, 7.1, 8.0, ICL williamr@4: */ williamr@4: williamr@4: #if !defined (_STLP_COMPILER) williamr@4: # define _STLP_COMPILER "Microsoft Visual Studio C++" williamr@4: #endif williamr@4: williamr@4: #if !defined (__ICL) && !defined (_STLP_MSVC) williamr@4: # define _STLP_MSVC _MSC_VER williamr@4: #endif williamr@4: williamr@4: #if !defined (_STLP_MSVC_LIB) williamr@4: # define _STLP_MSVC_LIB _MSC_VER williamr@4: #endif williamr@4: williamr@4: #if defined (__BUILDING_STLPORT) && defined (_MANAGED) williamr@4: /* Building a managed version of STLport is not supported because we haven't williamr@4: * found a good reason to support it. However, building a managed translation williamr@4: * unit using STLport _is_ supported. williamr@4: */ williamr@4: # error Sorry but building a managed version of STLport is not supported. williamr@4: #endif williamr@4: williamr@4: #if defined (_STLP_USING_PLATFORM_SDK_COMPILER) williamr@4: /* This is a specific section for compilers coming with platform SDKs. Native williamr@4: * library coming with it is different from the one coming with commercial williamr@4: * MSVC compilers so there is some specific settings. williamr@4: */ williamr@4: # define _STLP_NATIVE_INCLUDE_PATH ../crt williamr@4: # define _STLP_VENDOR_GLOBAL_CSTD williamr@4: # define _STLP_VENDOR_TERMINATE_STD williamr@4: # define _STLP_GLOBAL_NEW_HANDLER williamr@4: # if (_STLP_MSVC_LIB <= 1400) williamr@4: /* We hope this bug will be fixed in future versions. */ williamr@4: # define _STLP_NEW_DONT_THROW_BAD_ALLOC 1 williamr@4: # endif williamr@4: #endif williamr@4: williamr@4: #define _STLP_CALL __cdecl williamr@4: williamr@4: #ifndef _STLP_LONG_LONG williamr@4: # define _STLP_LONG_LONG __int64 williamr@4: #endif williamr@4: williamr@4: #define _STLP_PRAGMA_ONCE williamr@4: williamr@4: /* These switches depend on compiler flags. We are hoping here that compilers williamr@4: * simulating MSVC behavior use identical macros to report compilation context. williamr@4: * Otherwise those macros will have to be undef in specific compiler configuration williamr@4: * files. williamr@4: */ williamr@4: #ifndef _CPPUNWIND williamr@4: # define _STLP_DONT_USE_EXCEPTIONS 1 williamr@4: #endif williamr@4: williamr@4: #ifndef _CPPRTTI williamr@4: # define _STLP_NO_RTTI 1 williamr@4: #endif williamr@4: williamr@4: #if defined (_MT) && !defined (_STLP_NO_THREADS) && !defined (_REENTRANT) williamr@4: # define _REENTRANT 1 williamr@4: #endif williamr@4: williamr@4: #if !defined (_NATIVE_WCHAR_T_DEFINED) williamr@4: # define _STLP_WCHAR_T_IS_USHORT 1 williamr@4: #endif williamr@4: williamr@4: #define _STLP_MINIMUM_IMPORT_STD williamr@4: #define _STLP_NO_VENDOR_STDLIB_L 1 williamr@4: williamr@4: #if defined (_STLP_MSVC) williamr@4: williamr@4: #define _STLP_NORETURN_FUNCTION __declspec(noreturn) williamr@4: williamr@4: /* Full compiler version comes from boost library intrinsics.hpp header. */ williamr@4: # if defined (_MSC_FULL_VER) && (_MSC_FULL_VER >= 140050215) williamr@4: # define _STLP_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) williamr@4: # define _STLP_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T) williamr@4: # define _STLP_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T) williamr@4: # define _STLP_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) williamr@4: # define _STLP_IS_POD(T) __is_pod(T) williamr@4: # define _STLP_HAS_TYPE_TRAITS_INTRINSICS williamr@4: # endif williamr@4: williamr@4: # ifndef _STLP_MSVC50_COMPATIBILITY williamr@4: # define _STLP_MSVC50_COMPATIBILITY 1 williamr@4: # endif williamr@4: williamr@4: # define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1 williamr@4: # define _STLP_HAS_SPECIFIC_PROLOG_EPILOG 1 williamr@4: williamr@4: /* # ifndef __BUILDING_STLPORT williamr@4: * # define _STLP_USE_TEMPLATE_EXPORT 1 williamr@4: * # endif williamr@4: */ williamr@4: # if (_STLP_MSVC <= 1400) williamr@4: # define _STLP_STATIC_CONST_INIT_BUG 1 williamr@4: # endif williamr@4: williamr@4: /** Note: the macro _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT is defined williamr@4: unconditionally and undef'ed here when applicable. */ williamr@4: # if defined(UNDER_CE) williamr@4: /* eVCx: williamr@4: uncaught_exception is declared in the SDKs delivered with eVC4 (eVC3 is williamr@4: unknown) and they all reside in namespace 'std' there. However, they are not williamr@4: part of any lib so linking fails. When using VC8 to crosscompile for CE 5 on williamr@4: an ARMV4I, the uncaught_exception test fails, the function returns the wrong williamr@4: value. */ williamr@4: # else williamr@4: /* VCx: williamr@4: These are present at least since VC6, but the uncaught_exception() of VC6 is williamr@4: broken, it returns the wrong value in the unittests. 7.1 and later seem to williamr@4: work, 7.0 is still unknown (we assume it works until negative report). */ williamr@4: # if (_STLP_MSVC >= 1300)// VC7 and later williamr@4: # undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT williamr@4: # if !defined (_STLP_DONT_USE_EXCEPTIONS) williamr@4: # define _STLP_NOTHROW throw() williamr@4: # endif williamr@4: # endif williamr@4: # endif williamr@4: williamr@4: # if (_STLP_MSVC <= 1300) williamr@4: # define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 williamr@4: # define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1 williamr@4: /* There is no partial spec, and MSVC breaks on simulating it for iterator_traits queries */ williamr@4: # define _STLP_USE_OLD_HP_ITERATOR_QUERIES williamr@4: # define _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER williamr@4: # define _STLP_NO_METHOD_SPECIALIZATION 1 williamr@4: # define _STLP_DEF_CONST_PLCT_NEW_BUG 1 williamr@4: # define _STLP_NO_TYPENAME_ON_RETURN_TYPE 1 williamr@4: /* VC++ cannot handle default allocator argument in template constructors */ williamr@4: # define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS williamr@4: # define _STLP_NO_QUALIFIED_FRIENDS 1 williamr@4: # define _STLP_NO_FRIEND_TEMPLATES williamr@4: /* Fails to properly resolve call to sin() from within sin() */ williamr@4: # endif williamr@4: williamr@4: # if (_STLP_MSVC < 1300) williamr@4: # define _STLP_NO_IEC559_SUPPORT 1 williamr@4: # endif williamr@4: williamr@4: # if (_STLP_MSVC < 1300) /* including MSVC 6.0 */ williamr@4: /* These work, as long they are inline */ williamr@4: # define _STLP_INLINE_MEMBER_TEMPLATES 1 williamr@4: # define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1 williamr@4: # define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1 williamr@4: # endif williamr@4: williamr@4: # if (_STLP_MSVC >= 1200) williamr@4: # define _STLP_HAS_NATIVE_FLOAT_ABS 1 williamr@4: # endif williamr@4: williamr@4: // TODO: some eVC4 compilers report _MSC_VER 1201 or 1202, which category do they belong to? williamr@4: # if (_STLP_MSVC > 1200) && (_STLP_MSVC < 1310) williamr@4: # define _STLP_NO_MOVE_SEMANTIC williamr@4: # endif williamr@4: williamr@4: # if (_STLP_MSVC < 1300) williamr@4: /* TODO: remove this if it is handled and documented elsewhere williamr@4: * dums: VC6 do not handle correctly member templates of class that are explicitely williamr@4: * instanciated to be exported. There is a workaround, seperate the non template methods williamr@4: * from the template ones within 2 different classes and only export the non template one. williamr@4: * It is implemented for basic_string and locale at the writing of this note. williamr@4: * However this problem hos not been considered as important enough to remove template member williamr@4: * methods for other classes. Moreover Boost (www.boost.org) required it to be granted. williamr@4: * The workaround is activated thanks to the _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND macro defined williamr@4: * later in this config file. williamr@4: */ williamr@4: /* williamr@4: # if defined (_DLL) williamr@4: # define _STLP_NO_MEMBER_TEMPLATES 1 williamr@4: # endif williamr@4: */ williamr@4: williamr@4: /* Boris : not defining this macro for SP5 causes other problems */ williamr@4: /*# if !defined (_MSC_FULL_VER) || (_MSC_FULL_VER < 12008804 ) */ williamr@4: # define _STLP_NO_USING_FOR_GLOBAL_FUNCTIONS 1 williamr@4: /*# endif */ williamr@4: # define _STLP_DONT_USE_BOOL_TYPEDEF 1 williamr@4: # define _STLP_DONT_RETURN_VOID 1 williamr@4: # endif williamr@4: williamr@4: /* williamr@4: * MSVC6 is known to have many trouble with namespace management but williamr@4: * MSVC .Net 2003 and 2005 also have a bug difficult to reproduce without williamr@4: * STLport: williamr@4: * namespace stlp_std { williamr@4: * typedef int foo_int; williamr@4: * } williamr@4: * #include williamr@4: * const foo_int bar = 0; williamr@4: * williamr@4: * As you can see foo is available without namespace specification as if williamr@4: * a using namespace stlp_std has been performed. Defining _STLP_USING_NAMESPACE_BUG williamr@4: * restore the expected compilation error. williamr@4: */ williamr@4: # define _STLP_USING_NAMESPACE_BUG 1 williamr@4: williamr@4: # if (_STLP_MSVC < 1300) /* MSVC 6.0 and earlier */ williamr@4: /* defined for DEBUG and NDEBUG too, to allow user mix own debug build with STLP release library */ williamr@4: # define _STLP_USE_ABBREVS williamr@4: # endif williamr@4: williamr@4: // TODO: what is the earliest version for this? If it is 1200, use _STLP_MSVC>=1200. williamr@4: # if (_STLP_MSVC > 1100) && (_STLP_MSVC < 1300) williamr@4: typedef char __stl_char; williamr@4: # define _STLP_DEFAULTCHAR __stl_char williamr@4: # endif williamr@4: williamr@4: # if (_STLP_MSVC < 1200) /* before VC++ 6.0 */ williamr@4: /* # define _STLP_NO_MEMBER_TEMPLATES 1 */ williamr@4: /* # define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1 */ williamr@4: # define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS 1 williamr@4: # define _STLP_DONT_USE_PARTIAL_SPEC_WRKD 1 williamr@4: # define _STLP_QUALIFIED_SPECIALIZATION_BUG 1 williamr@4: # define _STLP_NON_TYPE_TMPL_PARAM_BUG 1 williamr@4: # define _STLP_THROW_RETURN_BUG 1 williamr@4: # define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 williamr@4: # define _STLP_DEF_CONST_DEF_PARAM_BUG 1 williamr@4: # endif williamr@4: williamr@4: # if (_STLP_MSVC < 1100 ) williamr@4: # ifndef _STLP_USE_NO_IOSTREAMS williamr@4: # define _STLP_USE_NO_IOSTREAMS williamr@4: # endif williamr@4: /* # define _STLP_NESTED_TYPE_PARAM_BUG 1 */ williamr@4: /* Debug mode does not work for 4.2 */ williamr@4: # if defined (_STLP_DEBUG) williamr@4: # pragma message ("STLport debug mode does not work for VC++ 4.2, turning _STLP_DEBUG off ...") williamr@4: # undef _STLP_DEBUG williamr@4: # endif williamr@4: # define _STLP_NO_BOOL 1 williamr@4: # define _STLP_NEED_TYPENAME 1 williamr@4: # define _STLP_NEED_EXPLICIT 1 williamr@4: # define _STLP_NEED_MUTABLE 1 williamr@4: # define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX williamr@4: # define _STLP_LIMITED_DEFAULT_TEMPLATES 1 williamr@4: # define _STLP_NONTEMPL_BASE_MATCH_BUG 1 williamr@4: # define _STLP_BROKEN_USING_DIRECTIVE 1 williamr@4: # define _STLP_NO_ARROW_OPERATOR 1 williamr@4: # define _STLP_NO_SIGNED_BUILTINS 1 williamr@4: # define _STLP_NO_EXCEPTION_SPEC 1 williamr@4: # define _STLP_HAS_NO_NAMESPACES 1 williamr@4: # define _STLP_NO_AT_MEMBER_FUNCTION 1 williamr@4: # define _STLP_NO_MEMBER_TEMPLATES 1 williamr@4: # endif /* 1100 */ williamr@4: williamr@4: #endif /* _STLP_MSVC */ williamr@4: williamr@4: /** The desktop variants starting with VC8 have a set of more secure replacements williamr@4: for the error-prone string handling functions of the C standard lib. */ williamr@4: #if (_STLP_MSVC_LIB >= 1400) && !defined (_STLP_USING_PLATFORM_SDK_COMPILER) && !defined(UNDER_CE) williamr@4: # define _STLP_USE_SAFE_STRING_FUNCTIONS 1 williamr@4: #endif williamr@4: williamr@4: #if (_STLP_MSVC_LIB <= 1310) williamr@4: # define _STLP_VENDOR_GLOBAL_CSTD williamr@4: #endif williamr@4: williamr@4: #if (_STLP_MSVC_LIB >= 1300) && !defined(UNDER_CE) williamr@4: /* Starting with MSVC 7.0 and compilers simulating it, williamr@4: * we assume that the new SDK is granted: williamr@4: */ williamr@4: # define _STLP_NEW_PLATFORM_SDK 1 williamr@4: #endif williamr@4: williamr@4: #if (_STLP_MSVC_LIB < 1300) /* including MSVC 6.0 */ williamr@4: # define _STLP_GLOBAL_NEW_HANDLER 1 williamr@4: # define _STLP_VENDOR_UNEXPECTED_STD williamr@4: # define _STLP_NEW_DONT_THROW_BAD_ALLOC 1 williamr@4: #endif williamr@4: williamr@4: #if (_STLP_MSVC_LIB < 1100) williamr@4: /* up to 4.2, library is in global namespace */ williamr@4: # define _STLP_VENDOR_GLOBAL_STD williamr@4: #endif williamr@4: williamr@4: #if (_STLP_MSVC_LIB <= 1010) williamr@4: /* "bool" is reserved in MSVC 4.1 while absent, so : */ williamr@4: # define _STLP_NO_BAD_ALLOC williamr@4: # define _STLP_HAS_NO_NEW_C_HEADERS 1 williamr@4: # define _STLP_NO_NEW_NEW_HEADER 1 williamr@4: #elif (_STLP_MSVC_LIB < 1100) williamr@4: /* VC++ 4.2 and higher */ williamr@4: # define _STLP_YVALS_H 1 williamr@4: # define _STLP_USE_NO_IOSTREAMS 1 williamr@4: #endif williamr@4: williamr@4: #define _STLP_EXPORT_DECLSPEC __declspec(dllexport) williamr@4: #define _STLP_IMPORT_DECLSPEC __declspec(dllimport) williamr@4: williamr@4: #if !defined (_STLP_MSVC) || (_STLP_MSVC >= 1100) williamr@4: # define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport) williamr@4: # define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport) williamr@4: #endif williamr@4: williamr@4: #if defined (__DLL) || defined (_DLL) || defined (_RTLDLL) || defined (_AFXDLL) williamr@4: # define _STLP_RUNTIME_DLL williamr@4: #endif williamr@4: #if defined (__BUILDING_STLPORT) && \ williamr@4: (defined (_STLP_USE_DYNAMIC_LIB) || \ williamr@4: defined (_STLP_RUNTIME_DLL) && !defined (_STLP_USE_STATIC_LIB)) williamr@4: # define _STLP_DLL williamr@4: #endif williamr@4: #include williamr@4: #undef _STLP_RUNTIME_DLL williamr@4: #undef _STLP_DLL williamr@4: williamr@4: #if defined (_STLP_USE_DYNAMIC_LIB) williamr@4: # undef _STLP_USE_DECLSPEC williamr@4: # define _STLP_USE_DECLSPEC 1 williamr@4: # if (_STLP_MSVC >= 1200) && (_STLP_MSVC < 1300) williamr@4: # define _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND 1 williamr@4: # endif williamr@4: #endif williamr@4: williamr@4: #if !defined (_STLP_IMPORT_TEMPLATE_KEYWORD) williamr@4: # if !defined (_MSC_EXTENSIONS) || defined(_STLP_MSVC) && _STLP_MSVC >= 1300 williamr@4: # define _STLP_IMPORT_TEMPLATE_KEYWORD williamr@4: # else williamr@4: # define _STLP_IMPORT_TEMPLATE_KEYWORD extern williamr@4: # endif williamr@4: #endif williamr@4: #define _STLP_EXPORT_TEMPLATE_KEYWORD williamr@4: williamr@4: #if defined (_STLP_MSVC) && (_STLP_MSVC < 1200) williamr@4: /* only static STLport lib now works for VC 5.0 */ williamr@4: # undef _STLP_USE_STATIC_LIB williamr@4: # undef _STLP_USE_DYNAMIC_LIB williamr@4: # define _STLP_USE_STATIC_LIB williamr@4: /* disable hook which makes template symbols to be searched for in the library */ williamr@4: # undef _STLP_NO_CUSTOM_IO williamr@4: #endif williamr@4: williamr@4: #include williamr@4: williamr@4: #if defined (_STLP_USING_PLATFORM_SDK_COMPILER) williamr@4: /* The Windows 64 bits SDK required for the moment link to bufferoverflowU.lib for williamr@4: * additional buffer overrun checks. Rather than require the STLport build system and williamr@4: * users to explicitely link with it we use the MSVC auto link feature. williamr@4: */ williamr@4: # if !defined (_STLP_DONT_USE_AUTO_LINK) || defined (__BUILDING_STLPORT) williamr@4: # pragma comment (lib, "bufferoverflowU.lib") williamr@4: # if defined (_STLP_VERBOSE_AUTO_LINK) williamr@4: # pragma message ("STLport: Auto linking to bufferoverflowU.lib") williamr@4: # endif williamr@4: # endif williamr@4: #endif williamr@4: williamr@4: /* Local Variables: williamr@4: * mode:C++ williamr@4: * End: williamr@4: */