PageRenderTime 39ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 1ms

/platform/shared/stlport/stlport/stl/config/_msvc.h

https://github.com/manishasarkar/rhodes
C Header | 353 lines | 211 code | 48 blank | 94 comment | 43 complexity | 268329c8bdb40d155284812ee6ad1fbd MD5 | raw file
  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. #if !defined (_STLP_COMPILER)
  6. # define _STLP_COMPILER "Microsoft Visual Studio C++"
  7. #endif
  8. #if !defined (__ICL) && !defined (_STLP_MSVC)
  9. # define _STLP_MSVC _MSC_VER
  10. #endif
  11. #if !defined (_STLP_MSVC_LIB)
  12. # define _STLP_MSVC_LIB _MSC_VER
  13. #endif
  14. #if defined (__BUILDING_STLPORT) && defined (_MANAGED)
  15. /* Building a managed version of STLport is not supported because we haven't
  16. * found a good reason to support it. However, building a managed translation
  17. * unit using STLport _is_ supported.
  18. */
  19. # error Sorry but building a managed version of STLport is not supported.
  20. #endif
  21. #if defined (_STLP_USING_PLATFORM_SDK_COMPILER)
  22. /* This is a specific section for compilers coming with platform SDKs. Native
  23. * library coming with it is different from the one coming with commercial
  24. * MSVC compilers so there is some specific settings.
  25. */
  26. # define _STLP_NATIVE_INCLUDE_PATH ../crt
  27. # define _STLP_VENDOR_GLOBAL_CSTD
  28. # define _STLP_VENDOR_TERMINATE_STD
  29. # define _STLP_GLOBAL_NEW_HANDLER
  30. # if (_STLP_MSVC_LIB <= 1400)
  31. /* We hope this bug will be fixed in future versions. */
  32. # define _STLP_NEW_DONT_THROW_BAD_ALLOC 1
  33. # endif
  34. #endif
  35. #define _STLP_CALL __cdecl
  36. #ifndef _STLP_LONG_LONG
  37. # define _STLP_LONG_LONG __int64
  38. #endif
  39. #define _STLP_PRAGMA_ONCE
  40. /* These switches depend on compiler flags. We are hoping here that compilers
  41. * simulating MSVC behavior use identical macros to report compilation context.
  42. * Otherwise those macros will have to be undef in specific compiler configuration
  43. * files.
  44. */
  45. #ifndef _CPPUNWIND
  46. # define _STLP_DONT_USE_EXCEPTIONS 1
  47. #endif
  48. #ifndef _CPPRTTI
  49. # define _STLP_NO_RTTI 1
  50. #endif
  51. #if defined (_MT) && !defined (_STLP_NO_THREADS) && !defined (_REENTRANT)
  52. # define _REENTRANT 1
  53. #endif
  54. #if !defined (_NATIVE_WCHAR_T_DEFINED)
  55. # define _STLP_WCHAR_T_IS_USHORT 1
  56. #endif
  57. #define _STLP_MINIMUM_IMPORT_STD
  58. #define _STLP_NO_VENDOR_STDLIB_L 1
  59. #if defined (_STLP_MSVC)
  60. #define _STLP_NORETURN_FUNCTION __declspec(noreturn)
  61. /* Full compiler version comes from boost library intrinsics.hpp header. */
  62. # if defined (_MSC_FULL_VER) && (_MSC_FULL_VER >= 140050215)
  63. # define _STLP_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
  64. # define _STLP_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T)
  65. # define _STLP_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T)
  66. # define _STLP_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
  67. # define _STLP_IS_POD(T) __is_pod(T)
  68. # define _STLP_HAS_TYPE_TRAITS_INTRINSICS
  69. # endif
  70. # ifndef _STLP_MSVC50_COMPATIBILITY
  71. # define _STLP_MSVC50_COMPATIBILITY 1
  72. # endif
  73. # define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1
  74. # define _STLP_HAS_SPECIFIC_PROLOG_EPILOG 1
  75. /* # ifndef __BUILDING_STLPORT
  76. * # define _STLP_USE_TEMPLATE_EXPORT 1
  77. * # endif
  78. */
  79. # if (_STLP_MSVC <= 1401)
  80. # define _STLP_STATIC_CONST_INIT_BUG 1
  81. # endif
  82. /** Note: the macro _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT is defined
  83. unconditionally and undef'ed here when applicable. */
  84. # if defined(UNDER_CE)
  85. /* eVCx:
  86. uncaught_exception is declared in the SDKs delivered with eVC4 (eVC3 is
  87. unknown) and they all reside in namespace 'std' there. However, they are not
  88. part of any lib so linking fails. When using VC8 to crosscompile for CE 5 on
  89. an ARMV4I, the uncaught_exception test fails, the function returns the wrong
  90. value. */
  91. # else
  92. /* VCx:
  93. These are present at least since VC6, but the uncaught_exception() of VC6 is
  94. broken, it returns the wrong value in the unittests. 7.1 and later seem to
  95. work, 7.0 is still unknown (we assume it works until negative report). */
  96. # if (_STLP_MSVC >= 1300)// VC7 and later
  97. # undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
  98. # if !defined (_STLP_DONT_USE_EXCEPTIONS)
  99. # define _STLP_NOTHROW throw()
  100. # endif
  101. # endif
  102. # endif
  103. # if (_STLP_MSVC <= 1300)
  104. # define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
  105. # define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
  106. /* There is no partial spec, and MSVC breaks on simulating it for iterator_traits queries */
  107. # define _STLP_USE_OLD_HP_ITERATOR_QUERIES
  108. # define _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER
  109. # define _STLP_NO_METHOD_SPECIALIZATION 1
  110. # define _STLP_DEF_CONST_PLCT_NEW_BUG 1
  111. # define _STLP_NO_TYPENAME_ON_RETURN_TYPE 1
  112. /* VC++ cannot handle default allocator argument in template constructors */
  113. # define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
  114. # define _STLP_NO_QUALIFIED_FRIENDS 1
  115. # define _STLP_NO_FRIEND_TEMPLATES
  116. /* Fails to properly resolve call to sin() from within sin() */
  117. # endif
  118. # if (_STLP_MSVC < 1300)
  119. # define _STLP_NO_IEC559_SUPPORT 1
  120. # endif
  121. # if (_STLP_MSVC < 1300) /* including MSVC 6.0 */
  122. # define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
  123. # define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1
  124. # endif
  125. # if (_STLP_MSVC >= 1200)
  126. # define _STLP_HAS_NATIVE_FLOAT_ABS 1
  127. # endif
  128. // TODO: some eVC4 compilers report _MSC_VER 1201 or 1202, which category do they belong to?
  129. # if (_STLP_MSVC > 1200) && (_STLP_MSVC < 1310)
  130. # define _STLP_NO_MOVE_SEMANTIC
  131. # endif
  132. # if (_STLP_MSVC < 1300)
  133. /* TODO: remove this if it is handled and documented elsewhere
  134. * dums: VC6 do not handle correctly member templates of class that are explicitely
  135. * instanciated to be exported. There is a workaround, seperate the non template methods
  136. * from the template ones within 2 different classes and only export the non template one.
  137. * It is implemented for basic_string and locale at the writing of this note.
  138. * However this problem hos not been considered as important enough to remove template member
  139. * methods for other classes. Moreover Boost (www.boost.org) required it to be granted.
  140. * The workaround is activated thanks to the _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND macro defined
  141. * later in this config file.
  142. */
  143. /*
  144. # if defined (_DLL)
  145. # define _STLP_NO_MEMBER_TEMPLATES 1
  146. # endif
  147. */
  148. /* Boris : not defining this macro for SP5 causes other problems */
  149. /*# if !defined (_MSC_FULL_VER) || (_MSC_FULL_VER < 12008804 ) */
  150. # define _STLP_NO_USING_FOR_GLOBAL_FUNCTIONS 1
  151. /*# endif */
  152. # define _STLP_DONT_USE_BOOL_TYPEDEF 1
  153. # define _STLP_DONT_RETURN_VOID 1
  154. # endif
  155. /*
  156. * MSVC6 is known to have many trouble with namespace management but
  157. * MSVC .Net 2003 and 2005 also have a bug difficult to reproduce without
  158. * STLport:
  159. * namespace stlp_std {
  160. * typedef int foo_int;
  161. * }
  162. * #include <map>
  163. * const foo_int bar = 0;
  164. *
  165. * As you can see foo is available without namespace specification as if
  166. * a using namespace stlp_std has been performed. Defining _STLP_USING_NAMESPACE_BUG
  167. * restore the expected compilation error.
  168. */
  169. # define _STLP_USING_NAMESPACE_BUG 1
  170. # if (_STLP_MSVC < 1300) /* MSVC 6.0 and earlier */
  171. # define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
  172. /* defined for DEBUG and NDEBUG too, to allow user mix own debug build with STLP release library */
  173. # define _STLP_USE_ABBREVS
  174. # endif
  175. // TODO: what is the earliest version for this? If it is 1200, use _STLP_MSVC>=1200.
  176. # if (_STLP_MSVC > 1100) && (_STLP_MSVC < 1300)
  177. typedef char __stl_char;
  178. # define _STLP_DEFAULTCHAR __stl_char
  179. # endif
  180. # if (_STLP_MSVC < 1200) /* before VC++ 6.0 */
  181. /* # define _STLP_NO_MEMBER_TEMPLATES 1 */
  182. # define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS 1
  183. # define _STLP_DONT_USE_PARTIAL_SPEC_WRKD 1
  184. # define _STLP_QUALIFIED_SPECIALIZATION_BUG 1
  185. # define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
  186. # define _STLP_THROW_RETURN_BUG 1
  187. # define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
  188. # define _STLP_DEF_CONST_DEF_PARAM_BUG 1
  189. # endif
  190. # if (_STLP_MSVC < 1100 )
  191. # ifndef _STLP_USE_NO_IOSTREAMS
  192. # define _STLP_USE_NO_IOSTREAMS
  193. # endif
  194. /* # define _STLP_NESTED_TYPE_PARAM_BUG 1 */
  195. /* Debug mode does not work for 4.2 */
  196. # if defined (_STLP_DEBUG)
  197. # pragma message ("STLport debug mode does not work for VC++ 4.2, turning _STLP_DEBUG off ...")
  198. # undef _STLP_DEBUG
  199. # endif
  200. # define _STLP_NO_BOOL 1
  201. # define _STLP_NEED_TYPENAME 1
  202. # define _STLP_NEED_EXPLICIT 1
  203. # define _STLP_NEED_MUTABLE 1
  204. # define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
  205. # define _STLP_LIMITED_DEFAULT_TEMPLATES 1
  206. # define _STLP_NONTEMPL_BASE_MATCH_BUG 1
  207. # define _STLP_BROKEN_USING_DIRECTIVE 1
  208. # define _STLP_NO_ARROW_OPERATOR 1
  209. # define _STLP_NO_SIGNED_BUILTINS 1
  210. # define _STLP_NO_EXCEPTION_SPEC 1
  211. # define _STLP_HAS_NO_NAMESPACES 1
  212. # define _STLP_NO_AT_MEMBER_FUNCTION 1
  213. # define _STLP_NO_MEMBER_TEMPLATES 1
  214. # endif /* 1100 */
  215. #endif /* _STLP_MSVC */
  216. /** The desktop variants starting with VC8 have a set of more secure replacements
  217. for the error-prone string handling functions of the C standard lib. */
  218. #if (_STLP_MSVC_LIB >= 1400) && !defined (_STLP_USING_PLATFORM_SDK_COMPILER) && !defined(UNDER_CE)
  219. # define _STLP_USE_SAFE_STRING_FUNCTIONS 1
  220. #endif
  221. #if (_STLP_MSVC_LIB <= 1310)
  222. # define _STLP_VENDOR_GLOBAL_CSTD
  223. #endif
  224. #if (_STLP_MSVC_LIB >= 1300) && !defined(UNDER_CE)
  225. /* Starting with MSVC 7.0 and compilers simulating it,
  226. * we assume that the new SDK is granted:
  227. */
  228. # define _STLP_NEW_PLATFORM_SDK 1
  229. #endif
  230. #if (_STLP_MSVC_LIB < 1300) /* including MSVC 6.0 */
  231. # define _STLP_GLOBAL_NEW_HANDLER 1
  232. # define _STLP_VENDOR_UNEXPECTED_STD
  233. # define _STLP_NEW_DONT_THROW_BAD_ALLOC 1
  234. #endif
  235. #if (_STLP_MSVC_LIB < 1100)
  236. /* up to 4.2, library is in global namespace */
  237. # define _STLP_VENDOR_GLOBAL_STD
  238. #endif
  239. #if (_STLP_MSVC_LIB <= 1010)
  240. /* "bool" is reserved in MSVC 4.1 while <yvals.h> absent, so : */
  241. # define _STLP_NO_BAD_ALLOC
  242. # define _STLP_HAS_NO_NEW_C_HEADERS 1
  243. # define _STLP_NO_NEW_NEW_HEADER 1
  244. #elif (_STLP_MSVC_LIB < 1100)
  245. /* VC++ 4.2 and higher */
  246. # define _STLP_YVALS_H 1
  247. # define _STLP_USE_NO_IOSTREAMS 1
  248. #endif
  249. #define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
  250. #define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
  251. #if !defined (_STLP_MSVC) || (_STLP_MSVC >= 1100)
  252. # define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
  253. # define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
  254. #endif
  255. #if defined (__DLL) || defined (_DLL) || defined (_RTLDLL) || defined (_AFXDLL)
  256. # define _STLP_RUNTIME_DLL
  257. #endif
  258. #if defined (__BUILDING_STLPORT) && \
  259. (defined (_STLP_USE_DYNAMIC_LIB) || \
  260. defined (_STLP_RUNTIME_DLL) && !defined (_STLP_USE_STATIC_LIB))
  261. # define _STLP_DLL
  262. #endif
  263. #include <stl/config/_detect_dll_or_lib.h>
  264. #undef _STLP_RUNTIME_DLL
  265. #undef _STLP_DLL
  266. #if defined (_STLP_USE_DYNAMIC_LIB)
  267. # undef _STLP_USE_DECLSPEC
  268. # define _STLP_USE_DECLSPEC 1
  269. # if (_STLP_MSVC >= 1200) && (_STLP_MSVC < 1300)
  270. # define _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND 1
  271. # endif
  272. #endif
  273. #if !defined (_STLP_IMPORT_TEMPLATE_KEYWORD)
  274. # if !defined (_MSC_EXTENSIONS) || defined(_STLP_MSVC) && _STLP_MSVC >= 1300
  275. # define _STLP_IMPORT_TEMPLATE_KEYWORD
  276. # else
  277. # define _STLP_IMPORT_TEMPLATE_KEYWORD extern
  278. # endif
  279. #endif
  280. #define _STLP_EXPORT_TEMPLATE_KEYWORD
  281. #if defined (_STLP_MSVC) && (_STLP_MSVC < 1200)
  282. /* only static STLport lib now works for VC 5.0 */
  283. # undef _STLP_USE_STATIC_LIB
  284. # undef _STLP_USE_DYNAMIC_LIB
  285. # define _STLP_USE_STATIC_LIB
  286. /* disable hook which makes template symbols to be searched for in the library */
  287. # undef _STLP_NO_CUSTOM_IO
  288. #endif
  289. #include <stl/config/_auto_link.h>
  290. #if defined (_STLP_USING_PLATFORM_SDK_COMPILER)
  291. /* The Windows 64 bits SDK required for the moment link to bufferoverflowU.lib for
  292. * additional buffer overrun checks. Rather than require the STLport build system and
  293. * users to explicitely link with it we use the MSVC auto link feature.
  294. */
  295. # if !defined (_STLP_DONT_USE_AUTO_LINK) || defined (__BUILDING_STLPORT)
  296. # pragma comment (lib, "bufferoverflowU.lib")
  297. # if defined (_STLP_VERBOSE_AUTO_LINK)
  298. # pragma message ("STLport: Auto linking to bufferoverflowU.lib")
  299. # endif
  300. # endif
  301. #endif
  302. /* Local Variables:
  303. * mode:C++
  304. * End:
  305. */