host.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. /*
  2. * This file defines site configuration.
  3. */
  4. /*
  5. * _STLP_NO_THREADS: if defined, STLport don't use any
  6. * multithreading support. Synonym is _NOTHREADS
  7. */
  8. #define _NOTHREADS
  9. #define _STLP_NO_THREADS
  10. /* _PTHREADS: if defined, use POSIX threads for multithreading support. */
  11. /*
  12. #define _PTHREADS
  13. */
  14. /* compatibility section
  15. */
  16. #if (defined (_STLP_NOTHREADS) || defined (_STLP_NO_THREADS) || defined (NOTHREADS))
  17. # if !defined (_NOTHREADS)
  18. # define _NOTHREADS
  19. # endif
  20. # if !defined (_STLP_NO_THREADS)
  21. # define _STLP_NO_THREADS
  22. # endif
  23. #endif
  24. #if !defined(_STLP_USE_DYNAMIC_LIB) && !defined(_STLP_USE_STATIC_LIB)
  25. /*
  26. * Turn _STLP_USE_DYNAMIC_LIB to enforce use of .dll version of STLport library.
  27. * NOTE: please do that only if you know what you are doing!
  28. * Changing default will require you to change makefiles in "build" accordingly
  29. * and to rebuild STLPort library!
  30. * On UNIX, this has no effect, see build/lib/README for make tags.
  31. * See STLport configuration file (build/lib/configure.bat) for help in building
  32. * the require library versions.
  33. */
  34. /*
  35. #define _STLP_USE_DYNAMIC_LIB
  36. */
  37. /*
  38. * Turn _STLP_USE_STATIC_LIB to enforce use of static version of STLport library.
  39. * NOTE: please do that only if you know what you are doing!
  40. * Changing default will require you to change makefile in "build" accordingly
  41. * and to rebuild STLPort library!
  42. * On UNIX, this has no effect, see build/lib/README for make tags.
  43. * See STLport configuration file (build/lib/configure.bat) for help in building
  44. * the require library versions.
  45. */
  46. /*
  47. #define _STLP_USE_STATIC_LIB
  48. */
  49. #endif
  50. /*
  51. * Edit relative path below (or put full path) to get native
  52. * compiler vendor's headers included. Default is "../include"
  53. * for _STLP_NATIVE_INCLUDE_PATH, default for other macros is
  54. * _STLP_NATIVE_INCLUDE_PATH.
  55. * Hint: never install STLport in the directory that ends with "include"
  56. */
  57. /*
  58. #undef _STLP_NATIVE_INCLUDE_PATH
  59. #define _STLP_NATIVE_INCLUDE_PATH ../include
  60. */
  61. /* same for C library headers like <cstring> */
  62. /*
  63. #undef _STLP_NATIVE_CPP_C_INCLUDE_PATH
  64. #define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
  65. */
  66. /* same for C headers like <string.h> */
  67. /*
  68. #undef _STLP_NATIVE_C_INCLUDE_PATH
  69. #define _STLP_NATIVE_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
  70. */
  71. /* Some compilers locate basic C++ runtime support headers (<new>, <typeinfo>, <exception>) in separate directory */
  72. /*
  73. #undef _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH
  74. #define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
  75. */
  76. /*
  77. * If namespases available, STLport use own namespace (and masquerade
  78. * it as std). Disable own namespace may cause undefined behaviour.
  79. */
  80. /*
  81. #define _STLP_NO_OWN_NAMESPACE 1
  82. */
  83. /*
  84. * Uncomment _STLP_LEAKS_PEDANTIC to force deallocation of ALL allocated
  85. * memory chunks. Normally not required. But if you worry about quazi-leaks
  86. * (may be reported by some leaks detection tools), use
  87. * _STLP_LEAKS_PEDANTIC. It should be used with _STLP_USE_NEWALLOC or
  88. * _STLP_USE_MALLOC (see below), the default node_alloc allocator also clean
  89. * its internal memory pool but only if STLport is used as a dynamic library
  90. * under Win32 (using MSVC like compilers).
  91. */
  92. /*
  93. #define _STLP_LEAKS_PEDANTIC 1
  94. */
  95. /*
  96. * Uncomment _STLP_USE_NEWALLOC to force allocator<T> to use plain "new"
  97. * instead of STLport optimized node allocator engine.
  98. */
  99. #define _STLP_USE_NEWALLOC 1
  100. /*
  101. * Uncomment _STLP_USE_MALLOC to force allocator<T> to use plain "malloc"
  102. * instead of STLport optimized node allocator engine.
  103. *
  104. * This is default allocator for glibc 2.3.x and later, if not mentioned other
  105. */
  106. /*
  107. #define _STLP_USE_MALLOC 1
  108. */
  109. /*
  110. * Uncomment _STLP_USE_PERTHREAD_ALLOC to force allocator<T> to use
  111. * a specific implementation targetting the massively multi-threaded
  112. * environment. The implementation is based on the POSIX pthread
  113. * interface.
  114. */
  115. /*
  116. #define _STLP_USE_PERTHREAD_ALLOC 1
  117. */
  118. /*
  119. * Uncomment _STLP_USE_NODE_ALLOC if you want to force allocator<T> to use
  120. * "node_alloc" allocator (this is default allocator for STLport, if not
  121. * used other above, except glibc 2.3.x and later, where default is
  122. * "malloc", due to better results)
  123. */
  124. /*
  125. #define _STLP_USE_NODE_ALLOC 1
  126. */
  127. /*
  128. * Set _STLP_DEBUG_ALLOC to use allocators that perform memory debugging,
  129. * such as padding/checking for memory consistency
  130. */
  131. /*
  132. #define _STLP_DEBUG_ALLOC 1
  133. */
  134. /*
  135. * For compiler not supporting partial template specialization or ordering of
  136. * template functions STLport implement a workaround based on inheritance
  137. * detection. This inheritance can introduce trouble in client code when
  138. * a user class derived a STL container (which is not advised as STL containers
  139. * do not have virtual destructors). To disable this workaround turn this macro on:
  140. */
  141. /*
  142. #define _STLP_DONT_USE_PARTIAL_SPEC_WRKD 1
  143. */
  144. /*
  145. * Uncomment this to force all debug diagnostic to be directed through a
  146. * user-defined global function:
  147. * void __stl_debug_message(const char * format_str, ...)
  148. * instead of predefined STLport routine.
  149. * This allows you to take control of debug message output.
  150. * Default routine calls fprintf(stderr,...)
  151. * Note : If you set this macro, you must supply __stl_debug_message
  152. * function definition somewhere.
  153. */
  154. /*
  155. #define _STLP_DEBUG_MESSAGE 1
  156. */
  157. /*
  158. * Uncomment this to force all failed assertions to be executed through
  159. * user-defined global function:
  160. * void __stl_debug_terminate(void). This allows
  161. * you to take control of assertion behaviour for debugging purposes.
  162. * Default routine calls _STLP_ABORT().
  163. * Note : If you set this macro, you must supply __stl_debug_terminate
  164. * function definition somewhere.
  165. */
  166. /*
  167. #define _STLP_DEBUG_TERMINATE 1
  168. */
  169. /*
  170. * Uncomment that to disable exception handling code
  171. */
  172. //#define _STLP_DONT_USE_EXCEPTIONS 1
  173. /*
  174. * _STLP_NO_NAMESPACES: if defined, don't put the library in namespace
  175. * stlport:: or std::, even if the compiler supports namespaces
  176. */
  177. /*
  178. #define _STLP_NO_NAMESPACES 1
  179. */
  180. /*==========================================================
  181. * Compatibility section
  182. *==========================================================*/
  183. /*
  184. * Use abbreviated class names for linker benefit (don't affect interface).
  185. * This option is obsolete, but should work in this release.
  186. *
  187. */
  188. /*
  189. #define _STLP_USE_ABBREVS
  190. */
  191. /*
  192. * This definition precludes STLport reverse_iterator to be compatible with
  193. * other parts of MSVC library. (With partial specialization, it just
  194. * has no effect).
  195. * Use it _ONLY_ if you use SGI-style reverse_iterator<> template explicitly
  196. */
  197. /*
  198. #define _STLP_NO_MSVC50_COMPATIBILITY 1
  199. */
  200. /*
  201. * Use obsolete overloaded template functions iterator_category(), value_type(), distance_type()
  202. * for querying iterator properties. Please note those names are non-standard and are not guaranteed
  203. * to be used by every implementation. However, this setting is on by default when partial specialization
  204. * is not implemented in the compiler and cannot be simulated (only if _STLP_NO_ANACHRONISMS is not set).
  205. * Use of those interfaces for user-defined iterators is strongly discouraged:
  206. * please use public inheritance from iterator<> template to achieve desired effect.
  207. * Second form is to disable old-style queries in any case.
  208. */
  209. /*
  210. #define _STLP_USE_OLD_HP_ITERATOR_QUERIES
  211. #define _STLP_NO_OLD_HP_ITERATOR_QUERIES
  212. */
  213. /*
  214. * On systems with support of large files (_LARGEFILE_SOURCE,
  215. * _LARGEFILE64_SOURCE defined) we will use 64-bit file offset, even if
  216. * __USE_FILE_OFFSET64 or _FILE_OFFSET_BITS not defined or _FILE_OFFSET_BITS
  217. * less than 64. In the last case sizeof(std::streamoff) may not be equal to
  218. * sizeof(off_t); if you want to force equal size of off_t and streamoff,
  219. * uncomment macro below. But pay attention, this has influence on libstlport
  220. * and in future usage it may cause conflict with defined _FILE_OFFSET_BITS macro.
  221. */
  222. /*
  223. #define _STLP_USE_DEFAULT_FILE_OFFSET
  224. */
  225. /*
  226. * _STLP_USE_STDIO_IO, _STLP_USE_UNIX_IO: force selection of stdio calls
  227. * (fopen/flose/fread/fwrite) under fstream buffers or unistd calls
  228. * (open/close/read/write + mmap). On systems that have both (i.e. most Unixes)
  229. * _STLP_USE_UNIX_IO is used.
  230. *
  231. * There is a third variant for Windows: _STLP_USE_WIN32_IO, that based
  232. * on Windows calls (CreateFile/CloseHandle/ReadFile/WriteFile + CreateFileMapping,
  233. * MapViewOfFile)
  234. *
  235. * Uncomment only one define here!
  236. */
  237. /*
  238. #define _STLP_USE_UNIX_IO
  239. */
  240. /*
  241. #define _STLP_USE_STDIO_IO
  242. */
  243. /*
  244. #define _STLP_USE_WIN32_IO
  245. */
  246. /*==========================================================================*/
  247. /* This section contains swithes which should be off by default,
  248. * but so few compilers would have it undefined, so that we set them here,
  249. * with the option to be turned off later in compiler-specific file
  250. */
  251. //#define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
  252. #define _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT
  253. /*==========================================================================*/
  254. #if defined(__sun) && defined(__GNUC__)
  255. /* __SunOS_5_x is not defined in headers, and there is no way to derive it from headers only;
  256. * nevertheless this macro defined automagically by SunPro compilers family;
  257. *
  258. * gcc know nothing about it, but defining it with -D on compiler command line
  259. * is a bad idea from one side, and this info still useful when we want to use
  260. * (or don't use) some Solaris version-specific features from other side.
  261. * Of course, the best way is to define it in spec file, but this is beyond our scope.
  262. *
  263. * Uncomment ONE of the following, depends on what Solaris version you use.
  264. */
  265. /*
  266. #define __SunOS_5_5_1
  267. */
  268. /*
  269. #define __SunOS_5_6
  270. */
  271. /*
  272. #define __SunOS_5_7
  273. */
  274. /*
  275. #define __SunOS_5_8
  276. */
  277. /*
  278. #define __SunOS_5_9
  279. */
  280. /*
  281. #define __SunOS_5_10
  282. */
  283. #endif
  284. #if defined(__sun)
  285. /* With following patches Solaris 8 and 9 will have *l and *f (long double and float)
  286. * variants of math functions:
  287. * SunOS 5.8 patch 111721-04 (May/08/2003)
  288. * <http://sunsolve.sun.com/search/document.do?assetkey=1-21-111721-04-1>
  289. * SunOS 5.9 patch 111722-04 (May/08/2003)
  290. * <http://sunsolve.sun.com/search/document.do?assetkey=1-21-111722-04-1>
  291. * Solaris 10 has this functions from box.
  292. */
  293. /*
  294. #define _STLP_SOLARIS_MATH_PATCH
  295. */
  296. #endif
  297. /*
  298. Local Variables:
  299. mode:C++
  300. End:
  301. */