1*c2c66affSColin Finck // STLport configuration file for Digital Mars C++ 2*c2c66affSColin Finck 3*c2c66affSColin Finck #define _STLP_COMPILER __DMC_VERSION_STRING__ 4*c2c66affSColin Finck 5*c2c66affSColin Finck #if (__DMC__ < 0x849) 6*c2c66affSColin Finck # error "Digital Mars C++ compilers before version 8.49 are not supported!" 7*c2c66affSColin Finck #endif 8*c2c66affSColin Finck 9*c2c66affSColin Finck /* DMC goes too far in template instanciation and tries to fully instanciate 10*c2c66affSColin Finck * slist<pair<const int, string> > for instance. The generation of assignment 11*c2c66affSColin Finck * operator fails of course so we are force to use mutable key for this compiler. 12*c2c66affSColin Finck */ 13*c2c66affSColin Finck #define _STLP_NO_CONST_IN_PAIR 14*c2c66affSColin Finck #define _STLP_DONT_SUP_DFLT_PARAM 15*c2c66affSColin Finck 16*c2c66affSColin Finck #ifndef _CPPUNWIND 17*c2c66affSColin Finck # define _STLP_NO_EXCEPTIONS 18*c2c66affSColin Finck #endif 19*c2c66affSColin Finck 20*c2c66affSColin Finck #ifndef _CPPRTTI 21*c2c66affSColin Finck # define _STLP_NO_RTTI 22*c2c66affSColin Finck #endif 23*c2c66affSColin Finck 24*c2c66affSColin Finck #define _STLP_VENDOR_GLOBAL_CSTD 25*c2c66affSColin Finck 26*c2c66affSColin Finck //DMC prefer enum to real static const variable because it do not consider 27*c2c66affSColin Finck //static const as const enough to be used in switch declaration... 28*c2c66affSColin Finck #define _STLP_STATIC_CONST_INIT_BUG 29*c2c66affSColin Finck 30*c2c66affSColin Finck #if !defined (_WIN32) 31*c2c66affSColin Finck // it's not fully supported on non-Win32 platforms 32*c2c66affSColin Finck # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 33*c2c66affSColin Finck #endif 34*c2c66affSColin Finck 35*c2c66affSColin Finck /* _STLP_NO_OWN_NAMESPACE is defined because Digital Mars' linker and libarian 36*c2c66affSColin Finck appear to have problems with STLport namespaces. Summary of the issues: 37*c2c66affSColin Finck 38*c2c66affSColin Finck STATIC: Digital Mars' librarian (lib.exe) may fail with "len <= IDMAX" error 39*c2c66affSColin Finck if _STLP_DEBUG is defined. This is because Digital Mars' librarian uses 40*c2c66affSColin Finck Microsoft OMF format, which limits identifier length to about 512 bytes. 41*c2c66affSColin Finck With STLport namespaces, some identifiers such as Category_Map in 42*c2c66affSColin Finck src/locale_catalog.cpp may exceed the maximum OMF identifier length. 43*c2c66affSColin Finck 44*c2c66affSColin Finck DYNAMIC: Export issues with cin, cout, cerr, clog in src/iostream.cpp. 45*c2c66affSColin Finck Exports in Digital Mars 'def' file must match mangled names in iostream.cpp. 46*c2c66affSColin Finck With STLport namespaces, the mangled names in the intermediate files no 47*c2c66affSColin Finck longer match these pre-defined exports. To use STLport dynamic libraries 48*c2c66affSColin Finck and STLport namespaces with Digital Mars, the pre-defined exports in 49*c2c66affSColin Finck src/iostream.cpp and the related Digital Mars 'def' files would need to be 50*c2c66affSColin Finck revised. */ 51*c2c66affSColin Finck #define _STLP_NO_OWN_NAMESPACE 1 52*c2c66affSColin Finck 53*c2c66affSColin Finck // select threads strategy 54*c2c66affSColin Finck #if defined (_MT) && !defined (_STLP_NO_THREADS) 55*c2c66affSColin Finck # define _STLP_THREADS 56*c2c66affSColin Finck #endif 57*c2c66affSColin Finck 58*c2c66affSColin Finck #ifndef _BOOL_DEFINED 59*c2c66affSColin Finck # define _STLP_NO_BOOL 60*c2c66affSColin Finck #else 61*c2c66affSColin Finck # define _STLP_DONT_USE_BOOL_TYPEDEF 62*c2c66affSColin Finck #endif 63*c2c66affSColin Finck 64*c2c66affSColin Finck #if _INTEGRAL_MAX_BITS >= 64 65*c2c66affSColin Finck # define _STLP_LONG_LONG long long 66*c2c66affSColin Finck #endif 67*c2c66affSColin Finck 68*c2c66affSColin Finck #define _STLP_MARK_PARAMETER_AS_UNUSED(X) 69*c2c66affSColin Finck #define _STLP_DONT_USE_PRIV_NAMESPACE 70*c2c66affSColin Finck #define _STLP_PRIV 71*c2c66affSColin Finck #define _STLP_THROW_RETURN_BUG 72*c2c66affSColin Finck 73*c2c66affSColin Finck #if !defined (_DLL) 74*c2c66affSColin Finck # undef _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT 75*c2c66affSColin Finck #endif 76*c2c66affSColin Finck 77*c2c66affSColin Finck #if (__DMC__ < 0x849) 78*c2c66affSColin Finck # define _STLP_NO_BAD_ALLOC 79*c2c66affSColin Finck #endif 80*c2c66affSColin Finck 81*c2c66affSColin Finck #define _STLP_USE_ABBREVS 82*c2c66affSColin Finck #define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 83*c2c66affSColin Finck 84*c2c66affSColin Finck #define _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND 85*c2c66affSColin Finck #define _STLP_EXPORT_DECLSPEC __declspec(dllexport) 86*c2c66affSColin Finck #define _STLP_IMPORT_DECLSPEC __declspec(dllimport) 87*c2c66affSColin Finck 88*c2c66affSColin Finck #define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport) 89*c2c66affSColin Finck #define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport) 90*c2c66affSColin Finck 91*c2c66affSColin Finck #define _STLP_NEED_ADDITIONAL_STATIC_DECLSPEC 92*c2c66affSColin Finck 93*c2c66affSColin Finck //#define _STLP_IMPORT_TEMPLATE_KEYWORD __declspec(dllimport) 94*c2c66affSColin Finck //#define _STLP_EXPORT_TEMPLATE_KEYWORD __declspec(dllexport) 95*c2c66affSColin Finck 96*c2c66affSColin Finck #if defined (_WINDLL) 97*c2c66affSColin Finck # define _STLP_DLL 98*c2c66affSColin Finck #endif 99*c2c66affSColin Finck #if defined (_DLL) 100*c2c66affSColin Finck # define _STLP_RUNTIME_DLL 101*c2c66affSColin Finck #endif 102*c2c66affSColin Finck #include <stl/config/_detect_dll_or_lib.h> 103*c2c66affSColin Finck #undef _STLP_RUNTIME_DLL 104*c2c66affSColin Finck #undef _STLP_DLL 105*c2c66affSColin Finck 106*c2c66affSColin Finck #if defined (_STLP_USE_DYNAMIC_LIB) 107*c2c66affSColin Finck # define _STLP_USE_DECLSPEC 1 108*c2c66affSColin Finck # if defined (__BUILDING_STLPORT) 109*c2c66affSColin Finck # define _STLP_CALL __export 110*c2c66affSColin Finck # else 111*c2c66affSColin Finck # define _STLP_CALL 112*c2c66affSColin Finck # endif 113*c2c66affSColin Finck #else 114*c2c66affSColin Finck # define _STLP_CALL 115*c2c66affSColin Finck #endif 116*c2c66affSColin Finck 117*c2c66affSColin Finck #include <stl/config/_auto_link.h> 118*c2c66affSColin Finck 119*c2c66affSColin Finck #undef __SC__ 120*c2c66affSColin Finck 121*c2c66affSColin Finck #include <stl/config/_feedback.h> 122