You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

502 lines
21 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: platformstl/platformstl.h
  3. *
  4. * Purpose: Root header for the PlatformSTL C/C++ libraries. Performs
  5. * platform discriminations, and definitions of types.
  6. *
  7. * Created: 20th March 2005
  8. * Updated: 12th September 2011
  9. *
  10. * Home: http://stlsoft.org/
  11. *
  12. * Copyright (c) 2005-2011, Matthew Wilson and Synesis Software
  13. * All rights reserved.
  14. *
  15. * Redistribution and use in source and binary forms, with or without
  16. * modification, are permitted provided that the following conditions are
  17. * met:
  18. *
  19. * - Redistributions of source code must retain the above copyright notice,
  20. * this list of conditions and the following disclaimer.
  21. * - Redistributions in binary form must reproduce the above copyright
  22. * notice, this list of conditions and the following disclaimer in the
  23. * documentation and/or other materials provided with the distribution.
  24. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the
  25. * names of any contributors may be used to endorse or promote products
  26. * derived from this software without specific prior written permission.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  29. * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  30. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  31. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  32. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  33. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  34. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  35. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  36. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  37. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  38. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  39. *
  40. * ////////////////////////////////////////////////////////////////////// */
  41. #ifndef PLATFORMSTL_INCL_PLATFORMSTL_H_PLATFORMSTL
  42. #define PLATFORMSTL_INCL_PLATFORMSTL_H_PLATFORMSTL
  43. /* File version */
  44. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  45. # define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_MAJOR 1
  46. # define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_MINOR 14
  47. # define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_REVISION 1
  48. # define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_EDIT 40
  49. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  50. /** \file platformstl/platformstl.h
  51. *
  52. * \brief [C, C++] Root header for the
  53. * \ref group__project__platformstl "PlatformSTL" project for C
  54. * compilation.
  55. */
  56. /* /////////////////////////////////////////////////////////////////////////
  57. * PlatformSTL version
  58. *
  59. * The libraries version information is comprised of major, minor and revision
  60. * components.
  61. *
  62. * The major version is denoted by the _PLATFORMSTL_VER_MAJOR preprocessor symbol.
  63. * A changes to the major version component implies that a dramatic change has
  64. * occurred in the libraries, such that considerable changes to source dependent
  65. * on previous versions would need to be effected.
  66. *
  67. * The minor version is denoted by the _PLATFORMSTL_VER_MINOR preprocessor symbol.
  68. * Changes to the minor version component imply that a significant change has
  69. * occurred to the libraries, either in the addition of new functionality or in
  70. * the destructive change to one or more components such that recomplilation and
  71. * code change may be necessitated.
  72. *
  73. * The revision version is denoted by the _PLATFORMSTL_VER_REVISION preprocessor
  74. * symbol. Changes to the revision version component imply that a bug has been
  75. * fixed. Dependent code should be recompiled in order to pick up the changes.
  76. *
  77. * In addition to the individual version symbols - _PLATFORMSTL_VER_MAJOR,
  78. * _PLATFORMSTL_VER_MINOR and _PLATFORMSTL_VER_REVISION - a composite symbol _PLATFORMSTL_VER
  79. * is defined, where the upper 8 bits are 0, bits 16-23 represent the major
  80. * component, bits 8-15 represent the minor component, and bits 0-7 represent
  81. * the revision component.
  82. *
  83. * Each release of the libraries will bear a different version, and that version
  84. * will also have its own symbol: Version 1.0.1 specifies _PLATFORMSTL_VER_1_0_1.
  85. *
  86. * Thus the symbol _PLATFORMSTL_VER may be compared meaningfully with a specific
  87. * version symbol, e.g.# if _PLATFORMSTL_VER >= _PLATFORMSTL_VER_1_0_1
  88. */
  89. /** \def _PLATFORMSTL_VER_MAJOR
  90. * The major version number of PlatformSTL
  91. */
  92. /** \def _PLATFORMSTL_VER_MINOR
  93. * The minor version number of PlatformSTL
  94. */
  95. /** \def _PLATFORMSTL_VER_REVISION
  96. * The revision version number of PlatformSTL
  97. */
  98. /** \def _PLATFORMSTL_VER
  99. * The current composite version number of PlatformSTL
  100. */
  101. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  102. # define _PLATFORMSTL_VER_1_0_1 0x00010001 /*!< Version 1.0.1 */
  103. # define _PLATFORMSTL_VER_1_1_1 0x00010101 /*!< Version 1.1.1 */
  104. # define _PLATFORMSTL_VER_1_1_2 0x00010102 /*!< Version 1.1.2 */
  105. # define _PLATFORMSTL_VER_1_2_1 0x00010201 /*!< Version 1.2.1 */
  106. # define _PLATFORMSTL_VER_1_3_1 0x00010301 /*!< Version 1.3.1 */
  107. # define _PLATFORMSTL_VER_1_4_1 0x00010401 /*!< Version 1.4.1 */
  108. # define _PLATFORMSTL_VER_1_4_2 0x00010402 /*!< Version 1.4.2 */
  109. # define _PLATFORMSTL_VER_1_5_1 0x00010501 /*!< Version 1.5.1 (with STLSoft 1.9.1) */
  110. # define _PLATFORMSTL_VER_1_6_1 0x00010601 /*!< Version 1.6.1 (with STLSoft 1.9.16) */
  111. # define _PLATFORMSTL_VER_1_6_2 0x00010602 /*!< Version 1.6.2 (with STLSoft 1.9.25) */
  112. # define _PLATFORMSTL_VER_1_7_1 0x00010701 /*!< Version 1.7.1 (with STLSoft 1.9.38) */
  113. # define _PLATFORMSTL_VER_1_7_2 0x010702ff /*!< Version 1.7.2 (with STLSoft 1.9.64) */
  114. # define _PLATFORMSTL_VER_1_8_1 0x010801ff /*!< Version 1.8.1 (with STLSoft 1.9.86) */
  115. # define _PLATFORMSTL_VER_1_8_2 0x010802ff /*!< Version 1.8.2 (with STLSoft 1.9.90) */
  116. # define _PLATFORMSTL_VER_1_8_3 0x010803ff /*!< Version 1.8.3 (with STLSoft 1.9.110) */
  117. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  118. #define _PLATFORMSTL_VER_MAJOR 1
  119. #define _PLATFORMSTL_VER_MINOR 8
  120. #define _PLATFORMSTL_VER_REVISION 3
  121. #define _PLATFORMSTL_VER _PLATFORMSTL_VER_1_8_3
  122. /* /////////////////////////////////////////////////////////////////////////
  123. * Includes
  124. */
  125. #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
  126. # include <stlsoft/stlsoft.h>
  127. #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */
  128. /* /////////////////////////////////////////////////////////////////////////
  129. * STLSoft version compatibility
  130. */
  131. #if _STLSOFT_VER < 0x01096eff
  132. # error This version of the PlatformSTL libraries requires STLSoft version 1.9.100, or later. (www.stlsoft.org)
  133. #endif /* STLSoft version */
  134. /* /////////////////////////////////////////////////////////////////////////
  135. * Operating system identification
  136. */
  137. #if defined(unix) || \
  138. defined(UNIX) || \
  139. defined(__unix__) || \
  140. defined(__unix)
  141. # define PLATFORMSTL_OS_IS_UNIX
  142. #elif defined(WIN64) || \
  143. defined(_WIN64) || \
  144. defined(__WIN64__)
  145. # define PLATFORMSTL_OS_IS_WIN64
  146. #elif defined(WIN32) || \
  147. defined(_WIN32) || \
  148. defined(__WIN32__)
  149. # define PLATFORMSTL_OS_IS_WIN32
  150. #else /* ? operating system */
  151. # error Operating system not discriminated. Only UNIX, Win32 and Win64 are currently recognised by PlatformSTL
  152. #endif /* operating system */
  153. #if defined(PLATFORMSTL_OS_IS_WIN32) || \
  154. defined(PLATFORMSTL_OS_IS_WIN64)
  155. # define PLATFORMSTL_OS_IS_WINDOWS
  156. #endif /* PLATFORMSTL_OS_IS_WIN32 || PLATFORMSTL_OS_IS_WIN64 */
  157. /* /////////////////////////////////////////////////////////////////////////
  158. * Platform-specific includes
  159. */
  160. #if defined(PLATFORMSTL_OS_IS_UNIX)
  161. # include <unixstl/unixstl.h>
  162. #elif defined(PLATFORMSTL_OS_IS_WINDOWS)
  163. # include <winstl/winstl.h>
  164. #else /* ? operating system */
  165. # error Operating system not discriminated. Only UNIX and Windows are currently recognised by PlatformSTL
  166. #endif /* operating system */
  167. /* /////////////////////////////////////////////////////////////////////////
  168. * Architecture
  169. */
  170. #ifdef PLATFORMSTL_ARCH_IS_X86
  171. # undef PLATFORMSTL_ARCH_IS_X86
  172. #endif /* PLATFORMSTL_ARCH_IS_X86 */
  173. #ifdef PLATFORMSTL_ARCH_IS_IA64
  174. # undef PLATFORMSTL_ARCH_IS_IA64
  175. #endif /* PLATFORMSTL_ARCH_IS_IA64 */
  176. #ifdef PLATFORMSTL_ARCH_IS_X64
  177. # undef PLATFORMSTL_ARCH_IS_X64
  178. #endif /* PLATFORMSTL_ARCH_IS_X64 */
  179. #ifdef PLATFORMSTL_ARCH_IS_INTEL
  180. # undef PLATFORMSTL_ARCH_IS_INTEL
  181. #endif /* PLATFORMSTL_ARCH_IS_INTEL */
  182. #ifdef PLATFORMSTL_ARCH_IS_POWERPC
  183. # undef PLATFORMSTL_ARCH_IS_POWERPC
  184. #endif /* PLATFORMSTL_ARCH_IS_POWERPC */
  185. #ifdef PLATFORMSTL_ARCH_IS_ALPHA
  186. # undef PLATFORMSTL_ARCH_IS_ALPHA
  187. #endif /* PLATFORMSTL_ARCH_IS_ALPHA */
  188. #ifdef PLATFORMSTL_ARCH_IS_HPPA
  189. # undef PLATFORMSTL_ARCH_IS_HPPA
  190. #endif /* PLATFORMSTL_ARCH_IS_HPPA */
  191. #ifdef PLATFORMSTL_ARCH_IS_SPARC
  192. # undef PLATFORMSTL_ARCH_IS_SPARC
  193. #endif /* PLATFORMSTL_ARCH_IS_SPARC */
  194. #ifdef PLATFORMSTL_ARCH_IS_UNKNOWN
  195. # undef PLATFORMSTL_ARCH_IS_UNKNOWN
  196. #endif /* PLATFORMSTL_ARCH_IS_UNKNOWN */
  197. #if defined(PLATFORMSTL_OS_IS_UNIX)
  198. # ifdef UNIXSTL_ARCH_IS_X86
  199. # define PLATFORMSTL_ARCH_IS_X86
  200. # endif /* UNIXSTL_ARCH_IS_X86 */
  201. # ifdef UNIXSTL_ARCH_IS_IA64
  202. # define PLATFORMSTL_ARCH_IS_IA64
  203. # endif /* UNIXSTL_ARCH_IS_IA64 */
  204. # ifdef UNIXSTL_ARCH_IS_X64
  205. # define PLATFORMSTL_ARCH_IS_X64
  206. # endif /* UNIXSTL_ARCH_IS_X64 */
  207. # ifdef UNIXSTL_ARCH_IS_INTEL
  208. # define PLATFORMSTL_ARCH_IS_INTEL
  209. # endif /* UNIXSTL_ARCH_IS_INTEL */
  210. # ifdef UNIXSTL_ARCH_IS_POWERPC
  211. # define PLATFORMSTL_ARCH_IS_POWERPC
  212. # endif /* UNIXSTL_ARCH_IS_POWERPC */
  213. # ifdef UNIXSTL_ARCH_IS_ALPHA
  214. # define PLATFORMSTL_ARCH_IS_ALPHA
  215. # endif /* UNIXSTL_ARCH_IS_ALPHA */
  216. # ifdef UNIXSTL_ARCH_IS_HPPA
  217. # define PLATFORMSTL_ARCH_IS_HPPA
  218. # endif /* UNIXSTL_ARCH_IS_HPPA */
  219. # ifdef UNIXSTL_ARCH_IS_SPARC
  220. # define PLATFORMSTL_ARCH_IS_SPARC
  221. # endif /* UNIXSTL_ARCH_IS_SPARC */
  222. # ifdef UNIXSTL_ARCH_IS_UNKNOWN
  223. # define PLATFORMSTL_ARCH_IS_UNKNOWN
  224. # endif /* UNIXSTL_ARCH_IS_UNKNOWN */
  225. #elif defined(PLATFORMSTL_OS_IS_WINDOWS)
  226. # ifdef WINSTL_ARCH_IS_X86
  227. # define PLATFORMSTL_ARCH_IS_X86
  228. # endif /* WINSTL_ARCH_IS_X86 */
  229. # ifdef WINSTL_ARCH_IS_IA64
  230. # define PLATFORMSTL_ARCH_IS_IA64
  231. # endif /* WINSTL_ARCH_IS_IA64 */
  232. # ifdef WINSTL_ARCH_IS_X64
  233. # define PLATFORMSTL_ARCH_IS_X64
  234. # endif /* WINSTL_ARCH_IS_X64 */
  235. #else /* ? operating system */
  236. #endif /* operating system */
  237. /* /////////////////////////////////////////////////////////////////////////
  238. * Contract Enforcement
  239. *
  240. * The macro winstl_assert provides standard debug-mode assert functionality.
  241. */
  242. /** \brief Defines an assertion construct for runtime verification.
  243. *
  244. * \param expr Must be non-zero, or an assertion will be fired
  245. *
  246. * \remarks By default this is defined to \ref STLSOFT_ASSERT. However, this
  247. * can be overriden if a prior definition is encountered, allowing the
  248. * runtime assertion of WinSTL components to use a different mechanism to
  249. * those in the other \ref group__projects "projects".
  250. */
  251. #ifndef PLATFORMSTL_ASSERT
  252. # define PLATFORMSTL_ASSERT(expr) STLSOFT_ASSERT(expr)
  253. #endif /* !PLATFORMSTL_ASSERT */
  254. /** \brief Defines a runtime assertion, with message
  255. *
  256. * \param expr Must be non-zero, or an assertion will be fired
  257. * \param msg The literal character string message to be included in the assertion
  258. */
  259. #define PLATFORMSTL_MESSAGE_ASSERT(msg, expr) STLSOFT_MESSAGE_ASSERT(msg, expr)
  260. /** \def PLATFORMSTL_STATIC_ASSERT(expr)
  261. *
  262. * \brief Defines an assertion construct for compile-time verification.
  263. *
  264. * \param expr A compile-time evaluatable condition that must be non-zero, or compilation will fail.
  265. *
  266. * \remarks This is defined to \ref STLSOFT_STATIC_ASSERT.
  267. */
  268. #define PLATFORMSTL_STATIC_ASSERT(expr) STLSOFT_STATIC_ASSERT(expr)
  269. /* /////////////////////////////////////////////////////////////////////////
  270. * Namespace
  271. *
  272. * The PLATFORMSTL components are contained within the platformstl namespace. This is
  273. * usually an alias for stlsoft::platformstl_project,
  274. *
  275. * Since STLSoft supports the suspension of namespaces for its main and sub-projects
  276. * (except PlatformSTL) PlatformSTL must be able to work when STLSoft and/or
  277. * UNIXSTL and/or WinSTL constructs are defined in the global namespace.
  278. */
  279. #if defined(__cplusplus)
  280. # if defined(_STLSOFT_NO_NAMESPACES)
  281. # error PlatformSTL may not be compiled when _STLSOFT_NO_NAMESPACES is defined. Note: it _can_ be compiled in the presence of _STLSOFT_NO_NAMESPACE, or _UNIXSTL_NO_NAMESPACE, or _WINSTL_NO_NAMESPACE
  282. # endif /* _STLSOFT_NO_NAMESPACES */
  283. # if defined(_PLATFORMSTL_NO_NAMESPACES)
  284. # error Use of namespaces in PlatformSTL may not be suspended; _PLATFORMSTL_NO_NAMESPACES was detected
  285. # endif /* _PLATFORMSTL_NO_NAMESPACES */
  286. # if defined(_PLATFORMSTL_NO_NAMESPACE)
  287. # error Use of namespaces in PlatformSTL may not be suspended; _PLATFORMSTL_NO_NAMESPACE was detected
  288. # endif /* _PLATFORMSTL_NO_NAMESPACE */
  289. #if defined(PLATFORMSTL_OS_IS_UNIX)
  290. # ifdef UNIXSTL_NO_NAMESPACE
  291. # define PLATFORMSTL_NO_PLATFORM_NAMESPACE
  292. # endif /* UNIXSTL_NO_NAMESPACE */
  293. #elif defined(PLATFORMSTL_OS_IS_WINDOWS)
  294. # ifdef WINSTL_NO_NAMESPACE
  295. # define PLATFORMSTL_NO_PLATFORM_NAMESPACE
  296. # endif /* WINSTL_NO_NAMESPACE */
  297. #else /* ? operating system */
  298. # error Operating system not discriminated. Only UNIX and Windows are currently recognised by PlatformSTL
  299. #endif /* operating system */
  300. #endif /* __cplusplus */
  301. #if !defined(__cplusplus)
  302. /* Nothing defined in C */
  303. #elif defined(_STLSOFT_NO_NAMESPACE) || \
  304. defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  305. /* There is no stlsoft namespace, so must define ::platformstl */
  306. /** \brief The <code class="namespace">platformstl</code> namespace contains all components
  307. * in the \ref group__project__platformstl "PlatformSTL" project.
  308. *
  309. * By default, the <code>platformstl</code> namespace is actually an alias for
  310. * the namespace <code>stlsoft::platformstl_project</code>, which is where all
  311. * the \ref group__project__platformstl "PlatformSTL" components actually reside. This
  312. * measure allows all components within the main the
  313. * \ref group__project__stlsoft "STLSoft" project (which are defined within
  314. * the <code>stlsoft</code> namespace) to be visible to all components
  315. * "within" the <code>platformstl</code> namespace. (Otherwise, there would be a
  316. * whole lot of onerous qualification throughout the code of all
  317. * \ref group__projects "sub-projects".)
  318. *
  319. * \note If either/both of the symbols <code>_STLSOFT_NO_NAMESPACES</code>
  320. * and <code>_PLATFORMSTL_NO_NAMESPACE</code> are defined, all
  321. * \ref group__project__platformstl "PlatformSTL" components will be defined in the
  322. * global namespace. Conversely, if the <code>_STLSOFT_NO_NAMESPACE</code>
  323. * symbol (not to be confused with the
  324. * <code>_STLSOFT_NO_NAMESPACES</code> symbol!) is defined - meaning that
  325. * all \ref group__project__stlsoft "main project" components are to be
  326. * defined in the global namespace, and <code>_PLATFORMSTL_NO_NAMESPACE</code>
  327. * is <b>not</b> defined, then all \ref group__project__platformstl "PlatformSTL"
  328. * components will be defined within a bona fide <code>platformstl</code>
  329. * namespace.
  330. *
  331. * \note This is a vestige of compatibility with compilers with
  332. * no (or no sensible) namespace support that is maintained for reasons of
  333. * backwards compatiblity and because it is, in <i>rare circumstances</i>, a
  334. * useful facility.
  335. */
  336. namespace platformstl
  337. {
  338. #else
  339. /* Define stlsoft::platformstl_project */
  340. namespace stlsoft
  341. {
  342. namespace platformstl_project
  343. {
  344. #endif /* _STLSOFT_NO_NAMESPACE */
  345. /** \def platformstl_ns_qual(x)
  346. * Qualifies with <b>platformstl::</b> if PlatformSTL is using namespaces or, if not, does not qualify
  347. */
  348. /** \def platformstl_ns_using(x)
  349. * Declares a using directive (with respect to <b>platformstl</b>) if PlatformSTL is using namespaces or, if not, does nothing
  350. */
  351. #ifndef _STLSOFT_NO_NAMESPACE
  352. # define platformstl_ns_qual(x) ::platformstl::x
  353. # define platformstl_ns_using(x) using ::platformstl::x;
  354. #else /* ? _STLSOFT_NO_NAMESPACE */
  355. # define platformstl_ns_qual(x) x
  356. # define platformstl_ns_using(x)
  357. #endif /* !_STLSOFT_NO_NAMESPACE */
  358. /** \def platformstl_ns_qual_std(x)
  359. * Qualifies with <b>std::</b> if PlatformSTL is being translated in the context of the standard library being within the <b>std</b> namespace or, if not, does not qualify
  360. */
  361. /** \def platformstl_ns_using_std(x)
  362. * Declares a using directive (with respect to <b>std</b>) if PlatformSTL is being translated in the context of the standard library being within the <b>std</b> namespace or, if not, does nothing
  363. */
  364. #ifdef STLSOFT_CF_std_NAMESPACE
  365. # define platformstl_ns_qual_std(x) ::std::x
  366. # define platformstl_ns_using_std(x) using ::std::x;
  367. #else /* ? STLSOFT_CF_std_NAMESPACE */
  368. # define platformstl_ns_qual_std(x) x
  369. # define platformstl_ns_using_std(x)
  370. #endif /* !STLSOFT_CF_std_NAMESPACE */
  371. /* ////////////////////////////////////////////////////////////////////// */
  372. #if !defined(STLSOFT_DOCUMENTATION_SKIP_SECTION) && \
  373. defined(__cplusplus)
  374. # if defined(PLATFORMSTL_OS_IS_UNIX)
  375. typedef unixstl_ns_qual(us_char_a_t) char_a_t; /*!< Ansi char type */
  376. typedef unixstl_ns_qual(us_char_w_t) char_w_t; /*!< Unicode char type */
  377. typedef unixstl_ns_qual(us_sint8_t) sint8_t; /*!< 8-bit signed integer */
  378. typedef unixstl_ns_qual(us_uint8_t) uint8_t; /*!< 8-bit unsigned integer */
  379. typedef unixstl_ns_qual(us_int16_t) int16_t; /*!< 16-bit integer */
  380. typedef unixstl_ns_qual(us_sint16_t) sint16_t; /*!< 16-bit signed integer */
  381. typedef unixstl_ns_qual(us_uint16_t) uint16_t; /*!< 16-bit unsigned integer */
  382. typedef unixstl_ns_qual(us_int32_t) int32_t; /*!< 32-bit integer */
  383. typedef unixstl_ns_qual(us_sint32_t) sint32_t; /*!< 32-bit signed integer */
  384. typedef unixstl_ns_qual(us_uint32_t) uint32_t; /*!< 32-bit unsigned integer */
  385. # ifdef STLSOFT_CF_64BIT_INT_SUPPORT
  386. typedef unixstl_ns_qual(us_int64_t) int64_t; /*!< 64-bit integer */
  387. typedef unixstl_ns_qual(us_sint64_t) sint64_t; /*!< 64-bit signed integer */
  388. typedef unixstl_ns_qual(us_uint64_t) uint64_t; /*!< 64-bit unsigned integer */
  389. # endif /* STLSOFT_CF_64BIT_INT_SUPPORT */
  390. typedef unixstl_ns_qual(us_int_t) int_t; /*!< integer */
  391. typedef unixstl_ns_qual(us_sint_t) sint_t; /*!< signed integer */
  392. typedef unixstl_ns_qual(us_uint_t) uint_t; /*!< unsigned integer */
  393. typedef unixstl_ns_qual(us_long_t) long_t; /*!< long */
  394. #ifdef __cplusplus
  395. typedef unixstl_ns_qual(us_bool_t) bool_t; /*!< bool */
  396. #endif /* __cplusplus */
  397. typedef unixstl_ns_qual(us_streampos_t) streampos_t; /*!< streampos */
  398. typedef unixstl_ns_qual(us_streamoff_t) streamoff_t; /*!< streamoff */
  399. # elif defined(PLATFORMSTL_OS_IS_WINDOWS)
  400. typedef winstl_ns_qual(ws_char_a_t) char_a_t; /*!< Ansi char type */
  401. typedef winstl_ns_qual(ws_char_w_t) char_w_t; /*!< Unicode char type */
  402. typedef winstl_ns_qual(ws_sint8_t) sint8_t; /*!< 8-bit signed integer */
  403. typedef winstl_ns_qual(ws_uint8_t) uint8_t; /*!< 8-bit unsigned integer */
  404. typedef winstl_ns_qual(ws_int16_t) int16_t; /*!< 16-bit integer */
  405. typedef winstl_ns_qual(ws_sint16_t) sint16_t; /*!< 16-bit signed integer */
  406. typedef winstl_ns_qual(ws_uint16_t) uint16_t; /*!< 16-bit unsigned integer */
  407. typedef winstl_ns_qual(ws_int32_t) int32_t; /*!< 32-bit integer */
  408. typedef winstl_ns_qual(ws_sint32_t) sint32_t; /*!< 32-bit signed integer */
  409. typedef winstl_ns_qual(ws_uint32_t) uint32_t; /*!< 32-bit unsigned integer */
  410. # ifdef STLSOFT_CF_64BIT_INT_SUPPORT
  411. typedef winstl_ns_qual(ws_int64_t) int64_t; /*!< 64-bit integer */
  412. typedef winstl_ns_qual(ws_sint64_t) sint64_t; /*!< 64-bit signed integer */
  413. typedef winstl_ns_qual(ws_uint64_t) uint64_t; /*!< 64-bit unsigned integer */
  414. # endif /* STLSOFT_CF_64BIT_INT_SUPPORT */
  415. typedef winstl_ns_qual(ws_int_t) int_t; /*!< integer */
  416. typedef winstl_ns_qual(ws_sint_t) sint_t; /*!< signed integer */
  417. typedef winstl_ns_qual(ws_uint_t) uint_t; /*!< unsigned integer */
  418. typedef winstl_ns_qual(ws_long_t) long_t; /*!< long */
  419. #ifdef __cplusplus
  420. typedef winstl_ns_qual(ws_bool_t) bool_t; /*!< bool */
  421. #endif /* __cplusplus */
  422. typedef winstl_ns_qual(ws_streampos_t) streampos_t; /*!< streampos */
  423. typedef winstl_ns_qual(ws_streamoff_t) streamoff_t; /*!< streamoff */
  424. # else /* ? operating system */
  425. # error Operating system not discriminated. Only UNIX and Win32 are currently recognised by PlatformSTL
  426. # endif /* operating system */
  427. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION && __cplusplus */
  428. /* ////////////////////////////////////////////////////////////////////// */
  429. #if !defined(__cplusplus)
  430. /* Nothing defined in C */
  431. #elif defined(_STLSOFT_NO_NAMESPACE) || \
  432. defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  433. } /* namespace platformstl */
  434. #else
  435. } /* namespace platformstl_project */
  436. } /* namespace stlsoft */
  437. namespace platformstl = ::stlsoft::platformstl_project;
  438. #endif /* _STLSOFT_NO_NAMESPACE */
  439. /* /////////////////////////////////////////////////////////////////////////
  440. * Inclusion
  441. */
  442. #ifdef STLSOFT_CF_PRAGMA_ONCE_SUPPORT
  443. # pragma once
  444. #endif /* STLSOFT_CF_PRAGMA_ONCE_SUPPORT */
  445. /* ////////////////////////////////////////////////////////////////////// */
  446. #endif /* !PLATFORMSTL_INCL_PLATFORMSTL_H_PLATFORMSTL */
  447. /* ///////////////////////////// end of file //////////////////////////// */