_dm.h 3.4 KB

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