features.h 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084
  1. /*
  2. *
  3. * Copyright (c) 1994
  4. * Hewlett-Packard Company
  5. *
  6. * Copyright (c) 1996,1997
  7. * Silicon Graphics Computer Systems, Inc.
  8. *
  9. * Copyright (c) 1997
  10. * Moscow Center for SPARC Technology
  11. *
  12. * Copyright (c) 1999
  13. * Boris Fomitchev
  14. *
  15. * This material is provided "as is", with absolutely no warranty expressed
  16. * or implied. Any use is at your own risk.
  17. *
  18. * Permission to use or copy this software for any purpose is hereby granted
  19. * without fee, provided the above notices are retained on all copies.
  20. * Permission to modify the code and to distribute modified code is granted,
  21. * provided the above notices are retained, and a notice that the code was
  22. * modified is included with the above copyright notice.
  23. *
  24. */
  25. #ifndef _STLP_FEATURES_H
  26. #define _STLP_FEATURES_H
  27. /*
  28. * Purpose of this file:
  29. *
  30. * Defines all STLport settings.
  31. * This file is actually a wrapper : it includes compiler-specific
  32. * settings from <config/stlcomp.h>
  33. * and user-defined settings from <config/user_config.h>.
  34. * See <config/stl_mycomp.h> and <config/user_config.h> for the description
  35. * of those macros
  36. *
  37. */
  38. /* Definition of the STLport version informations */
  39. #include <stl/_stlport_version.h>
  40. /* Other macros defined by this file:
  41. * bool, true, and false, if _STLP_NO_BOOL is defined.
  42. * typename, as a null macro if it's not already a keyword.
  43. * explicit, as a null macro if it's not already a keyword.
  44. * namespace-related macros (_STLP_STD, _STLP_BEGIN_NAMESPACE, etc.)
  45. * exception-related macros (_STLP_TRY, _STLP_UNWIND, etc.)
  46. * _STLP_ASSERT, either as a test or as a null macro, depending on
  47. whether or not _STLP_ASSERTIONS is defined.
  48. */
  49. /* Definition of the 2 STLport debug levels */
  50. #define _STLP_STLPORT_DBG_LEVEL 1
  51. #define _STLP_STANDARD_DBG_LEVEL 2
  52. /* Common settings for SGX */
  53. #include <stl/config/_sgx.h>
  54. /* Placeholder for user to override settings.
  55. * It could be also used to mask settings from
  56. * different directories.
  57. */
  58. #include <stl/config/user_config.h>
  59. #if defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_LEVEL)
  60. # define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL
  61. #endif
  62. #if defined (__BUILDING_STLPORT)
  63. /* For the STLport implementation we can use everything:
  64. */
  65. # if defined (_STLP_NO_ANACHRONISMS)
  66. # undef _STLP_NO_ANACHRONISMS
  67. # endif
  68. # if defined (_STLP_NO_EXTENSIONS)
  69. # undef _STLP_NO_EXTENSIONS
  70. # endif
  71. /* Moreover there are things that have no sens:
  72. */
  73. # if !defined (_STLP_SGX_CONFIG)
  74. # if defined (_STLP_NO_IOSTREAMS)
  75. # error If you do not use iostreams you do not need to build the STLport library.
  76. # endif
  77. # endif
  78. #endif
  79. /* ========================================================= */
  80. /* This file is used for compatibility; it accepts old-style config
  81. switches */
  82. #include <stl/config/compat.h>
  83. /* Common configuration file for this particular installation. */
  84. #include <stl/config/host.h>
  85. /* Operational Environment specific */
  86. #include <stl/config/_system.h>
  87. /* ========================================================= */
  88. /* some fixes to configuration. This also includes modifications
  89. * of STLport switches depending on compiler flags,
  90. * or settings applicable to a group of compilers, such as
  91. * to all who use EDG front-end.
  92. */
  93. #include <stl/config/stl_confix.h>
  94. #if !defined (_STLP_NO_MEMBER_TEMPLATES) && !defined (_STLP_MEMBER_TEMPLATES)
  95. # define _STLP_MEMBER_TEMPLATES 1
  96. #endif
  97. #if !defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_MEMBER_TEMPLATE_CLASSES)
  98. # define _STLP_MEMBER_TEMPLATE_CLASSES 1
  99. #endif
  100. #if defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
  101. # define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1
  102. #endif
  103. #if !defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
  104. # define _STLP_CLASS_PARTIAL_SPECIALIZATION 1
  105. #endif
  106. #if !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && !defined (_STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER)
  107. # define _STLP_FUNCTION_TMPL_PARTIAL_ORDER 1
  108. #endif
  109. #if !defined (_STLP_DONT_USE_SHORT_STRING_OPTIM) && !defined (_STLP_USE_SHORT_STRING_OPTIM)
  110. # define _STLP_USE_SHORT_STRING_OPTIM 1
  111. #endif
  112. #if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_EXTENSIONS) && \
  113. !defined (_STLP_NO_CONTAINERS_EXTENSION) && !defined (_STLP_USE_CONTAINERS_EXTENSION)
  114. # define _STLP_USE_CONTAINERS_EXTENSION
  115. #endif
  116. #if defined (_STLP_USE_CONTAINERS_EXTENSION)
  117. # define _STLP_TEMPLATE_FOR_CONT_EXT template <class _KT>
  118. #else
  119. # define _STLP_TEMPLATE_FOR_CONT_EXT
  120. #endif
  121. #if defined (_STLP_USE_PTR_SPECIALIZATIONS) && \
  122. (defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS))
  123. # error Sorry but according the STLport settings your compiler can not support the pointer specialization feature.
  124. #endif
  125. #if defined (_STLP_WHOLE_NATIVE_STD) && defined (_STLP_NO_OWN_NAMESPACE)
  126. # error Sorry but asking for both STLport to be in the real std namespace and also having STLport import all native std stuff \
  127. is invalid, chose one or none.
  128. #endif
  129. #if defined (_STLP_VERBOSE) && !defined (_STLP_VERBOSE_MODE_SUPPORTED)
  130. # error Sorry but the verbose mode is not implemented for your compiler.
  131. #endif
  132. #if defined (_STLP_NO_IOSTREAMS) && \
  133. !defined (_STLP_USE_NEWALLOC) && !defined (_STLP_USE_MALLOC)
  134. # define _STLP_USE_NEWALLOC
  135. #endif
  136. #if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN)
  137. # if defined (_MIPSEB) || defined (__sparc) || defined (_AIX) || \
  138. defined (__hpux) || defined (macintosh) || defined (_MAC)
  139. # define _STLP_BIG_ENDIAN 1
  140. # elif defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \
  141. defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \
  142. defined (__alpha__)
  143. # define _STLP_LITTLE_ENDIAN 1
  144. # elif defined (__ia64__)
  145. /* itanium allows both settings (for instance via gcc -mbig-endian) - hence a seperate check is required */
  146. # if defined (__BIG_ENDIAN__)
  147. # define _STLP_BIG_ENDIAN 1
  148. # else
  149. # define _STLP_LITTLE_ENDIAN 1
  150. # endif
  151. # else
  152. # error "can't determine endianess"
  153. # endif
  154. #endif /* _STLP_BIG_ENDIAN */
  155. /* ==========================================================
  156. * final workaround tuning based on given flags
  157. * ========================================================== */
  158. #ifndef _STLP_UINT32_T
  159. # define _STLP_UINT32_T unsigned long
  160. #endif
  161. #ifndef _STLP_ABORT
  162. # define _STLP_ABORT() abort()
  163. #endif
  164. #if !defined (_STLP_HAS_NO_NAMESPACES)
  165. # if defined _STLP_NO_NAMESPACES
  166. # undef _STLP_USE_NAMESPACES
  167. # else
  168. /* assume it as the default, turn it off later if NO_NAMESPACES selected */
  169. # undef _STLP_USE_NAMESPACES
  170. # define _STLP_USE_NAMESPACES 1
  171. # endif
  172. #endif
  173. #if defined (_STLP_NO_IOSTREAMS)
  174. # define _STLP_USE_NO_IOSTREAMS
  175. #endif
  176. /* Operating system recognition (basic) */
  177. #if (defined(__unix) || defined(__linux__) || defined(__QNX__) || defined(_AIX) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__Lynx__) || defined(__hpux) || defined(__sgi)) && \
  178. !defined (_STLP_UNIX)
  179. # define _STLP_UNIX 1
  180. #endif /* __unix */
  181. #if !defined (_STLP_NO_LONG_DOUBLE)
  182. # define _STLP_LONGEST_FLOAT_TYPE long double
  183. #else
  184. # define _STLP_LONGEST_FLOAT_TYPE double
  185. #endif
  186. /* Native headers access macros */
  187. #if !defined (_STLP_HAS_INCLUDE_NEXT)
  188. # include <stl/config/_native_headers.h>
  189. #endif
  190. /* shared library tune-up */
  191. #if defined (__BUILDING_STLPORT)
  192. /* if we are rebuilding right now, place everything here */
  193. # undef _STLP_DESIGNATED_DLL
  194. # define _STLP_DESIGNATED_DLL 1
  195. #endif
  196. /* Use own namespace always if possible and not explicitly instructed otherwise */
  197. #if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) && \
  198. !defined (_STLP_NO_OWN_NAMESPACE)
  199. # undef _STLP_USE_OWN_NAMESPACE
  200. # define _STLP_USE_OWN_NAMESPACE 1
  201. #else
  202. # undef _STLP_WHOLE_NATIVE_STD
  203. #endif
  204. #if !defined (_NOTHREADS) && !defined (_STLP_THREADS_DEFINED)
  205. # if defined (_PTHREADS)
  206. # define _STLP_PTHREADS
  207. # define _STLP_THREADS
  208. # endif
  209. # if defined (_UITHREADS)
  210. # define _STLP_UITHREADS
  211. # define _STLP_THREADS
  212. # endif
  213. # if defined (_STLP_WIN32) && !defined (_STLP_PTHREADS)
  214. # define _STLP_WIN32THREADS 1
  215. # elif ((defined (__sun) && !defined (__linux__)) || defined (_UITHREADS) ) && \
  216. !defined(_STLP_PTHREADS)
  217. # define _STLP_UITHREADS
  218. # else
  219. # define _STLP_PTHREADS
  220. # endif /* __sgi */
  221. # define _STLP_THREADS_DEFINED
  222. #endif
  223. #if (defined (_REENTRANT) || defined (_THREAD_SAFE)) && !defined (_STLP_THREADS)
  224. # define _STLP_THREADS
  225. #endif
  226. #ifndef _STLP_STATIC_MUTEX
  227. # define _STLP_STATIC_MUTEX _STLP_mutex_base
  228. #endif
  229. #if (defined (_MFC_VER) || defined (_AFXDLL)) && !defined (_STLP_USE_MFC)
  230. # define _STLP_USE_MFC 1
  231. #endif
  232. #if defined (_STLP_THREADS)
  233. # define _STLP_VOLATILE volatile
  234. #else
  235. # define _STLP_VOLATILE
  236. #endif
  237. #if !defined (_STLP_USE_NEW_C_HEADERS) && !defined (_STLP_HAS_NO_NEW_C_HEADERS)
  238. # define _STLP_USE_NEW_C_HEADERS
  239. #endif
  240. /* disable new-style headers if requested */
  241. #if defined (_STLP_NO_NEW_C_HEADERS)
  242. # undef _STLP_USE_NEW_C_HEADERS
  243. #endif
  244. #if defined (_STLP_BASE_TYPEDEF_BUG)
  245. # undef _STLP_BASE_TYPEDEF_OUTSIDE_BUG
  246. # define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
  247. #endif
  248. #if defined (_STLP_NESTED_TYPE_PARAM_BUG)
  249. # define _STLP_GLOBAL_NESTED_RETURN_TYPE_PARAM_BUG
  250. #endif
  251. /* SUNpro 4.2 inline string literal bug */
  252. #ifdef _STLP_INLINE_STRING_LITERAL_BUG
  253. # define _STLP_FIX_LITERAL_BUG(__x) __x = __x;
  254. #else
  255. # define _STLP_FIX_LITERAL_BUG(__x)
  256. #endif
  257. #if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
  258. # undef _STLP_NO_DEFAULT_NON_TYPE_PARAM
  259. # define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
  260. #endif
  261. #if !defined (_STLP_STATIC_ASSERT)
  262. /* Some compiler support 0 size array so we use negative size array to generate
  263. * a compilation time error.
  264. */
  265. # define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1];
  266. #endif
  267. /* apple mpw exception handling bug */
  268. #ifndef _STLP_MPWFIX_TRY
  269. # define _STLP_MPWFIX_TRY
  270. #endif
  271. #ifndef _STLP_MPWFIX_CATCH
  272. # define _STLP_MPWFIX_CATCH
  273. #endif
  274. #ifndef _STLP_MPWFIX_CATCH_ACTION
  275. # define _STLP_MPWFIX_CATCH_ACTION(action)
  276. #endif
  277. #if !defined (_STLP_WEAK)
  278. # define _STLP_WEAK
  279. #endif
  280. /* default parameters as template types derived from arguments ( not always supported ) */
  281. #if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
  282. # define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname
  283. #else
  284. # if !defined (_STLP_DEFAULT_TYPE_PARAM)
  285. # define _STLP_DEFAULT_TYPE_PARAM 1
  286. # endif
  287. # define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname = defval
  288. #endif
  289. #if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
  290. # define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) class _Alloc
  291. #else
  292. # define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) \
  293. class _Alloc = allocator< pair < _Key, _Tp > >
  294. #endif
  295. /* default parameters as complete types */
  296. #if defined (_STLP_DEFAULT_TYPE_PARAM)
  297. # define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname = defval
  298. # define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name = val
  299. #else
  300. # define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname
  301. # define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name
  302. #endif
  303. /* SGI compatibility */
  304. #ifdef _STLP_NO_WCHAR_T
  305. # ifndef _STLP_NO_NATIVE_WIDE_STREAMS
  306. # define _STLP_NO_NATIVE_WIDE_STREAMS 1
  307. # endif
  308. #else
  309. # define _STLP_HAS_WCHAR_T 1
  310. #endif
  311. #if !defined (_STLP_NO_AT_MEMBER_FUNCTION)
  312. # define _STLP_CAN_THROW_RANGE_ERRORS 1
  313. #endif
  314. /* debug mode tool */
  315. #if defined (_STLP_DEBUG)
  316. # define _STLP_NON_DBG_NAME(X) _NonDbg_##X
  317. #endif
  318. /* pointer specialization tool */
  319. #if defined (_STLP_USE_PTR_SPECIALIZATIONS)
  320. # define _STLP_PTR_IMPL_NAME(X) _Impl_##X
  321. #endif
  322. #if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) || \
  323. defined (_STLP_SIGNAL_RUNTIME_COMPATIBILITY) || defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
  324. # define _STLP_NO_MEM_T_NAME(X) _NoMemT_##X
  325. #endif
  326. /* this always mean the C library is in global namespace */
  327. #if defined (_STLP_HAS_NO_NEW_C_HEADERS) && !defined (_STLP_VENDOR_GLOBAL_CSTD)
  328. # define _STLP_VENDOR_GLOBAL_CSTD 1
  329. #endif
  330. /* Depending of whether compiler supports namespaces,
  331. * tune the parameters for vendor-supplied libraries.
  332. * This section is guarded by _STLP_HAS_NO_NAMESPACES, not by _STLP_USE_NAMESPACES,
  333. * since it depends only on the native features, not on user's preference whether
  334. * to use namespace for STLport or not.
  335. */
  336. #if !defined (_STLP_HAS_NO_NAMESPACES)
  337. /* Import some vendor's headers into corresponding STLport ones if they might be needed
  338. * (if we wrap native iostreams and use namepace other than std::) */
  339. # if defined (_STLP_WHOLE_NATIVE_STD)
  340. # define _STLP_IMPORT_VENDOR_STD 1
  341. # endif
  342. /* if using stlport:: namespace or if C library stuff is not in vendor's std::,
  343. * try importing 'em.
  344. * MSVC has ambiguity problem when we try to import C-style std:: stuff back into global namespace */
  345. # if defined (_STLP_USE_NAMESPACES) && (defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_VENDOR_GLOBAL_CSTD))
  346. # define _STLP_IMPORT_VENDOR_CSTD 1
  347. # endif
  348. # if defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS) && !defined (_STLP_DO_IMPORT_CSTD_FUNCTIONS)
  349. # define _STLP_NO_CSTD_FUNCTION_IMPORTS
  350. # endif
  351. # define _STLP_USING_NAMESPACE(x) using namespace x ;
  352. namespace std { }
  353. namespace __std_alias = std;
  354. /* assume std:: namespace for C++ std library if not being told otherwise */
  355. # if defined (_STLP_VENDOR_GLOBAL_STD)
  356. # define _STLP_VENDOR_STD
  357. # else
  358. # define _STLP_VENDOR_STD std
  359. # endif
  360. /* tune things that come from C library */
  361. # if defined (_STLP_VENDOR_GLOBAL_CSTD) || !defined(_STLP_USE_NEW_C_HEADERS)
  362. /* in old-style headers, C functions go to global scope. */
  363. # define _STLP_VENDOR_CSTD
  364. # define _STLP_USING_VENDOR_CSTD
  365. # else
  366. # define _STLP_VENDOR_CSTD _STLP_VENDOR_STD
  367. # define _STLP_USING_VENDOR_CSTD _STLP_USING_NAMESPACE(_STLP_VENDOR_CSTD)
  368. # endif /* _STLP_VENDOR_CSTD */
  369. /* exception, typeinfo, new - always come from the vendor */
  370. # if !defined (_STLP_VENDOR_EXCEPT_STD)
  371. # if defined (_STLP_VENDOR_GLOBAL_EXCEPT_STD)
  372. # define _STLP_VENDOR_EXCEPT_STD
  373. # else
  374. # define _STLP_VENDOR_EXCEPT_STD _STLP_VENDOR_STD
  375. # endif
  376. # endif
  377. # define _STLP_OLD_IO_NAMESPACE
  378. # if !defined (_STLP_VENDOR_MB_NAMESPACE)
  379. # define _STLP_VENDOR_MB_NAMESPACE _STLP_VENDOR_CSTD
  380. # endif
  381. #else
  382. /* compiler has no namespace support */
  383. # define _STLP_VENDOR_STD
  384. # define _STLP_VENDOR_CSTD
  385. # define _STLP_USING_NAMESPACE(x)
  386. # define _STLP_USING_VENDOR_CSTD
  387. # define _STLP_VENDOR_EXCEPT_STD
  388. #endif
  389. #if defined (_STLP_USE_NAMESPACES)
  390. # if defined (_STLP_USE_OWN_NAMESPACE)
  391. # if !defined (_STLP_STD_NAME)
  392. # if !defined (_STLP_DEBUG)
  393. # if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
  394. # ifndef _STLP_THREADS
  395. # define _STLP_STD_NAME stlpmtx_std
  396. # else
  397. # define _STLP_STD_NAME stlp_std
  398. # endif
  399. # else
  400. # ifndef _STLP_THREADS
  401. # define _STLP_STD_NAME stlpxmtx_std
  402. # else
  403. # define _STLP_STD_NAME stlpx_std
  404. # endif
  405. # endif
  406. # else
  407. /*
  408. * The STLport debug mode is binary incompatible with the other modes,
  409. * lets make it clear on the STLport namespace to generate link errors rather
  410. * than runtime ones.
  411. */
  412. # if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
  413. # ifndef _STLP_THREADS
  414. # define _STLP_STD_NAME stlpdmtx_std
  415. # else
  416. # define _STLP_STD_NAME stlpd_std
  417. # endif
  418. # else
  419. # ifndef _STLP_THREADS
  420. # define _STLP_STD_NAME stlpdxmtx_std
  421. # else
  422. # define _STLP_STD_NAME stlpdx_std
  423. # endif
  424. # endif
  425. # endif
  426. # endif
  427. namespace _STLP_STD_NAME { }
  428. # else
  429. # define _STLP_STD_NAME std
  430. # endif /* _STLP_USE_OWN_NAMESPACE */
  431. # define _STLP_BEGIN_NAMESPACE namespace _STLP_STD_NAME {
  432. # define _STLP_BEGIN_TR1_NAMESPACE namespace tr1 {
  433. # define _STLP_END_NAMESPACE }
  434. /* decide whether or not we use separate namespace for rel ops */
  435. # if defined (_STLP_NO_RELOPS_NAMESPACE)
  436. # define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {}
  437. # define _STLP_END_RELOPS_NAMESPACE }
  438. # else
  439. /* Use std::rel_ops namespace */
  440. # define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {
  441. # define _STLP_END_RELOPS_NAMESPACE } }
  442. # define _STLP_USE_SEPARATE_RELOPS_NAMESPACE
  443. # endif /* Use std::rel_ops namespace */
  444. # define _STLP_STD ::_STLP_STD_NAME
  445. # if !defined (_STLP_TR1)
  446. # define _STLP_TR1 _STLP_STD::tr1::
  447. # endif
  448. # if !defined (_STLP_DONT_USE_PRIV_NAMESPACE)
  449. # define _STLP_PRIV_NAME priv
  450. # define _STLP_PRIV _STLP_STD::_STLP_PRIV_NAME::
  451. # define _STLP_MOVE_TO_PRIV_NAMESPACE namespace _STLP_PRIV_NAME {
  452. # define _STLP_MOVE_TO_STD_NAMESPACE }
  453. # else
  454. # if !defined (_STLP_PRIV)
  455. # define _STLP_PRIV _STLP_STD::
  456. # endif
  457. # define _STLP_MOVE_TO_PRIV_NAMESPACE
  458. # define _STLP_MOVE_TO_STD_NAMESPACE
  459. # endif
  460. /* Official STLport namespace when std is not redefined.
  461. * Here we don't use a macro because we do not need it and because
  462. * stlport is used as file name by boost and folder name under beos:
  463. */
  464. namespace stlport = _STLP_STD_NAME;
  465. /* Backward compatibility:
  466. */
  467. namespace _STL = _STLP_STD_NAME;
  468. #undef __STLPORT_NAMESPACE
  469. #define __STLPORT_NAMESPACE _STLP_STD_NAME
  470. #else /* _STLP_USE_NAMESPACES */
  471. /* STLport is being put into global namespace */
  472. # define _STLP_STD
  473. # define _STLP_PRIV
  474. # define _STLP_TR1
  475. # define _STLP_BEGIN_NAMESPACE
  476. # define _STLP_BEGIN_TR1_NAMESPACE
  477. # define _STLP_END_NAMESPACE
  478. # define _STLP_MOVE_TO_PRIV_NAMESPACE
  479. # define _STLP_MOVE_TO_STD_NAMESPACE
  480. /* boris : it was found out that _STLP_USE_SEPARATE_RELOPS_NAMESPACE
  481. causes less problems than having relational operator templates in global namespace
  482. Please define _STLP_NO_RELOPS_NAMESPACE in config/user_config.h if your code rely on them. */
  483. # if !defined (_STLP_NO_RELOPS_NAMESPACE)
  484. # define _STLP_USE_SEPARATE_RELOPS_NAMESPACE
  485. # endif
  486. # define _STLP_BEGIN_RELOPS_NAMESPACE
  487. # define _STLP_END_RELOPS_NAMESPACE
  488. # undef _STLP_USE_OWN_NAMESPACE
  489. #endif /* _STLP_USE_NAMESPACES */
  490. #define STLPORT_CSTD _STLP_VENDOR_CSTD
  491. #define STLPORT _STLP_STD_NAME
  492. #if defined(_STLP_BOGUS_TEMPLATE_TYPE_MATCHING_BUG)
  493. # define _STLP_SIMPLE_TYPE(T) _stl_trivial_proxy<T>
  494. #else
  495. # define _STLP_SIMPLE_TYPE(T) T
  496. #endif
  497. #ifndef _STLP_RAND48
  498. # define _STLP_NO_DRAND48
  499. #endif
  500. /* advanced keywords usage */
  501. #define __C_CAST(__x, __y) ((__x)(__y))
  502. #ifndef _STLP_NO_NEW_STYLE_CASTS
  503. # define __CONST_CAST(__x,__y) const_cast<__x>(__y)
  504. # define __STATIC_CAST(__x,__y) static_cast<__x>(__y)
  505. # define __REINTERPRET_CAST(__x,__y) reinterpret_cast<__x>(__y)
  506. #else
  507. # define __STATIC_CAST(__x,__y) __C_CAST(__x, __y)
  508. # define __CONST_CAST(__x,__y) __C_CAST(__x, __y)
  509. # define __REINTERPRET_CAST(__x,__y) __C_CAST(__x, __y)
  510. #endif
  511. #if defined (_STLP_NEED_TYPENAME) && ! defined (typename)
  512. # define typename
  513. #endif
  514. #if defined (_STLP_NEED_TYPENAME) || defined (_STLP_NO_TYPENAME_ON_RETURN_TYPE )
  515. # define _STLP_TYPENAME_ON_RETURN_TYPE
  516. #else
  517. # define _STLP_TYPENAME_ON_RETURN_TYPE typename
  518. #endif
  519. #ifdef _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER
  520. # define _STLP_HEADER_TYPENAME
  521. #else
  522. # define _STLP_HEADER_TYPENAME typename
  523. #endif
  524. #ifdef _STLP_NO_TYPENAME_BEFORE_NAMESPACE
  525. # define _STLP_TYPENAME
  526. #else
  527. # define _STLP_TYPENAME typename
  528. #endif
  529. #ifndef _STLP_NO_MEMBER_TEMPLATE_KEYWORD
  530. # define _STLP_TEMPLATE template
  531. #else
  532. # define _STLP_TEMPLATE
  533. #endif
  534. #if defined (_STLP_USE_CONTAINERS_EXTENSION)
  535. # define _STLP_KEY_TYPE_FOR_CONT_EXT(type)
  536. # define _STLP_TEMPLATE_FOR_CONT_EXT template <class _KT>
  537. #else
  538. # define _STLP_KEY_TYPE_FOR_CONT_EXT(type) typedef type _KT;
  539. # define _STLP_TEMPLATE_FOR_CONT_EXT
  540. #endif
  541. #if defined (_STLP_NEED_EXPLICIT) && !defined (explicit)
  542. # define explicit
  543. #endif
  544. #if !defined (_STLP_NEED_MUTABLE)
  545. # define _STLP_MUTABLE(type, x) x
  546. #else
  547. # define _STLP_MUTABLE(type, x) __CONST_CAST(type*, this)->x
  548. # define mutable
  549. #endif
  550. #if defined (_STLP_NO_SIGNED_BUILTINS)
  551. /* old HP-UX doesn't understand "signed" keyword */
  552. # define signed
  553. #endif
  554. #if defined (_STLP_LOOP_INLINE_PROBLEMS)
  555. # define _STLP_INLINE_LOOP
  556. #else
  557. # define _STLP_INLINE_LOOP inline
  558. #endif
  559. #ifndef _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
  560. # define _STLP_TEMPLATE_NULL template<>
  561. #else
  562. # define _STLP_TEMPLATE_NULL
  563. #endif
  564. #ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
  565. # define _STLP_OPERATOR_TEMPLATE
  566. #else
  567. # define _STLP_OPERATOR_TEMPLATE _STLP_TEMPLATE_NULL
  568. #endif
  569. #ifndef _STLP_CLASS_PARTIAL_SPECIALIZATION
  570. /* unless we have other compiler problem, try simulating partial spec here */
  571. # if !defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)
  572. # define _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
  573. # endif
  574. /* For your own iterators, please use inheritance from iterator<> instead of these obsolete queries. */
  575. # if (defined (_STLP_NESTED_TYPE_PARAM_BUG) || !defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS))
  576. # if ! defined ( _STLP_USE_OLD_HP_ITERATOR_QUERIES )
  577. # define _STLP_USE_OLD_HP_ITERATOR_QUERIES
  578. # endif
  579. # elif defined ( _STLP_NO_ANACHRONISMS )
  580. # undef _STLP_USE_OLD_HP_ITERATOR_QUERIES
  581. # endif
  582. #endif
  583. #ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
  584. # define _STLP_NULL_TMPL_ARGS <>
  585. # else
  586. # define _STLP_NULL_TMPL_ARGS
  587. #endif
  588. #if !defined (_STLP_ALLOCATOR_TYPE_DFL)
  589. # if defined (_STLP_DONT_SUP_DFLT_PARAM)
  590. # define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
  591. # endif
  592. # if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
  593. # define _STLP_ALLOCATOR_TYPE_DFL
  594. # else
  595. # define _STLP_ALLOCATOR_TYPE_DFL = allocator_type()
  596. # endif
  597. #endif
  598. /* When the compiler do not correctly initialized the basic types value in default parameters we prefer
  599. * to avoid them to be able to correct this bug.
  600. */
  601. #if defined (_STLP_DEF_CONST_DEF_PARAM_BUG)
  602. # define _STLP_DONT_SUP_DFLT_PARAM 1
  603. #endif
  604. #if defined (__SGI_STL_NO_ARROW_OPERATOR) && ! defined (_STLP_NO_ARROW_OPERATOR)
  605. # define _STLP_NO_ARROW_OPERATOR
  606. #endif
  607. #if !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
  608. # if !(defined (_STLP_NO_ARROW_OPERATOR)) && \
  609. !defined (_STLP_NO_MSVC50_COMPATIBILITY) && !defined (_STLP_MSVC50_COMPATIBILITY)
  610. /* this one is needed for proper reverse_iterator<> operator ->() handling */
  611. # define _STLP_MSVC50_COMPATIBILITY 1
  612. # endif
  613. #endif
  614. #if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION )
  615. # if (defined(__IBMCPP__) && (500 <= __IBMCPP__) && (__IBMCPP__ < 600) )
  616. # define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
  617. typedef typename _STLP_STD :: reverse_iterator<const_iterator> const_reverse_iterator; \
  618. typedef typename _STLP_STD :: reverse_iterator<iterator> reverse_iterator
  619. # elif (defined (__sgi) && ! defined (__GNUC__)) || defined (__SUNPRO_CC) || defined (__xlC__)
  620. # define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
  621. typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<const_iterator> const_reverse_iterator; \
  622. typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<iterator> reverse_iterator
  623. # else
  624. # define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
  625. typedef _STLP_STD::reverse_iterator<const_iterator> const_reverse_iterator; \
  626. typedef _STLP_STD::reverse_iterator<iterator> reverse_iterator
  627. # endif
  628. #else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
  629. # if defined (_STLP_MSVC50_COMPATIBILITY)
  630. # define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
  631. typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \
  632. const_pointer, difference_type> const_reverse_iterator; \
  633. typedef _STLP_STD::__reverse_iterator<iterator, value_type, reference, pointer, difference_type> \
  634. reverse_iterator
  635. # else
  636. # define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
  637. typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \
  638. difference_type> const_reverse_iterator; \
  639. typedef _STLP_STD::__reverse_iterator<iterator, value_type, \
  640. reference, difference_type> \
  641. reverse_iterator
  642. # endif
  643. #endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
  644. #define _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS \
  645. _STLP_DECLARE_REVERSE_ITERATORS(reverse_bidirectional_iterator)
  646. #define _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS \
  647. _STLP_DECLARE_REVERSE_ITERATORS(reverse_iterator)
  648. #define __IMPORT_CONTAINER_TYPEDEFS(_Super) \
  649. typedef typename _Super::value_type value_type; \
  650. typedef typename _Super::size_type size_type; \
  651. typedef typename _Super::difference_type difference_type; \
  652. typedef typename _Super::reference reference; \
  653. typedef typename _Super::const_reference const_reference; \
  654. typedef typename _Super::pointer pointer; \
  655. typedef typename _Super::const_pointer const_pointer; \
  656. typedef typename _Super::allocator_type allocator_type;
  657. #define __IMPORT_ITERATORS(_Super) \
  658. typedef typename _Super::iterator iterator; \
  659. typedef typename _Super::const_iterator const_iterator;
  660. #define __IMPORT_REVERSE_ITERATORS(_Super) \
  661. typedef typename _Super::const_reverse_iterator const_reverse_iterator; \
  662. typedef typename _Super::reverse_iterator reverse_iterator;
  663. #define __IMPORT_SUPER_COPY_ASSIGNMENT(__derived_name, _Self, _SUPER) \
  664. __derived_name(const _Super& __x) : _SUPER(__x) {} \
  665. _Self& operator=(const _Super& __x) { \
  666. *(_Super*)this = __x; \
  667. return *this; \
  668. } \
  669. __derived_name(const _Self& __x) : _SUPER(__x) {} \
  670. _Self& operator=(const _Self& __x) { \
  671. *(_Super*)this = __x; \
  672. return *this; \
  673. }
  674. #define __IMPORT_WITH_ITERATORS(_Super) \
  675. __IMPORT_CONTAINER_TYPEDEFS(_Super) __IMPORT_ITERATORS(_Super)
  676. #define __IMPORT_WITH_REVERSE_ITERATORS(_Super) \
  677. __IMPORT_WITH_ITERATORS(_Super) __IMPORT_REVERSE_ITERATORS(_Super)
  678. #if defined (_STLP_TRIVIAL_CONSTRUCTOR_BUG)
  679. # define __TRIVIAL_CONSTRUCTOR(__type) __type() {}
  680. #else
  681. # define __TRIVIAL_CONSTRUCTOR(__type)
  682. #endif
  683. #if defined (_STLP_TRIVIAL_DESTRUCTOR_BUG)
  684. # define __TRIVIAL_DESTRUCTOR(__type) ~__type() {}
  685. #else
  686. # define __TRIVIAL_DESTRUCTOR(__type)
  687. #endif
  688. #define __TRIVIAL_STUFF(__type) \
  689. __TRIVIAL_CONSTRUCTOR(__type) __TRIVIAL_DESTRUCTOR(__type)
  690. #if defined (_STLP_STATIC_CONST_INIT_BUG)
  691. # define _STLP_STATIC_CONSTANT(__type, __assignment) enum { __assignment }
  692. #else
  693. # define _STLP_STATIC_CONSTANT(__type, __assignment) static const __type __assignment
  694. #endif
  695. #if defined (_STLP_HAS_NO_EXCEPTIONS)
  696. # define _STLP_NO_EXCEPTIONS
  697. #endif
  698. #if !defined (_STLP_DONT_USE_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_USE_EXCEPTIONS)
  699. # define _STLP_USE_EXCEPTIONS
  700. #endif
  701. #if defined (_STLP_USE_EXCEPTIONS)
  702. # define _STLP_TRY try
  703. # define _STLP_CATCH_ALL catch(...)
  704. # ifndef _STLP_THROW
  705. # define _STLP_THROW(x) throw x
  706. # endif
  707. # define _STLP_RETHROW throw
  708. # define _STLP_UNWIND(action) catch(...) { action; throw; }
  709. # ifdef _STLP_THROW_RETURN_BUG
  710. # define _STLP_RET_AFTER_THROW(data) return data;
  711. # else
  712. # define _STLP_RET_AFTER_THROW(data)
  713. # endif
  714. # if !defined (_STLP_THROWS)
  715. # define _STLP_THROWS(x) throw(x)
  716. # endif
  717. # if !defined (_STLP_NOTHROW)
  718. # define _STLP_NOTHROW throw()
  719. # endif
  720. #else
  721. # define _STLP_TRY
  722. # define _STLP_CATCH_ALL if (false)
  723. # ifndef _STLP_THROW
  724. # define _STLP_THROW(x)
  725. # endif
  726. # define _STLP_RETHROW {}
  727. # define _STLP_UNWIND(action)
  728. # define _STLP_THROWS(x)
  729. # define _STLP_NOTHROW
  730. # define _STLP_RET_AFTER_THROW(data)
  731. #endif
  732. /*
  733. * Here we check _STLP_NO_EXCEPTIONS which means that the compiler has no
  734. * exception support but not the _STLP_USE_EXCEPTIONS which simply means
  735. * that the user do not want to use them.
  736. */
  737. #if !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTION_SPEC)
  738. # define _STLP_THROWS_INHERENTLY(x) throw x
  739. # define _STLP_NOTHROW_INHERENTLY throw()
  740. #else
  741. # define _STLP_THROWS_INHERENTLY(x)
  742. # define _STLP_NOTHROW_INHERENTLY
  743. #endif
  744. /* STLport function not returning are functions that throw so we translate
  745. * the noreturn functions in throwing functions taking also into account
  746. * exception support activation.
  747. */
  748. #if defined (_STLP_NORETURN_FUNCTION) && !defined (_STLP_NO_EXCEPTIONS) && \
  749. !defined (_STLP_FUNCTION_THROWS)
  750. # define _STLP_FUNCTION_THROWS _STLP_NORETURN_FUNCTION
  751. #else
  752. # define _STLP_FUNCTION_THROWS
  753. #endif
  754. #if defined(_STLP_NO_BOOL)
  755. # if (defined (__IBMCPP__) && (__IBMCPP__ < 400)) && ! defined (_AIX)
  756. # include <isynonym.hpp>
  757. # if defined (__OS400__)
  758. typedef int bool;
  759. # elif !( defined (__xlC__) || defined (_AIX))
  760. typedef Boolean bool;
  761. # endif
  762. # else
  763. # if defined(_STLP_YVALS_H)
  764. # include <yvals.h>
  765. # else
  766. # if defined (_STLP_DONT_USE_BOOL_TYPEDEF)
  767. # define bool int
  768. # else
  769. typedef int bool;
  770. # endif
  771. # define true 1
  772. # define false 0
  773. # endif
  774. # endif /* __IBMCPP__ */
  775. #else
  776. # define _STLP_BOOL_KEYWORD 1
  777. #endif /* _STLP_NO_BOOL */
  778. /* uninitialized value filler */
  779. #ifndef _STLP_SHRED_BYTE
  780. /* This value is designed to cause problems if an error occurs */
  781. # define _STLP_SHRED_BYTE 0xA3
  782. #endif /* _STLP_SHRED_BYTE */
  783. /* shared library tune-up */
  784. #ifndef _STLP_IMPORT_DECLSPEC
  785. # define _STLP_IMPORT_DECLSPEC
  786. #endif
  787. /* a keyword used to instantiate export template */
  788. #ifndef _STLP_EXPORT_TEMPLATE_KEYWORD
  789. # define _STLP_EXPORT_TEMPLATE_KEYWORD
  790. #endif
  791. #ifndef _STLP_IMPORT_TEMPLATE_KEYWORD
  792. # define _STLP_IMPORT_TEMPLATE_KEYWORD
  793. #endif
  794. #if !defined (_STLP_NO_CONST_IN_PAIR)
  795. # define _STLP_CONST const
  796. #else
  797. # define _STLP_CONST
  798. #endif
  799. #ifdef _STLP_USE_NO_IOSTREAMS
  800. /*
  801. * If we do not use iostreams we do not use the export/import
  802. * techniques to avoid build of the STLport library.
  803. */
  804. # undef _STLP_USE_DECLSPEC
  805. /* We also undef USE_DYNAMIC_LIB macro as this macro add some code
  806. * to use the dynamic (shared) STLport library for some platform/compiler
  807. * configuration leading to problem when not linking to the STLport lib.
  808. */
  809. # undef _STLP_USE_DYNAMIC_LIB
  810. #endif
  811. #if defined (_STLP_DLLEXPORT_NEEDS_PREDECLARATION) && defined (_STLP_USE_DECLSPEC)
  812. # if ! defined (_STLP_USE_TEMPLATE_EXPORT)
  813. /* this setting turns on "extern template" extension use */
  814. # define _STLP_USE_TEMPLATE_EXPORT
  815. # endif
  816. # if defined (_STLP_DESIGNATED_DLL) && ! defined (_STLP_NO_FORCE_INSTANTIATE)
  817. # define _STLP_NO_FORCE_INSTANTIATE
  818. # endif
  819. #endif
  820. #if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */
  821. # define _STLP_EXPORT _STLP_EXPORT_TEMPLATE_KEYWORD
  822. #else
  823. # define _STLP_EXPORT _STLP_IMPORT_TEMPLATE_KEYWORD
  824. #endif
  825. #ifndef _STLP_EXPORT_TEMPLATE
  826. # define _STLP_EXPORT_TEMPLATE _STLP_EXPORT template
  827. #endif
  828. #if defined (_STLP_USE_DECLSPEC) /* using export/import technique */
  829. # ifndef _STLP_EXPORT_DECLSPEC
  830. # define _STLP_EXPORT_DECLSPEC
  831. # endif
  832. # ifndef _STLP_IMPORT_DECLSPEC
  833. # define _STLP_IMPORT_DECLSPEC
  834. # endif
  835. # ifndef _STLP_CLASS_EXPORT_DECLSPEC
  836. # define _STLP_CLASS_EXPORT_DECLSPEC
  837. # endif
  838. # ifndef _STLP_CLASS_IMPORT_DECLSPEC
  839. # define _STLP_CLASS_IMPORT_DECLSPEC
  840. # endif
  841. # if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */
  842. # define _STLP_DECLSPEC _STLP_EXPORT_DECLSPEC
  843. # define _STLP_CLASS_DECLSPEC _STLP_CLASS_EXPORT_DECLSPEC
  844. # else
  845. # define _STLP_DECLSPEC _STLP_IMPORT_DECLSPEC /* Other modules, importing STLport exports */
  846. # define _STLP_CLASS_DECLSPEC _STLP_CLASS_IMPORT_DECLSPEC
  847. # endif
  848. #else /* Not using DLL export/import specifications */
  849. # define _STLP_DECLSPEC
  850. # define _STLP_CLASS_DECLSPEC
  851. #endif
  852. #define _STLP_EXPORT_TEMPLATE_CLASS _STLP_EXPORT template class _STLP_CLASS_DECLSPEC
  853. #if defined (_STLP_NEED_ADDITIONAL_STATIC_DECLSPEC)
  854. # define _STLP_STATIC_DECLSPEC _STLP_DECLSPEC
  855. #else
  856. # define _STLP_STATIC_DECLSPEC
  857. #endif
  858. #if !defined (_STLP_CALL)
  859. # define _STLP_CALL
  860. #endif
  861. #ifndef _STLP_USE_NO_IOSTREAMS
  862. # if defined (__DECCXX) && ! defined (__USE_STD_IOSTREAM)
  863. # define __USE_STD_IOSTREAM
  864. # endif
  865. /* We only need to expose details of streams implementation
  866. if we use non-standard i/o or are building STLport*/
  867. # if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE) || !defined(_STLP_NO_CUSTOM_IO)
  868. # define _STLP_EXPOSE_STREAM_IMPLEMENTATION 1
  869. # endif
  870. /* We only need to expose details of global implementation if we are building STLport
  871. or have not instantiated everything in the lib */
  872. # if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE)
  873. # undef _STLP_EXPOSE_GLOBALS_IMPLEMENTATION
  874. # define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION 1
  875. # endif
  876. #else /* _STLP_USE_NO_IOSTREAMS */
  877. /* when we are not using SGI iostreams, we must expose globals, but not streams implementation */
  878. # define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION
  879. #endif /* _STLP_USE_NO_IOSTREAMS */
  880. #ifdef _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
  881. # define _STLP_PSPEC2(t1,t2) < t1,t2 >
  882. # define _STLP_PSPEC3(t1,t2,t3) < t1,t2,t3 >
  883. #else
  884. # define _STLP_PSPEC2(t1,t2) /* nothing */
  885. # define _STLP_PSPEC3(t1,t2,t3) /* nothing */
  886. #endif
  887. /* Activation of the partial template workaround:
  888. */
  889. #if !defined(_STLP_DONT_USE_PARTIAL_SPEC_WRKD) &&\
  890. (!defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || !defined(_STLP_FUNCTION_TMPL_PARTIAL_ORDER))
  891. # define _STLP_USE_PARTIAL_SPEC_WORKAROUND
  892. #endif
  893. #ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
  894. # define _STLP_RELOPS_OPERATORS(_TMPL, _TP) \
  895. _TMPL inline bool _STLP_CALL operator!=(const _TP& __x, const _TP& __y) {return !(__x == __y);}\
  896. _TMPL inline bool _STLP_CALL operator>(const _TP& __x, const _TP& __y) {return __y < __x;}\
  897. _TMPL inline bool _STLP_CALL operator<=(const _TP& __x, const _TP& __y) { return !(__y < __x);}\
  898. _TMPL inline bool _STLP_CALL operator>=(const _TP& __x, const _TP& __y) { return !(__x < __y);}
  899. #else
  900. # define _STLP_RELOPS_OPERATORS(_TMPL, _TP)
  901. #endif
  902. #if defined ( _STLP_USE_ABBREVS )
  903. # include <stl/_abbrevs.h>
  904. #endif
  905. /* Some really useful macro */
  906. #define _STLP_ARRAY_SIZE(A) sizeof(A) / sizeof(A[0])
  907. #define _STLP_ARRAY_AND_SIZE(A) A, sizeof(A) / sizeof(A[0])
  908. #if !defined (_STLP_MARK_PARAMETER_AS_UNUSED)
  909. # define _STLP_MARK_PARAMETER_AS_UNUSED(X) (void*)X;
  910. #endif
  911. #if defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
  912. # if defined (_STLP_USE_NO_IOSTREAMS)
  913. # undef _STLP_CHECK_RUNTIME_COMPATIBILITY
  914. # else
  915. /* The extern "C" simply makes the symbol simpler. */
  916. #if defined (__cplusplus)
  917. extern "C"
  918. #endif
  919. void _STLP_DECLSPEC _STLP_CALL _STLP_CHECK_RUNTIME_COMPATIBILITY();
  920. # endif
  921. #endif
  922. /* some cleanup */
  923. #undef _STLP_DONT_USE_BOOL_TYPEDEF
  924. #undef _STLP_YVALS_H
  925. #undef _STLP_LOOP_INLINE_PROBLEMS
  926. #undef _STLP_NEED_EXPLICIT
  927. #undef _STLP_NEED_TYPENAME
  928. #undef _STLP_NO_NEW_STYLE_CASTS
  929. #undef __AUTO_CONFIGURED
  930. #endif /* _STLP_FEATURES_H */