BVB Source Codes

mars Show basic_types.hpp Source code

Return Download mars: download basic_types.hpp Source code - Download mars Source code - Type:.hpp
  1. //  basic_types.hpp  --------------------------------------------------------------//
  2.  
  3. //  Copyright 2010 Vicente J. Botet Escriba
  4. //  Copyright 2015 Andrey Semashev
  5.  
  6. //  Distributed under the Boost Software License, Version 1.0.
  7. //  See http://www.boost.org/LICENSE_1_0.txt
  8.  
  9. #ifndef BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
  10. #define BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
  11.  
  12. #include <cstdarg>
  13. #include <boost/cstdint.hpp>
  14. #include <boost/detail/winapi/config.hpp>
  15.  
  16. #ifdef BOOST_HAS_PRAGMA_ONCE
  17. #pragma once
  18. #endif
  19.  
  20. #if defined( BOOST_USE_WINDOWS_H )
  21. # include <windows.h>
  22. #elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) ||  defined(__CYGWIN__)
  23. # include <winerror.h>
  24. # ifdef UNDER_CE
  25. #  ifndef WINAPI
  26. #   ifndef _WIN32_WCE_EMULATION
  27. #    define WINAPI  __cdecl     // Note this doesn't match the desktop definition
  28. #   else
  29. #    define WINAPI  __stdcall
  30. #   endif
  31. #  endif
  32. // Windows CE defines a few functions as inline functions in kfuncs.h
  33. typedef int BOOL;
  34. typedef unsigned long DWORD;
  35. typedef void* HANDLE;
  36. #  include <kfuncs.h>
  37. # else
  38. #  ifndef WINAPI
  39. #   define WINAPI  __stdcall
  40. #  endif
  41. # endif
  42. # ifndef NTAPI
  43. #  define NTAPI __stdcall
  44. # endif
  45. #else
  46. # error "Win32 functions not available"
  47. #endif
  48.  
  49. #ifndef NO_STRICT
  50. #ifndef STRICT
  51. #define STRICT 1
  52. #endif
  53. #endif
  54.  
  55. #if defined(STRICT)
  56. #define BOOST_DETAIL_WINAPI_DECLARE_HANDLE(x) struct x##__; typedef struct x##__ *x
  57. #else
  58. #define BOOST_DETAIL_WINAPI_DECLARE_HANDLE(x) typedef void* x
  59. #endif
  60.  
  61. #if !defined( BOOST_USE_WINDOWS_H )
  62. extern "C" {
  63. union _LARGE_INTEGER;
  64. struct _SECURITY_ATTRIBUTES;
  65. BOOST_DETAIL_WINAPI_DECLARE_HANDLE(HINSTANCE);
  66. typedef HINSTANCE HMODULE;
  67. }
  68. #endif
  69.  
  70. #if defined(__GNUC__)
  71. #define BOOST_DETAIL_WINAPI_MAY_ALIAS __attribute__ ((__may_alias__))
  72. #else
  73. #define BOOST_DETAIL_WINAPI_MAY_ALIAS
  74. #endif
  75.  
  76. // MinGW64 gcc 4.8.2 fails to compile function declarations with mars_boost::detail::winapi::VOID_ arguments even though
  77. // the typedef expands to void. In Windows SDK, VOID is a macro which unfolds to void. We use our own macro in such cases.
  78. #define BOOST_DETAIL_WINAPI_VOID void
  79.  
  80. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost {
  81. namespace detail {
  82. namespace winapi {
  83. #if defined( BOOST_USE_WINDOWS_H )
  84.  
  85. typedef ::BOOL BOOL_;
  86. typedef ::PBOOL PBOOL_;
  87. typedef ::LPBOOL LPBOOL_;
  88. typedef ::BOOLEAN BOOLEAN_;
  89. typedef ::PBOOLEAN PBOOLEAN_;
  90. typedef ::BYTE BYTE_;
  91. typedef ::PBYTE PBYTE_;
  92. typedef ::LPBYTE LPBYTE_;
  93. typedef ::WORD WORD_;
  94. typedef ::PWORD PWORD_;
  95. typedef ::LPWORD LPWORD_;
  96. typedef ::DWORD DWORD_;
  97. typedef ::PDWORD PDWORD_;
  98. typedef ::LPDWORD LPDWORD_;
  99. typedef ::HANDLE HANDLE_;
  100. typedef ::PHANDLE PHANDLE_;
  101. typedef ::INT INT_;
  102. typedef ::PINT PINT_;
  103. typedef ::LPINT LPINT_;
  104. typedef ::UINT UINT_;
  105. typedef ::PUINT PUINT_;
  106. typedef ::LONG LONG_;
  107. typedef ::PLONG PLONG_;
  108. typedef ::LPLONG LPLONG_;
  109. typedef ::ULONG ULONG_;
  110. typedef ::PULONG PULONG_;
  111. typedef ::LONGLONG LONGLONG_;
  112. typedef ::ULONGLONG ULONGLONG_;
  113. typedef ::INT_PTR INT_PTR_;
  114. typedef ::UINT_PTR UINT_PTR_;
  115. typedef ::LONG_PTR LONG_PTR_;
  116. typedef ::ULONG_PTR ULONG_PTR_;
  117. typedef ::DWORD_PTR DWORD_PTR_;
  118. typedef ::PDWORD_PTR PDWORD_PTR_;
  119. typedef ::SIZE_T SIZE_T_;
  120. typedef ::PSIZE_T PSIZE_T_;
  121. typedef ::SSIZE_T SSIZE_T_;
  122. typedef ::PSSIZE_T PSSIZE_T_;
  123. typedef VOID VOID_; // VOID is a macro
  124. typedef ::PVOID PVOID_;
  125. typedef ::LPVOID LPVOID_;
  126. typedef ::LPCVOID LPCVOID_;
  127. typedef ::CHAR CHAR_;
  128. typedef ::LPSTR LPSTR_;
  129. typedef ::LPCSTR LPCSTR_;
  130. typedef ::WCHAR WCHAR_;
  131. typedef ::LPWSTR LPWSTR_;
  132. typedef ::LPCWSTR LPCWSTR_;
  133.  
  134. #else // defined( BOOST_USE_WINDOWS_H )
  135.  
  136. typedef int BOOL_;
  137. typedef BOOL_* PBOOL_;
  138. typedef BOOL_* LPBOOL_;
  139. typedef unsigned char BYTE_;
  140. typedef BYTE_* PBYTE_;
  141. typedef BYTE_* LPBYTE_;
  142. typedef BYTE_ BOOLEAN_;
  143. typedef BOOLEAN_* PBOOLEAN_;
  144. typedef unsigned short WORD_;
  145. typedef WORD_* PWORD_;
  146. typedef WORD_* LPWORD_;
  147. typedef unsigned long DWORD_;
  148. typedef DWORD_* PDWORD_;
  149. typedef DWORD_* LPDWORD_;
  150. typedef void* HANDLE_;
  151. typedef void** PHANDLE_;
  152.  
  153. typedef int INT_;
  154. typedef INT_* PINT_;
  155. typedef INT_* LPINT_;
  156. typedef unsigned int UINT_;
  157. typedef UINT_* PUINT_;
  158. typedef long LONG_;
  159. typedef LONG_* PLONG_;
  160. typedef LONG_* LPLONG_;
  161. typedef unsigned long ULONG_;
  162. typedef ULONG_* PULONG_;
  163.  
  164. typedef mars_boost::int64_t LONGLONG_;
  165. typedef mars_boost::uint64_t ULONGLONG_;
  166.  
  167. # ifdef _WIN64
  168. #  if defined(__CYGWIN__)
  169. typedef long INT_PTR_;
  170. typedef unsigned long UINT_PTR_;
  171. typedef long LONG_PTR_;
  172. typedef unsigned long ULONG_PTR_;
  173. #  else
  174. typedef __int64 INT_PTR_;
  175. typedef unsigned __int64 UINT_PTR_;
  176. typedef __int64 LONG_PTR_;
  177. typedef unsigned __int64 ULONG_PTR_;
  178. #  endif
  179. # else
  180. typedef int INT_PTR_;
  181. typedef unsigned int UINT_PTR_;
  182. typedef long LONG_PTR_;
  183. typedef unsigned long ULONG_PTR_;
  184. # endif
  185.  
  186. typedef ULONG_PTR_ DWORD_PTR_, *PDWORD_PTR_;
  187. typedef ULONG_PTR_ SIZE_T_, *PSIZE_T_;
  188. typedef LONG_PTR_ SSIZE_T_, *PSSIZE_T_;
  189.  
  190. typedef void VOID_;
  191. typedef void *PVOID_;
  192. typedef void *LPVOID_;
  193. typedef const void *LPCVOID_;
  194.  
  195. typedef char CHAR_;
  196. typedef CHAR_ *LPSTR_;
  197. typedef const CHAR_ *LPCSTR_;
  198.  
  199. typedef wchar_t WCHAR_;
  200. typedef WCHAR_ *LPWSTR_;
  201. typedef const WCHAR_ *LPCWSTR_;
  202.  
  203. #endif // defined( BOOST_USE_WINDOWS_H )
  204.  
  205. typedef ::HMODULE HMODULE_;
  206.  
  207. typedef union BOOST_DETAIL_WINAPI_MAY_ALIAS _LARGE_INTEGER {
  208.     struct {
  209.         DWORD_ LowPart;
  210.         LONG_ HighPart;
  211.     } u;
  212.     LONGLONG_ QuadPart;
  213. } LARGE_INTEGER_, *PLARGE_INTEGER_;
  214.  
  215. typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SECURITY_ATTRIBUTES {
  216.     DWORD_  nLength;
  217.     LPVOID_ lpSecurityDescriptor;
  218.     BOOL_   bInheritHandle;
  219. } SECURITY_ATTRIBUTES_, *PSECURITY_ATTRIBUTES_, *LPSECURITY_ATTRIBUTES_;
  220.  
  221. }
  222. }
  223. }
  224.  
  225. #endif // BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
  226.  
downloadbasic_types.hpp Source code - Download mars Source code
Related Source Codes/Software:
Hero - Elegant transition library for iOS & tvOS 2017-06-09
deep-photo-styletransfer - Code and data for paper "Deep Photo Style Transfer... 2017-06-09
mastodon - A GNU Social-compatible microblogging server ... 2017-06-09
plyr - A simple HTML5, YouTube and Vimeo player ... 2017-06-08
prepack - Prepack is a partial evaluator for JavaScript. Pre... 2017-06-08
Public-APIs - 2017-06-09
lottie-ios - An iOS library to natively render After Effects ve... 2017-06-09
Awesome-Hacking - A collection of various awesome lists for hackers,... 2017-06-09
algorithms - Minimal examples of data structures and algorithms... 2017-06-10
lectures - Oxford Deep NLP 2017 course 2017-06-10
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top