diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-06-27 11:11:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-27 11:11:13 (GMT) |
commit | e24393f41834f116038faf6c6d5012575a67136a (patch) | |
tree | a1e83679e55781bc92849a07c5acda7b5c09908c /contrib/src/boost/detail/winapi | |
parent | b3a2d91805feb81f79ee52c30a077521912b0bf9 (diff) | |
parent | 3a5692f40663282640775f8ff497c4860d265a2a (diff) | |
download | uscxml-e24393f41834f116038faf6c6d5012575a67136a.zip uscxml-e24393f41834f116038faf6c6d5012575a67136a.tar.gz uscxml-e24393f41834f116038faf6c6d5012575a67136a.tar.bz2 |
Merge pull request #149 from tklab-tud/sradomski
remerge
Diffstat (limited to 'contrib/src/boost/detail/winapi')
-rw-r--r-- | contrib/src/boost/detail/winapi/basic_types.hpp | 466 | ||||
-rw-r--r-- | contrib/src/boost/detail/winapi/config.hpp | 152 | ||||
-rw-r--r-- | contrib/src/boost/detail/winapi/crypt.hpp | 423 | ||||
-rw-r--r-- | contrib/src/boost/detail/winapi/detail/cast_ptr.hpp | 80 | ||||
-rw-r--r-- | contrib/src/boost/detail/winapi/get_current_process.hpp | 34 | ||||
-rw-r--r-- | contrib/src/boost/detail/winapi/get_current_process_id.hpp | 66 | ||||
-rw-r--r-- | contrib/src/boost/detail/winapi/get_current_thread.hpp | 34 | ||||
-rw-r--r-- | contrib/src/boost/detail/winapi/get_current_thread_id.hpp | 68 | ||||
-rw-r--r-- | contrib/src/boost/detail/winapi/process.hpp | 386 | ||||
-rw-r--r-- | contrib/src/boost/detail/winapi/thread.hpp | 42 | ||||
-rw-r--r-- | contrib/src/boost/detail/winapi/timers.hpp | 96 |
11 files changed, 1150 insertions, 697 deletions
diff --git a/contrib/src/boost/detail/winapi/basic_types.hpp b/contrib/src/boost/detail/winapi/basic_types.hpp index b767a1f..30df135 100644 --- a/contrib/src/boost/detail/winapi/basic_types.hpp +++ b/contrib/src/boost/detail/winapi/basic_types.hpp @@ -1,233 +1,233 @@ -// basic_types.hpp --------------------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-// Copyright 2015 Andrey Semashev
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-#ifndef BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
-#define BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
-
-#include <cstdarg>
-#include <boost/cstdint.hpp>
-#include <boost/detail/winapi/config.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-#if defined( BOOST_USE_WINDOWS_H )
-# include <windows.h>
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__)
-# include <winerror.h>
-# ifdef UNDER_CE
-# ifndef WINAPI
-# ifndef _WIN32_WCE_EMULATION
-# define WINAPI __cdecl // Note this doesn't match the desktop definition
-# else
-# define WINAPI __stdcall
-# endif
-# endif
-// Windows CE defines a few functions as inline functions in kfuncs.h
-typedef int BOOL;
-typedef unsigned long DWORD;
-typedef void* HANDLE;
-# include <kfuncs.h>
-# else
-# ifndef WINAPI
-# define WINAPI __stdcall
-# endif
-# endif
-# ifndef NTAPI
-# define NTAPI __stdcall
-# endif
-#else
-# error "Win32 functions not available"
-#endif
-
-#ifndef NO_STRICT
-#ifndef STRICT
-#define STRICT 1
-#endif
-#endif
-
-#if defined(STRICT)
-#define BOOST_DETAIL_WINAPI_DECLARE_HANDLE(x) struct x##__; typedef struct x##__ *x
-#else
-#define BOOST_DETAIL_WINAPI_DECLARE_HANDLE(x) typedef void* x
-#endif
-
-#if !defined( BOOST_USE_WINDOWS_H )
-extern "C" {
-union _LARGE_INTEGER;
-struct _SECURITY_ATTRIBUTES;
-BOOST_DETAIL_WINAPI_DECLARE_HANDLE(HINSTANCE);
-typedef HINSTANCE HMODULE;
-}
-#endif
-
-#if defined(__GNUC__)
-#define BOOST_DETAIL_WINAPI_MAY_ALIAS __attribute__ ((__may_alias__))
-#else
-#define BOOST_DETAIL_WINAPI_MAY_ALIAS
-#endif
-
-// MinGW64 gcc 4.8.2 fails to compile function declarations with boost::detail::winapi::VOID_ arguments even though
-// the typedef expands to void. In Windows SDK, VOID is a macro which unfolds to void. We use our own macro in such cases.
-#define BOOST_DETAIL_WINAPI_VOID void
-
-namespace boost {
-namespace detail {
-namespace winapi {
-#if defined( BOOST_USE_WINDOWS_H )
-
-typedef ::BOOL BOOL_;
-typedef ::PBOOL PBOOL_;
-typedef ::LPBOOL LPBOOL_;
-typedef ::BOOLEAN BOOLEAN_;
-typedef ::PBOOLEAN PBOOLEAN_;
-typedef ::BYTE BYTE_;
-typedef ::PBYTE PBYTE_;
-typedef ::LPBYTE LPBYTE_;
-typedef ::WORD WORD_;
-typedef ::PWORD PWORD_;
-typedef ::LPWORD LPWORD_;
-typedef ::DWORD DWORD_;
-typedef ::PDWORD PDWORD_;
-typedef ::LPDWORD LPDWORD_;
-typedef ::HANDLE HANDLE_;
-typedef ::PHANDLE PHANDLE_;
-typedef ::SHORT SHORT_;
-typedef ::PSHORT PSHORT_;
-typedef ::USHORT USHORT_;
-typedef ::PUSHORT PUSHORT_;
-typedef ::INT INT_;
-typedef ::PINT PINT_;
-typedef ::LPINT LPINT_;
-typedef ::UINT UINT_;
-typedef ::PUINT PUINT_;
-typedef ::LONG LONG_;
-typedef ::PLONG PLONG_;
-typedef ::LPLONG LPLONG_;
-typedef ::ULONG ULONG_;
-typedef ::PULONG PULONG_;
-typedef ::LONGLONG LONGLONG_;
-typedef ::ULONGLONG ULONGLONG_;
-typedef ::INT_PTR INT_PTR_;
-typedef ::UINT_PTR UINT_PTR_;
-typedef ::LONG_PTR LONG_PTR_;
-typedef ::ULONG_PTR ULONG_PTR_;
-typedef ::DWORD_PTR DWORD_PTR_;
-typedef ::PDWORD_PTR PDWORD_PTR_;
-typedef ::SIZE_T SIZE_T_;
-typedef ::PSIZE_T PSIZE_T_;
-typedef ::SSIZE_T SSIZE_T_;
-typedef ::PSSIZE_T PSSIZE_T_;
-typedef VOID VOID_; // VOID is a macro
-typedef ::PVOID PVOID_;
-typedef ::LPVOID LPVOID_;
-typedef ::LPCVOID LPCVOID_;
-typedef ::CHAR CHAR_;
-typedef ::LPSTR LPSTR_;
-typedef ::LPCSTR LPCSTR_;
-typedef ::WCHAR WCHAR_;
-typedef ::LPWSTR LPWSTR_;
-typedef ::LPCWSTR LPCWSTR_;
-
-#else // defined( BOOST_USE_WINDOWS_H )
-
-typedef int BOOL_;
-typedef BOOL_* PBOOL_;
-typedef BOOL_* LPBOOL_;
-typedef unsigned char BYTE_;
-typedef BYTE_* PBYTE_;
-typedef BYTE_* LPBYTE_;
-typedef BYTE_ BOOLEAN_;
-typedef BOOLEAN_* PBOOLEAN_;
-typedef unsigned short WORD_;
-typedef WORD_* PWORD_;
-typedef WORD_* LPWORD_;
-typedef unsigned long DWORD_;
-typedef DWORD_* PDWORD_;
-typedef DWORD_* LPDWORD_;
-typedef void* HANDLE_;
-typedef void** PHANDLE_;
-
-typedef short SHORT_;
-typedef SHORT_* PSHORT_;
-typedef unsigned short USHORT_;
-typedef USHORT_* PUSHORT_;
-typedef int INT_;
-typedef INT_* PINT_;
-typedef INT_* LPINT_;
-typedef unsigned int UINT_;
-typedef UINT_* PUINT_;
-typedef long LONG_;
-typedef LONG_* PLONG_;
-typedef LONG_* LPLONG_;
-typedef unsigned long ULONG_;
-typedef ULONG_* PULONG_;
-
-typedef boost::int64_t LONGLONG_;
-typedef boost::uint64_t ULONGLONG_;
-
-# ifdef _WIN64
-# if defined(__CYGWIN__)
-typedef long INT_PTR_;
-typedef unsigned long UINT_PTR_;
-typedef long LONG_PTR_;
-typedef unsigned long ULONG_PTR_;
-# else
-typedef __int64 INT_PTR_;
-typedef unsigned __int64 UINT_PTR_;
-typedef __int64 LONG_PTR_;
-typedef unsigned __int64 ULONG_PTR_;
-# endif
-# else
-typedef int INT_PTR_;
-typedef unsigned int UINT_PTR_;
-typedef long LONG_PTR_;
-typedef unsigned long ULONG_PTR_;
-# endif
-
-typedef ULONG_PTR_ DWORD_PTR_, *PDWORD_PTR_;
-typedef ULONG_PTR_ SIZE_T_, *PSIZE_T_;
-typedef LONG_PTR_ SSIZE_T_, *PSSIZE_T_;
-
-typedef void VOID_;
-typedef void *PVOID_;
-typedef void *LPVOID_;
-typedef const void *LPCVOID_;
-
-typedef char CHAR_;
-typedef CHAR_ *LPSTR_;
-typedef const CHAR_ *LPCSTR_;
-
-typedef wchar_t WCHAR_;
-typedef WCHAR_ *LPWSTR_;
-typedef const WCHAR_ *LPCWSTR_;
-
-#endif // defined( BOOST_USE_WINDOWS_H )
-
-typedef ::HMODULE HMODULE_;
-
-typedef union BOOST_DETAIL_WINAPI_MAY_ALIAS _LARGE_INTEGER {
- struct {
- DWORD_ LowPart;
- LONG_ HighPart;
- } u;
- LONGLONG_ QuadPart;
-} LARGE_INTEGER_, *PLARGE_INTEGER_;
-
-typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SECURITY_ATTRIBUTES {
- DWORD_ nLength;
- LPVOID_ lpSecurityDescriptor;
- BOOL_ bInheritHandle;
-} SECURITY_ATTRIBUTES_, *PSECURITY_ATTRIBUTES_, *LPSECURITY_ATTRIBUTES_;
-
-}
-}
-}
-
-#endif // BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
+// basic_types.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP +#define BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP + +#include <cstdarg> +#include <boost/cstdint.hpp> +#include <boost/detail/winapi/config.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if defined( BOOST_USE_WINDOWS_H ) +# include <windows.h> +#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__) +# include <winerror.h> +# ifdef UNDER_CE +# ifndef WINAPI +# ifndef _WIN32_WCE_EMULATION +# define WINAPI __cdecl // Note this doesn't match the desktop definition +# else +# define WINAPI __stdcall +# endif +# endif +// Windows CE defines a few functions as inline functions in kfuncs.h +typedef int BOOL; +typedef unsigned long DWORD; +typedef void* HANDLE; +# include <kfuncs.h> +# else +# ifndef WINAPI +# define WINAPI __stdcall +# endif +# endif +# ifndef NTAPI +# define NTAPI __stdcall +# endif +#else +# error "Win32 functions not available" +#endif + +#ifndef NO_STRICT +#ifndef STRICT +#define STRICT 1 +#endif +#endif + +#if defined(STRICT) +#define BOOST_DETAIL_WINAPI_DECLARE_HANDLE(x) struct x##__; typedef struct x##__ *x +#else +#define BOOST_DETAIL_WINAPI_DECLARE_HANDLE(x) typedef void* x +#endif + +#if !defined( BOOST_USE_WINDOWS_H ) +extern "C" { +union _LARGE_INTEGER; +struct _SECURITY_ATTRIBUTES; +BOOST_DETAIL_WINAPI_DECLARE_HANDLE(HINSTANCE); +typedef HINSTANCE HMODULE; +} +#endif + +#if defined(__GNUC__) +#define BOOST_DETAIL_WINAPI_MAY_ALIAS __attribute__ ((__may_alias__)) +#else +#define BOOST_DETAIL_WINAPI_MAY_ALIAS +#endif + +// MinGW64 gcc 4.8.2 fails to compile function declarations with boost::detail::winapi::VOID_ arguments even though +// the typedef expands to void. In Windows SDK, VOID is a macro which unfolds to void. We use our own macro in such cases. +#define BOOST_DETAIL_WINAPI_VOID void + +namespace boost { +namespace detail { +namespace winapi { +#if defined( BOOST_USE_WINDOWS_H ) + +typedef ::BOOL BOOL_; +typedef ::PBOOL PBOOL_; +typedef ::LPBOOL LPBOOL_; +typedef ::BOOLEAN BOOLEAN_; +typedef ::PBOOLEAN PBOOLEAN_; +typedef ::BYTE BYTE_; +typedef ::PBYTE PBYTE_; +typedef ::LPBYTE LPBYTE_; +typedef ::WORD WORD_; +typedef ::PWORD PWORD_; +typedef ::LPWORD LPWORD_; +typedef ::DWORD DWORD_; +typedef ::PDWORD PDWORD_; +typedef ::LPDWORD LPDWORD_; +typedef ::HANDLE HANDLE_; +typedef ::PHANDLE PHANDLE_; +typedef ::SHORT SHORT_; +typedef ::PSHORT PSHORT_; +typedef ::USHORT USHORT_; +typedef ::PUSHORT PUSHORT_; +typedef ::INT INT_; +typedef ::PINT PINT_; +typedef ::LPINT LPINT_; +typedef ::UINT UINT_; +typedef ::PUINT PUINT_; +typedef ::LONG LONG_; +typedef ::PLONG PLONG_; +typedef ::LPLONG LPLONG_; +typedef ::ULONG ULONG_; +typedef ::PULONG PULONG_; +typedef ::LONGLONG LONGLONG_; +typedef ::ULONGLONG ULONGLONG_; +typedef ::INT_PTR INT_PTR_; +typedef ::UINT_PTR UINT_PTR_; +typedef ::LONG_PTR LONG_PTR_; +typedef ::ULONG_PTR ULONG_PTR_; +typedef ::DWORD_PTR DWORD_PTR_; +typedef ::PDWORD_PTR PDWORD_PTR_; +typedef ::SIZE_T SIZE_T_; +typedef ::PSIZE_T PSIZE_T_; +typedef ::SSIZE_T SSIZE_T_; +typedef ::PSSIZE_T PSSIZE_T_; +typedef VOID VOID_; // VOID is a macro +typedef ::PVOID PVOID_; +typedef ::LPVOID LPVOID_; +typedef ::LPCVOID LPCVOID_; +typedef ::CHAR CHAR_; +typedef ::LPSTR LPSTR_; +typedef ::LPCSTR LPCSTR_; +typedef ::WCHAR WCHAR_; +typedef ::LPWSTR LPWSTR_; +typedef ::LPCWSTR LPCWSTR_; + +#else // defined( BOOST_USE_WINDOWS_H ) + +typedef int BOOL_; +typedef BOOL_* PBOOL_; +typedef BOOL_* LPBOOL_; +typedef unsigned char BYTE_; +typedef BYTE_* PBYTE_; +typedef BYTE_* LPBYTE_; +typedef BYTE_ BOOLEAN_; +typedef BOOLEAN_* PBOOLEAN_; +typedef unsigned short WORD_; +typedef WORD_* PWORD_; +typedef WORD_* LPWORD_; +typedef unsigned long DWORD_; +typedef DWORD_* PDWORD_; +typedef DWORD_* LPDWORD_; +typedef void* HANDLE_; +typedef void** PHANDLE_; + +typedef short SHORT_; +typedef SHORT_* PSHORT_; +typedef unsigned short USHORT_; +typedef USHORT_* PUSHORT_; +typedef int INT_; +typedef INT_* PINT_; +typedef INT_* LPINT_; +typedef unsigned int UINT_; +typedef UINT_* PUINT_; +typedef long LONG_; +typedef LONG_* PLONG_; +typedef LONG_* LPLONG_; +typedef unsigned long ULONG_; +typedef ULONG_* PULONG_; + +typedef boost::int64_t LONGLONG_; +typedef boost::uint64_t ULONGLONG_; + +# ifdef _WIN64 +# if defined(__CYGWIN__) +typedef long INT_PTR_; +typedef unsigned long UINT_PTR_; +typedef long LONG_PTR_; +typedef unsigned long ULONG_PTR_; +# else +typedef __int64 INT_PTR_; +typedef unsigned __int64 UINT_PTR_; +typedef __int64 LONG_PTR_; +typedef unsigned __int64 ULONG_PTR_; +# endif +# else +typedef int INT_PTR_; +typedef unsigned int UINT_PTR_; +typedef long LONG_PTR_; +typedef unsigned long ULONG_PTR_; +# endif + +typedef ULONG_PTR_ DWORD_PTR_, *PDWORD_PTR_; +typedef ULONG_PTR_ SIZE_T_, *PSIZE_T_; +typedef LONG_PTR_ SSIZE_T_, *PSSIZE_T_; + +typedef void VOID_; +typedef void *PVOID_; +typedef void *LPVOID_; +typedef const void *LPCVOID_; + +typedef char CHAR_; +typedef CHAR_ *LPSTR_; +typedef const CHAR_ *LPCSTR_; + +typedef wchar_t WCHAR_; +typedef WCHAR_ *LPWSTR_; +typedef const WCHAR_ *LPCWSTR_; + +#endif // defined( BOOST_USE_WINDOWS_H ) + +typedef ::HMODULE HMODULE_; + +typedef union BOOST_DETAIL_WINAPI_MAY_ALIAS _LARGE_INTEGER { + struct { + DWORD_ LowPart; + LONG_ HighPart; + } u; + LONGLONG_ QuadPart; +} LARGE_INTEGER_, *PLARGE_INTEGER_; + +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SECURITY_ATTRIBUTES { + DWORD_ nLength; + LPVOID_ lpSecurityDescriptor; + BOOL_ bInheritHandle; +} SECURITY_ATTRIBUTES_, *PSECURITY_ATTRIBUTES_, *LPSECURITY_ATTRIBUTES_; + +} +} +} + +#endif // BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP diff --git a/contrib/src/boost/detail/winapi/config.hpp b/contrib/src/boost/detail/winapi/config.hpp index bb36944..1f08c2a 100644 --- a/contrib/src/boost/detail/winapi/config.hpp +++ b/contrib/src/boost/detail/winapi/config.hpp @@ -1,79 +1,73 @@ -// config.hpp --------------------------------------------------------------//
-
-// Copyright 2013 Andrey Semashev
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#ifndef BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
-#define BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
-
-#if defined __MINGW32__
-#include <_mingw.h>
-#endif
-
-// BOOST_WINAPI_IS_MINGW indicates that the target Windows SDK is provided by MinGW (http://mingw.org/).
-// BOOST_WINAPI_IS_MINGW_W64 indicates that the target Windows SDK is provided by MinGW-w64 (http://mingw-w64.org).
-#if defined __MINGW32__
-#if defined __MINGW64_VERSION_MAJOR
-#define BOOST_WINAPI_IS_MINGW_W64
-#else
-#define BOOST_WINAPI_IS_MINGW
-#endif
-#endif
-
-// These constants reflect _WIN32_WINNT_* macros from sdkddkver.h
-// See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#setting_winver_or__win32_winnt
-#define BOOST_WINAPI_VERSION_NT4 0x0400
-#define BOOST_WINAPI_VERSION_WIN2K 0x0500
-#define BOOST_WINAPI_VERSION_WINXP 0x0501
-#define BOOST_WINAPI_VERSION_WS03 0x0502
-#define BOOST_WINAPI_VERSION_WIN6 0x0600
-#define BOOST_WINAPI_VERSION_VISTA 0x0600
-#define BOOST_WINAPI_VERSION_WS08 0x0600
-#define BOOST_WINAPI_VERSION_LONGHORN 0x0600
-#define BOOST_WINAPI_VERSION_WIN7 0x0601
-#define BOOST_WINAPI_VERSION_WIN8 0x0602
-#define BOOST_WINAPI_VERSION_WINBLUE 0x0603
-#define BOOST_WINAPI_VERSION_WINTHRESHOLD 0x0A00
-#define BOOST_WINAPI_VERSION_WIN10 0x0A00
-
-#if !defined(BOOST_USE_WINAPI_VERSION)
-#if defined(_WIN32_WINNT)
-#define BOOST_USE_WINAPI_VERSION _WIN32_WINNT
-#elif defined(WINVER)
-#define BOOST_USE_WINAPI_VERSION WINVER
-#else
-// By default use Windows Vista API on compilers that support it and XP on the others
-#if (defined(_MSC_VER) && _MSC_VER < 1500) || defined(BOOST_WINAPI_IS_MINGW)
-#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINXP
-#else
-#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN6
-#endif
-#endif
-#endif
-
-#define BOOST_DETAIL_WINAPI_MAKE_NTDDI_VERSION2(x) x##0000
-#define BOOST_DETAIL_WINAPI_MAKE_NTDDI_VERSION(x) BOOST_DETAIL_WINAPI_MAKE_NTDDI_VERSION2(x)
-
-#if defined(BOOST_USE_WINDOWS_H) || defined(BOOST_WINAPI_DEFINE_VERSION_MACROS)
-// We have to define the version macros so that windows.h provides the necessary symbols
-#if !defined(_WIN32_WINNT)
-#define _WIN32_WINNT BOOST_USE_WINAPI_VERSION
-#endif
-#if !defined(WINVER)
-#define WINVER BOOST_USE_WINAPI_VERSION
-#endif
-#if !defined(NTDDI_VERSION)
-#define NTDDI_VERSION BOOST_DETAIL_WINAPI_MAKE_NTDDI_VERSION(BOOST_USE_WINAPI_VERSION)
-#endif
-#endif
-
-#include <boost/config.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-#endif // BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
+// config.hpp --------------------------------------------------------------// + +// Copyright 2013 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_ +#define BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_ + +#if defined __MINGW32__ +#include <_mingw.h> +#endif + +// BOOST_WINAPI_IS_MINGW indicates that the target Windows SDK is provided by MinGW (http://mingw.org/). +// BOOST_WINAPI_IS_MINGW_W64 indicates that the target Windows SDK is provided by MinGW-w64 (http://mingw-w64.org). +#if defined __MINGW32__ +#if defined __MINGW64_VERSION_MAJOR +#define BOOST_WINAPI_IS_MINGW_W64 +#else +#define BOOST_WINAPI_IS_MINGW +#endif +#endif + +// These constants reflect _WIN32_WINNT_* macros from sdkddkver.h +// See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#setting_winver_or__win32_winnt +#define BOOST_WINAPI_VERSION_NT4 0x0400 +#define BOOST_WINAPI_VERSION_WIN2K 0x0500 +#define BOOST_WINAPI_VERSION_WINXP 0x0501 +#define BOOST_WINAPI_VERSION_WS03 0x0502 +#define BOOST_WINAPI_VERSION_WIN6 0x0600 +#define BOOST_WINAPI_VERSION_VISTA 0x0600 +#define BOOST_WINAPI_VERSION_WS08 0x0600 +#define BOOST_WINAPI_VERSION_LONGHORN 0x0600 +#define BOOST_WINAPI_VERSION_WIN7 0x0601 +#define BOOST_WINAPI_VERSION_WIN8 0x0602 +#define BOOST_WINAPI_VERSION_WINBLUE 0x0603 +#define BOOST_WINAPI_VERSION_WINTHRESHOLD 0x0A00 +#define BOOST_WINAPI_VERSION_WIN10 0x0A00 + +#if !defined(BOOST_USE_WINAPI_VERSION) +#if defined(_WIN32_WINNT) +#define BOOST_USE_WINAPI_VERSION _WIN32_WINNT +#elif defined(WINVER) +#define BOOST_USE_WINAPI_VERSION WINVER +#else +// By default use Windows Vista API on compilers that support it and XP on the others +#if (defined(_MSC_VER) && _MSC_VER < 1500) || defined(BOOST_WINAPI_IS_MINGW) +#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINXP +#else +#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN6 +#endif +#endif +#endif + +#if defined(BOOST_USE_WINDOWS_H) +// We have to define the version macros so that windows.h provides the necessary symbols +#if !defined(_WIN32_WINNT) +#define _WIN32_WINNT BOOST_USE_WINAPI_VERSION +#endif +#if !defined(WINVER) +#define WINVER BOOST_USE_WINAPI_VERSION +#endif +#endif + +#include <boost/config.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#endif // BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_ diff --git a/contrib/src/boost/detail/winapi/crypt.hpp b/contrib/src/boost/detail/winapi/crypt.hpp index 4140171..0650845 100644 --- a/contrib/src/boost/detail/winapi/crypt.hpp +++ b/contrib/src/boost/detail/winapi/crypt.hpp @@ -1,230 +1,193 @@ -// crypt.hpp --------------------------------------------------------------//
-
-// Copyright 2014 Antony Polukhin
-// Copyright 2015 Andrey Semashev
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#ifndef BOOST_DETAIL_WINAPI_CRYPT_HPP
-#define BOOST_DETAIL_WINAPI_CRYPT_HPP
-
-#include <boost/detail/winapi/basic_types.hpp>
-#include <boost/detail/winapi/detail/cast_ptr.hpp>
-#if defined( BOOST_USE_WINDOWS_H )
-// This header is not always included as part of windows.h
-#include <wincrypt.h>
-#endif
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-#if !defined( BOOST_USE_WINDOWS_H )
-namespace boost { namespace detail { namespace winapi {
-typedef ULONG_PTR_ HCRYPTPROV_;
-}}}
-
-// Some versions of MinGW (including the latest ones) contain buggy declarations of CryptEnumProvidersA and CryptEnumProvidersW.
-// We cannot detect those broken versions, and we can't include the system header because it's incomplete.
-// So below we duplicate the broken declarations here and work around the problem with cast_ptr. These declarations
-// will have to be removed when MinGW is fixed.
-
-extern "C" {
-#if !defined( BOOST_NO_ANSI_APIS )
-#if !defined( BOOST_WINAPI_IS_MINGW ) || !defined( UNICODE )
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptEnumProvidersA(
- boost::detail::winapi::DWORD_ dwIndex,
- boost::detail::winapi::DWORD_ *pdwReserved,
- boost::detail::winapi::DWORD_ dwFlags,
- boost::detail::winapi::DWORD_ *pdwProvType,
- boost::detail::winapi::LPSTR_ szProvName,
- boost::detail::winapi::DWORD_ *pcbProvName);
-#else
-// Broken declaration in MinGW
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptEnumProvidersA(
- boost::detail::winapi::DWORD_ dwIndex,
- boost::detail::winapi::DWORD_ *pdwReserved,
- boost::detail::winapi::DWORD_ dwFlags,
- boost::detail::winapi::DWORD_ *pdwProvType,
- boost::detail::winapi::LPWSTR_ szProvName,
- boost::detail::winapi::DWORD_ *pcbProvName);
-#endif
-
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptAcquireContextA(
- boost::detail::winapi::HCRYPTPROV_ *phProv,
- boost::detail::winapi::LPCSTR_ pszContainer,
- boost::detail::winapi::LPCSTR_ pszProvider,
- boost::detail::winapi::DWORD_ dwProvType,
- boost::detail::winapi::DWORD_ dwFlags);
-#endif // !defined( BOOST_NO_ANSI_APIS )
-
-#if !defined( BOOST_WINAPI_IS_MINGW ) || defined( UNICODE )
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptEnumProvidersW(
- boost::detail::winapi::DWORD_ dwIndex,
- boost::detail::winapi::DWORD_ *pdwReserved,
- boost::detail::winapi::DWORD_ dwFlags,
- boost::detail::winapi::DWORD_ *pdwProvType,
- boost::detail::winapi::LPWSTR_ szProvName,
- boost::detail::winapi::DWORD_ *pcbProvName);
-#else
-// Broken declaration in MinGW
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptEnumProvidersW(
- boost::detail::winapi::DWORD_ dwIndex,
- boost::detail::winapi::DWORD_ *pdwReserved,
- boost::detail::winapi::DWORD_ dwFlags,
- boost::detail::winapi::DWORD_ *pdwProvType,
- boost::detail::winapi::LPSTR_ szProvName,
- boost::detail::winapi::DWORD_ *pcbProvName);
-#endif
-
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptAcquireContextW(
- boost::detail::winapi::HCRYPTPROV_ *phProv,
- boost::detail::winapi::LPCWSTR_ szContainer,
- boost::detail::winapi::LPCWSTR_ szProvider,
- boost::detail::winapi::DWORD_ dwProvType,
- boost::detail::winapi::DWORD_ dwFlags);
-
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptGenRandom(
- boost::detail::winapi::HCRYPTPROV_ hProv,
- boost::detail::winapi::DWORD_ dwLen,
- boost::detail::winapi::BYTE_ *pbBuffer);
-
-#if defined(_MSC_VER) && (_MSC_VER+0) >= 1500 &&\
- (\
- (defined(NTDDI_VERSION) && (NTDDI_VERSION+0) < BOOST_DETAIL_WINAPI_MAKE_NTDDI_VERSION(BOOST_WINAPI_VERSION_WINXP)) ||\
- (!defined(NTDDI_VERSION) && BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_WINXP)\
- )
-// Standalone MS Windows SDK 6.0A and later provide a different declaration of CryptReleaseContext for Windows 2000 and older.
-// This is not the case for (a) MinGW and MinGW-w64 and (b) MSVC 7.1 and 8, which are shipped with their own Windows SDK.
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptReleaseContext(
- boost::detail::winapi::HCRYPTPROV_ hProv,
- boost::detail::winapi::ULONG_PTR_ dwFlags);
-#else
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptReleaseContext(
- boost::detail::winapi::HCRYPTPROV_ hProv,
- boost::detail::winapi::DWORD_ dwFlags);
-#endif
-}
-#endif // !defined( BOOST_USE_WINDOWS_H )
-
-namespace boost {
-namespace detail {
-namespace winapi {
-
-#if defined( BOOST_USE_WINDOWS_H )
-
-typedef ::HCRYPTPROV HCRYPTPROV_;
-
-const DWORD_ PROV_RSA_FULL_ = PROV_RSA_FULL;
-
-const DWORD_ CRYPT_VERIFYCONTEXT_ = CRYPT_VERIFYCONTEXT;
-const DWORD_ CRYPT_NEWKEYSET_ = CRYPT_NEWKEYSET;
-const DWORD_ CRYPT_DELETEKEYSET_ = CRYPT_DELETEKEYSET;
-const DWORD_ CRYPT_MACHINE_KEYSET_ = CRYPT_MACHINE_KEYSET;
-const DWORD_ CRYPT_SILENT_ = CRYPT_SILENT;
-
-#else
-
-const DWORD_ PROV_RSA_FULL_ = 1;
-
-const DWORD_ CRYPT_VERIFYCONTEXT_ = 0xF0000000;
-const DWORD_ CRYPT_NEWKEYSET_ = 8;
-const DWORD_ CRYPT_DELETEKEYSET_ = 16;
-const DWORD_ CRYPT_MACHINE_KEYSET_ = 32;
-const DWORD_ CRYPT_SILENT_ = 64;
-
-#endif
-
-#if !defined( BOOST_NO_ANSI_APIS )
-using ::CryptAcquireContextA;
-#endif
-using ::CryptAcquireContextW;
-using ::CryptGenRandom;
-
-#if !defined( BOOST_NO_ANSI_APIS )
-BOOST_FORCEINLINE BOOL_ CryptEnumProvidersA(
- DWORD_ dwIndex,
- DWORD_ *pdwReserved,
- DWORD_ dwFlags,
- DWORD_ *pdwProvType,
- LPSTR_ szProvName,
- DWORD_ *pcbProvName)
-{
- return ::CryptEnumProvidersA(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName);
-}
-
-BOOST_FORCEINLINE BOOL_ crypt_enum_providers(
- DWORD_ dwIndex,
- DWORD_ *pdwReserved,
- DWORD_ dwFlags,
- DWORD_ *pdwProvType,
- LPSTR_ szProvName,
- DWORD_ *pcbProvName)
-{
- return ::CryptEnumProvidersA(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName);
-}
-
-BOOST_FORCEINLINE BOOL_ crypt_acquire_context(
- HCRYPTPROV_ *phProv,
- LPCSTR_ pszContainer,
- LPCSTR_ pszProvider,
- DWORD_ dwProvType,
- DWORD_ dwFlags)
-{
- return ::CryptAcquireContextA(phProv, pszContainer, pszProvider, dwProvType, dwFlags);
-}
-#endif
-
-BOOST_FORCEINLINE BOOL_ CryptEnumProvidersW(
- DWORD_ dwIndex,
- DWORD_ *pdwReserved,
- DWORD_ dwFlags,
- DWORD_ *pdwProvType,
- LPWSTR_ szProvName,
- DWORD_ *pcbProvName)
-{
- return ::CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName);
-}
-
-BOOST_FORCEINLINE BOOL_ crypt_enum_providers(
- DWORD_ dwIndex,
- DWORD_ *pdwReserved,
- DWORD_ dwFlags,
- DWORD_ *pdwProvType,
- LPWSTR_ szProvName,
- DWORD_ *pcbProvName)
-{
- return ::CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName);
-}
-
-BOOST_FORCEINLINE BOOL_ crypt_acquire_context(
- HCRYPTPROV_ *phProv,
- LPCWSTR_ szContainer,
- LPCWSTR_ szProvider,
- DWORD_ dwProvType,
- DWORD_ dwFlags)
-{
- return ::CryptAcquireContextW(phProv, szContainer, szProvider, dwProvType, dwFlags);
-}
-
-BOOST_FORCEINLINE BOOL_ CryptReleaseContext(HCRYPTPROV_ hProv, DWORD_ dwFlags)
-{
- return ::CryptReleaseContext(hProv, dwFlags);
-}
-
-}
-}
-}
-
-#endif // BOOST_DETAIL_WINAPI_CRYPT_HPP
+// crypt.hpp --------------------------------------------------------------// + +// Copyright 2014 Antony Polukhin +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_CRYPT_HPP +#define BOOST_DETAIL_WINAPI_CRYPT_HPP + +#include <boost/detail/winapi/basic_types.hpp> +#include <boost/detail/winapi/detail/cast_ptr.hpp> +#if defined( BOOST_USE_WINDOWS_H ) +// This header is not always included as part of windows.h +#include <wincrypt.h> +#endif + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined( BOOST_USE_WINDOWS_H ) +namespace boost { namespace detail { namespace winapi { +typedef ULONG_PTR_ HCRYPTPROV_; +}}} + +// Some versions of MinGW (including the latest ones) contain buggy declarations of CryptEnumProvidersA and CryptEnumProvidersW. +// We cannot detect those broken versions, and we can't include the system header because it's incomplete. +// So below we duplicate the broken declarations here and work around the problem with cast_ptr. These declarations +// will have to be removed when MinGW is fixed. + +extern "C" { +#if !defined( BOOST_NO_ANSI_APIS ) +#if !defined( BOOST_WINAPI_IS_MINGW ) || !defined( UNICODE ) +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptEnumProvidersA( + boost::detail::winapi::DWORD_ dwIndex, + boost::detail::winapi::DWORD_ *pdwReserved, + boost::detail::winapi::DWORD_ dwFlags, + boost::detail::winapi::DWORD_ *pdwProvType, + boost::detail::winapi::LPSTR_ szProvName, + boost::detail::winapi::DWORD_ *pcbProvName); +#else +// Broken declaration in MinGW +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptEnumProvidersA( + boost::detail::winapi::DWORD_ dwIndex, + boost::detail::winapi::DWORD_ *pdwReserved, + boost::detail::winapi::DWORD_ dwFlags, + boost::detail::winapi::DWORD_ *pdwProvType, + boost::detail::winapi::LPWSTR_ szProvName, + boost::detail::winapi::DWORD_ *pcbProvName); +#endif + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptAcquireContextA( + boost::detail::winapi::HCRYPTPROV_ *phProv, + boost::detail::winapi::LPCSTR_ pszContainer, + boost::detail::winapi::LPCSTR_ pszProvider, + boost::detail::winapi::DWORD_ dwProvType, + boost::detail::winapi::DWORD_ dwFlags); +#endif // !defined( BOOST_NO_ANSI_APIS ) + +#if !defined( BOOST_WINAPI_IS_MINGW ) || defined( UNICODE ) +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptEnumProvidersW( + boost::detail::winapi::DWORD_ dwIndex, + boost::detail::winapi::DWORD_ *pdwReserved, + boost::detail::winapi::DWORD_ dwFlags, + boost::detail::winapi::DWORD_ *pdwProvType, + boost::detail::winapi::LPWSTR_ szProvName, + boost::detail::winapi::DWORD_ *pcbProvName); +#else +// Broken declaration in MinGW +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptEnumProvidersW( + boost::detail::winapi::DWORD_ dwIndex, + boost::detail::winapi::DWORD_ *pdwReserved, + boost::detail::winapi::DWORD_ dwFlags, + boost::detail::winapi::DWORD_ *pdwProvType, + boost::detail::winapi::LPSTR_ szProvName, + boost::detail::winapi::DWORD_ *pcbProvName); +#endif + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptAcquireContextW( + boost::detail::winapi::HCRYPTPROV_ *phProv, + boost::detail::winapi::LPCWSTR_ szContainer, + boost::detail::winapi::LPCWSTR_ szProvider, + boost::detail::winapi::DWORD_ dwProvType, + boost::detail::winapi::DWORD_ dwFlags); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptGenRandom( + boost::detail::winapi::HCRYPTPROV_ hProv, + boost::detail::winapi::DWORD_ dwLen, + boost::detail::winapi::BYTE_ *pbBuffer); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptReleaseContext( + boost::detail::winapi::HCRYPTPROV_ hProv, + boost::detail::winapi::DWORD_ dwFlags); +} +#endif // !defined( BOOST_USE_WINDOWS_H ) + +namespace boost { +namespace detail { +namespace winapi { + +#if defined( BOOST_USE_WINDOWS_H ) + +typedef ::HCRYPTPROV HCRYPTPROV_; + +const DWORD_ PROV_RSA_FULL_ = PROV_RSA_FULL; + +const DWORD_ CRYPT_VERIFYCONTEXT_ = CRYPT_VERIFYCONTEXT; +const DWORD_ CRYPT_NEWKEYSET_ = CRYPT_NEWKEYSET; +const DWORD_ CRYPT_DELETEKEYSET_ = CRYPT_DELETEKEYSET; +const DWORD_ CRYPT_MACHINE_KEYSET_ = CRYPT_MACHINE_KEYSET; +const DWORD_ CRYPT_SILENT_ = CRYPT_SILENT; + +#else + +const DWORD_ PROV_RSA_FULL_ = 1; + +const DWORD_ CRYPT_VERIFYCONTEXT_ = 0xF0000000; +const DWORD_ CRYPT_NEWKEYSET_ = 8; +const DWORD_ CRYPT_DELETEKEYSET_ = 16; +const DWORD_ CRYPT_MACHINE_KEYSET_ = 32; +const DWORD_ CRYPT_SILENT_ = 64; + +#endif + +#if !defined( BOOST_NO_ANSI_APIS ) +using ::CryptEnumProvidersA; +using ::CryptAcquireContextA; +#endif +using ::CryptEnumProvidersW; +using ::CryptAcquireContextW; +using ::CryptGenRandom; +using ::CryptReleaseContext; + +#if !defined( BOOST_NO_ANSI_APIS ) +BOOST_FORCEINLINE BOOL_ crypt_enum_providers( + DWORD_ dwIndex, + DWORD_ *pdwReserved, + DWORD_ dwFlags, + DWORD_ *pdwProvType, + LPSTR_ szProvName, + DWORD_ *pcbProvName) +{ + return ::CryptEnumProvidersA(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName); +} + +BOOST_FORCEINLINE BOOL_ crypt_acquire_context( + HCRYPTPROV_ *phProv, + LPCSTR_ pszContainer, + LPCSTR_ pszProvider, + DWORD_ dwProvType, + DWORD_ dwFlags) +{ + return ::CryptAcquireContextA(phProv, pszContainer, pszProvider, dwProvType, dwFlags); +} +#endif + +BOOST_FORCEINLINE BOOL_ crypt_enum_providers( + DWORD_ dwIndex, + DWORD_ *pdwReserved, + DWORD_ dwFlags, + DWORD_ *pdwProvType, + LPWSTR_ szProvName, + DWORD_ *pcbProvName) +{ + return ::CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName); +} + +BOOST_FORCEINLINE BOOL_ crypt_acquire_context( + HCRYPTPROV_ *phProv, + LPCWSTR_ szContainer, + LPCWSTR_ szProvider, + DWORD_ dwProvType, + DWORD_ dwFlags) +{ + return ::CryptAcquireContextW(phProv, szContainer, szProvider, dwProvType, dwFlags); +} + +} +} +} + +#endif // BOOST_DETAIL_WINAPI_CRYPT_HPP diff --git a/contrib/src/boost/detail/winapi/detail/cast_ptr.hpp b/contrib/src/boost/detail/winapi/detail/cast_ptr.hpp index 51d00ad..261007e 100644 --- a/contrib/src/boost/detail/winapi/detail/cast_ptr.hpp +++ b/contrib/src/boost/detail/winapi/detail/cast_ptr.hpp @@ -1,40 +1,40 @@ -// cast_ptr.hpp --------------------------------------------------------------//
-
-// Copyright 2015 Andrey Semashev
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#ifndef BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP
-#define BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP
-
-#include <boost/detail/winapi/config.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-namespace boost {
-namespace detail {
-namespace winapi {
-namespace detail {
-
-//! This class is used to automatically cast pointers to the type used in the current Windows SDK function declarations
-class cast_ptr
-{
-private:
- const void* m_p;
-
-public:
- explicit BOOST_FORCEINLINE cast_ptr(const void* p) BOOST_NOEXCEPT : m_p(p) {}
- template< typename T >
- BOOST_FORCEINLINE operator T* () const BOOST_NOEXCEPT { return (T*)m_p; }
-};
-
-}
-}
-}
-}
-
-#endif // BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP
+// cast_ptr.hpp --------------------------------------------------------------// + +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP +#define BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP + +#include <boost/detail/winapi/config.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost { +namespace detail { +namespace winapi { +namespace detail { + +//! This class is used to automatically cast pointers to the type used in the current Windows SDK function declarations +class cast_ptr +{ +private: + const void* m_p; + +public: + explicit BOOST_FORCEINLINE cast_ptr(const void* p) BOOST_NOEXCEPT : m_p(p) {} + template< typename T > + BOOST_FORCEINLINE operator T* () const BOOST_NOEXCEPT { return (T*)m_p; } +}; + +} +} +} +} + +#endif // BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP diff --git a/contrib/src/boost/detail/winapi/get_current_process.hpp b/contrib/src/boost/detail/winapi/get_current_process.hpp new file mode 100644 index 0000000..e5f4f2a --- /dev/null +++ b/contrib/src/boost/detail/winapi/get_current_process.hpp @@ -0,0 +1,34 @@ +// get_current_process.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP +#define BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP + +#include <boost/detail/winapi/basic_types.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// Windows CE define GetCurrentProcess as an inline function in kfuncs.h +#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI GetCurrentProcess(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::GetCurrentProcess; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP diff --git a/contrib/src/boost/detail/winapi/get_current_process_id.hpp b/contrib/src/boost/detail/winapi/get_current_process_id.hpp index 8a9f1fc..aa21e6c 100644 --- a/contrib/src/boost/detail/winapi/get_current_process_id.hpp +++ b/contrib/src/boost/detail/winapi/get_current_process_id.hpp @@ -1,33 +1,33 @@ -// get_current_process_id.hpp --------------------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP
-#define BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP
-
-#include <boost/detail/winapi/basic_types.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-// Windows CE define GetCurrentProcessId as an inline function in kfuncs.h
-#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE )
-extern "C" {
-BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetCurrentProcessId(BOOST_DETAIL_WINAPI_VOID);
-}
-#endif
-
-namespace boost {
-namespace detail {
-namespace winapi {
-using ::GetCurrentProcessId;
-}
-}
-}
-
-#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP
+// get_current_process_id.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP +#define BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP + +#include <boost/detail/winapi/basic_types.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// Windows CE define GetCurrentProcessId as an inline function in kfuncs.h +#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetCurrentProcessId(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::GetCurrentProcessId; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP diff --git a/contrib/src/boost/detail/winapi/get_current_thread.hpp b/contrib/src/boost/detail/winapi/get_current_thread.hpp new file mode 100644 index 0000000..b52c3a8 --- /dev/null +++ b/contrib/src/boost/detail/winapi/get_current_thread.hpp @@ -0,0 +1,34 @@ +// get_current_thread.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP +#define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP + +#include <boost/detail/winapi/basic_types.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// Windows CE define GetCurrentThread as an inline function in kfuncs.h +#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI GetCurrentThread(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::GetCurrentThread; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP diff --git a/contrib/src/boost/detail/winapi/get_current_thread_id.hpp b/contrib/src/boost/detail/winapi/get_current_thread_id.hpp index 504b0ff..198af3b 100644 --- a/contrib/src/boost/detail/winapi/get_current_thread_id.hpp +++ b/contrib/src/boost/detail/winapi/get_current_thread_id.hpp @@ -1,34 +1,34 @@ -// get_current_thread_id.hpp --------------------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-// Copyright 2015 Andrey Semashev
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP
-#define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP
-
-#include <boost/detail/winapi/basic_types.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-// Windows CE define GetCurrentThreadId as an inline function in kfuncs.h
-#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE )
-extern "C" {
-BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetCurrentThreadId(BOOST_DETAIL_WINAPI_VOID);
-}
-#endif
-
-namespace boost {
-namespace detail {
-namespace winapi {
-using ::GetCurrentThreadId;
-}
-}
-}
-
-#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP
+// get_current_thread_id.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP +#define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP + +#include <boost/detail/winapi/basic_types.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// Windows CE define GetCurrentThreadId as an inline function in kfuncs.h +#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetCurrentThreadId(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::GetCurrentThreadId; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP diff --git a/contrib/src/boost/detail/winapi/process.hpp b/contrib/src/boost/detail/winapi/process.hpp new file mode 100644 index 0000000..d980aa6 --- /dev/null +++ b/contrib/src/boost/detail/winapi/process.hpp @@ -0,0 +1,386 @@ +// process.hpp --------------------------------------------------------------// + +// Copyright 2016 Klemens D. Morgenstern +// Copyright 2016 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_DETAIL_WINAPI_PROCESS_HPP_ +#define BOOST_DETAIL_WINAPI_PROCESS_HPP_ + +#include <boost/detail/winapi/config.hpp> +#include <boost/detail/winapi/basic_types.hpp> +#include <boost/detail/winapi/get_current_process.hpp> +#include <boost/detail/winapi/get_current_process_id.hpp> +#include <boost/predef/platform.h> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if BOOST_PLAT_WINDOWS_DESKTOP + +#if !defined( BOOST_USE_WINDOWS_H ) +extern "C" { + +struct _PROCESS_INFORMATION; +#if !defined( BOOST_NO_ANSI_APIS ) +struct _STARTUPINFOA; +#endif +struct _STARTUPINFOW; + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 +struct _PROC_THREAD_ATTRIBUTE_LIST; +#if !defined( BOOST_NO_ANSI_APIS ) +struct _STARTUPINFOEXA; +#endif +struct _STARTUPINFOEXW; +#endif + +BOOST_SYMBOL_IMPORT BOOST_NORETURN boost::detail::winapi::VOID_ WINAPI +ExitProcess(boost::detail::winapi::UINT_ uExitCode); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI TerminateProcess( + boost::detail::winapi::HANDLE_ hProcess, + boost::detail::winapi::UINT_ uExitCode); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI GetExitCodeProcess( + boost::detail::winapi::HANDLE_ hProcess, + boost::detail::winapi::LPDWORD_ lpExitCode); + +#if !defined( BOOST_NO_ANSI_APIS ) +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI CreateProcessA( + boost::detail::winapi::LPCSTR_ lpApplicationName, + boost::detail::winapi::LPSTR_ lpCommandLine, + ::_SECURITY_ATTRIBUTES* lpProcessAttributes, + ::_SECURITY_ATTRIBUTES* lpThreadAttributes, + boost::detail::winapi::INT_ bInheritHandles, + boost::detail::winapi::DWORD_ dwCreationFlags, + boost::detail::winapi::LPVOID_ lpEnvironment, + boost::detail::winapi::LPCSTR_ lpCurrentDirectory, + ::_STARTUPINFOA* lpStartupInfo, + ::_PROCESS_INFORMATION* lpProcessInformation); +#endif + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI CreateProcessW( + boost::detail::winapi::LPCWSTR_ lpApplicationName, + boost::detail::winapi::LPWSTR_ lpCommandLine, + ::_SECURITY_ATTRIBUTES* lpProcessAttributes, + ::_SECURITY_ATTRIBUTES* lpThreadAttributes, + boost::detail::winapi::INT_ bInheritHandles, + boost::detail::winapi::DWORD_ dwCreationFlags, + boost::detail::winapi::LPVOID_ lpEnvironment, + boost::detail::winapi::LPCWSTR_ lpCurrentDirectory, + ::_STARTUPINFOW* lpStartupInfo, + ::_PROCESS_INFORMATION* lpProcessInformation); + +} // extern "C" +#endif //defined BOOST_WINDOWS_H + +namespace boost { +namespace detail { +namespace winapi { + +#if defined( BOOST_USE_WINDOWS_H ) + +const DWORD_ DEBUG_PROCESS_ = DEBUG_PROCESS; +const DWORD_ DEBUG_ONLY_THIS_PROCESS_ = DEBUG_ONLY_THIS_PROCESS; +const DWORD_ CREATE_SUSPENDED_ = CREATE_SUSPENDED; +const DWORD_ DETACHED_PROCESS_ = DETACHED_PROCESS; +const DWORD_ CREATE_NEW_CONSOLE_ = CREATE_NEW_CONSOLE; +const DWORD_ CREATE_NEW_PROCESS_GROUP_ = CREATE_NEW_PROCESS_GROUP; +const DWORD_ CREATE_UNICODE_ENVIRONMENT_ = CREATE_UNICODE_ENVIRONMENT; +const DWORD_ CREATE_SEPARATE_WOW_VDM_ = CREATE_SEPARATE_WOW_VDM; +const DWORD_ CREATE_SHARED_WOW_VDM_ = CREATE_SHARED_WOW_VDM; +const DWORD_ CREATE_FORCEDOS_ = CREATE_FORCEDOS; +const DWORD_ CREATE_BREAKAWAY_FROM_JOB_ = CREATE_BREAKAWAY_FROM_JOB; +const DWORD_ CREATE_DEFAULT_ERROR_MODE_ = CREATE_DEFAULT_ERROR_MODE; +const DWORD_ CREATE_NO_WINDOW_ = CREATE_NO_WINDOW; + +// Undocumented +const DWORD_ PROFILE_USER_ = PROFILE_USER; +const DWORD_ PROFILE_KERNEL_ = PROFILE_KERNEL; +const DWORD_ PROFILE_SERVER_ = PROFILE_SERVER; + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 +const DWORD_ CREATE_PROTECTED_PROCESS_ = CREATE_PROTECTED_PROCESS; +const DWORD_ EXTENDED_STARTUPINFO_PRESENT_ = EXTENDED_STARTUPINFO_PRESENT; +#endif + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN7 +const DWORD_ INHERIT_PARENT_AFFINITY_ = INHERIT_PARENT_AFFINITY; +#endif + +// Only documented for Windows CE +#if defined(UNDER_CE) +const DWORD_ INHERIT_CALLER_PRIORITY_ = INHERIT_CALLER_PRIORITY; +#endif + +const DWORD_ STARTF_USESHOWWINDOW_ = STARTF_USESHOWWINDOW; +const DWORD_ STARTF_USESIZE_ = STARTF_USESIZE; +const DWORD_ STARTF_USEPOSITION_ = STARTF_USEPOSITION; +const DWORD_ STARTF_USECOUNTCHARS_ = STARTF_USECOUNTCHARS; +const DWORD_ STARTF_USEFILLATTRIBUTE_ = STARTF_USEFILLATTRIBUTE; +const DWORD_ STARTF_RUNFULLSCREEN_ = STARTF_RUNFULLSCREEN; +const DWORD_ STARTF_FORCEONFEEDBACK_ = STARTF_FORCEONFEEDBACK; +const DWORD_ STARTF_FORCEOFFFEEDBACK_ = STARTF_FORCEOFFFEEDBACK; +const DWORD_ STARTF_USESTDHANDLES_ = STARTF_USESTDHANDLES; +const DWORD_ STARTF_USEHOTKEY_ = STARTF_USEHOTKEY; + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN7 +const DWORD_ STARTF_TITLEISLINKNAME_ = STARTF_TITLEISLINKNAME; +const DWORD_ STARTF_TITLEISAPPID_ = STARTF_TITLEISAPPID; +const DWORD_ STARTF_PREVENTPINNING_ = STARTF_PREVENTPINNING; +#endif + +#else // defined( BOOST_USE_WINDOWS_H ) + +const DWORD_ DEBUG_PROCESS_ = 0x1; +const DWORD_ DEBUG_ONLY_THIS_PROCESS_ = 0x2; +const DWORD_ CREATE_SUSPENDED_ = 0x4; +const DWORD_ DETACHED_PROCESS_ = 0x8; +const DWORD_ CREATE_NEW_CONSOLE_ = 0x10; +const DWORD_ CREATE_NEW_PROCESS_GROUP_ = 0x200; +const DWORD_ CREATE_UNICODE_ENVIRONMENT_ = 0x400; +const DWORD_ CREATE_SEPARATE_WOW_VDM_ = 0x800; +const DWORD_ CREATE_SHARED_WOW_VDM_ = 0x1000; +const DWORD_ CREATE_FORCEDOS_ = 0x2000; +const DWORD_ CREATE_BREAKAWAY_FROM_JOB_ = 0x1000000; +const DWORD_ CREATE_DEFAULT_ERROR_MODE_ = 0x4000000; +const DWORD_ CREATE_NO_WINDOW_ = 0x8000000; + +// Undocumented +const DWORD_ PROFILE_USER_ = 0x10000000; +const DWORD_ PROFILE_KERNEL_ = 0x20000000; +const DWORD_ PROFILE_SERVER_ = 0x40000000; + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 +const DWORD_ CREATE_PROTECTED_PROCESS_ = 0x40000; +const DWORD_ EXTENDED_STARTUPINFO_PRESENT_ = 0x80000; +#endif + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN7 +const DWORD_ INHERIT_PARENT_AFFINITY_ = 0x10000; +#endif + +// Only documented for Windows CE +#if defined(UNDER_CE) +const DWORD_ INHERIT_CALLER_PRIORITY_ = 0x20000; +#endif + +const DWORD_ STARTF_USESHOWWINDOW_ = 0x00000001; +const DWORD_ STARTF_USESIZE_ = 0x00000002; +const DWORD_ STARTF_USEPOSITION_ = 0x00000004; +const DWORD_ STARTF_USECOUNTCHARS_ = 0x00000008; +const DWORD_ STARTF_USEFILLATTRIBUTE_ = 0x00000010; +const DWORD_ STARTF_RUNFULLSCREEN_ = 0x00000020; +const DWORD_ STARTF_FORCEONFEEDBACK_ = 0x00000040; +const DWORD_ STARTF_FORCEOFFFEEDBACK_ = 0x00000080; +const DWORD_ STARTF_USESTDHANDLES_ = 0x00000100; +const DWORD_ STARTF_USEHOTKEY_ = 0x00000200; + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN7 +const DWORD_ STARTF_TITLEISLINKNAME_ = 0x00000800; +const DWORD_ STARTF_TITLEISAPPID_ = 0x00001000; +const DWORD_ STARTF_PREVENTPINNING_ = 0x00002000; +#endif + +#endif // defined( BOOST_USE_WINDOWS_H ) + +#if defined( BOOST_USE_WINDOWS_H ) && !defined( BOOST_WINAPI_IS_MINGW ) + +const DWORD_ CREATE_PRESERVE_CODE_AUTHZ_LEVEL_ = CREATE_PRESERVE_CODE_AUTHZ_LEVEL; + +// Undocumented +const DWORD_ CREATE_IGNORE_SYSTEM_DEFAULT_ = CREATE_IGNORE_SYSTEM_DEFAULT; + +#else // defined( BOOST_USE_WINDOWS_H ) && !defined( BOOST_WINAPI_IS_MINGW ) + +const DWORD_ CREATE_PRESERVE_CODE_AUTHZ_LEVEL_ = 0x2000000; + +// Undocumented +const DWORD_ CREATE_IGNORE_SYSTEM_DEFAULT_ = 0x80000000; + +#endif // defined( BOOST_USE_WINDOWS_H ) && !defined( BOOST_WINAPI_IS_MINGW ) + +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _PROCESS_INFORMATION { + HANDLE_ hProcess; + HANDLE_ hThread; + DWORD_ dwProcessId; + DWORD_ dwThreadId; +} PROCESS_INFORMATION_, *PPROCESS_INFORMATION_, *LPPROCESS_INFORMATION_; + +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _STARTUPINFOA { + DWORD_ cb; + LPSTR_ lpReserved; + LPSTR_ lpDesktop; + LPSTR_ lpTitle; + DWORD_ dwX; + DWORD_ dwY; + DWORD_ dwXSize; + DWORD_ dwYSize; + DWORD_ dwXCountChars; + DWORD_ dwYCountChars; + DWORD_ dwFillAttribute; + DWORD_ dwFlags; + WORD_ wShowWindow; + WORD_ cbReserved2; + LPBYTE_ lpReserved2; + HANDLE_ hStdInput; + HANDLE_ hStdOutput; + HANDLE_ hStdError; +} STARTUPINFOA_, *LPSTARTUPINFOA_; + +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _STARTUPINFOW { + DWORD_ cb; + LPWSTR_ lpReserved; + LPWSTR_ lpDesktop; + LPWSTR_ lpTitle; + DWORD_ dwX; + DWORD_ dwY; + DWORD_ dwXSize; + DWORD_ dwYSize; + DWORD_ dwXCountChars; + DWORD_ dwYCountChars; + DWORD_ dwFillAttribute; + DWORD_ dwFlags; + WORD_ wShowWindow; + WORD_ cbReserved2; + LPBYTE_ lpReserved2; + HANDLE_ hStdInput; + HANDLE_ hStdOutput; + HANDLE_ hStdError; +} STARTUPINFOW_, *LPSTARTUPINFOW_; + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 + +typedef struct _PROC_THREAD_ATTRIBUTE_LIST PROC_THREAD_ATTRIBUTE_LIST_, *PPROC_THREAD_ATTRIBUTE_LIST_; + +#if !defined(BOOST_NO_ANSI_APIS) +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _STARTUPINFOEXA { + STARTUPINFOA_ StartupInfo; + PPROC_THREAD_ATTRIBUTE_LIST_ lpAttributeList; +} STARTUPINFOEXA_, *LPSTARTUPINFOEXA_; +#endif //BOOST_NO_ANSI_APIS + +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _STARTUPINFOEXW { + STARTUPINFOW_ StartupInfo; + PPROC_THREAD_ATTRIBUTE_LIST_ lpAttributeList; +} STARTUPINFOEXW_, *LPSTARTUPINFOEXW_; + +#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 + +using ::GetExitCodeProcess; +using ::ExitProcess; +using ::TerminateProcess; + +#if !defined( BOOST_NO_ANSI_APIS ) +BOOST_FORCEINLINE BOOL_ CreateProcessA( + LPCSTR_ lpApplicationName, + LPSTR_ lpCommandLine, + LPSECURITY_ATTRIBUTES_ lpProcessAttributes, + LPSECURITY_ATTRIBUTES_ lpThreadAttributes, + INT_ bInheritHandles, + DWORD_ dwCreationFlags, + LPVOID_ lpEnvironment, + LPCSTR_ lpCurrentDirectory, + LPSTARTUPINFOA_ lpStartupInfo, + LPPROCESS_INFORMATION_ lpProcessInformation) +{ + return ::CreateProcessA( + lpApplicationName, + lpCommandLine, + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpProcessAttributes), + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpThreadAttributes), + bInheritHandles, + dwCreationFlags, + lpEnvironment, + lpCurrentDirectory, + reinterpret_cast< ::_STARTUPINFOA* >(lpStartupInfo), + reinterpret_cast< ::_PROCESS_INFORMATION* >(lpProcessInformation)); +} + +BOOST_FORCEINLINE BOOL_ create_process( + LPCSTR_ lpApplicationName, + LPSTR_ lpCommandLine, + LPSECURITY_ATTRIBUTES_ lpProcessAttributes, + LPSECURITY_ATTRIBUTES_ lpThreadAttributes, + INT_ bInheritHandles, + DWORD_ dwCreationFlags, + LPVOID_ lpEnvironment, + LPCSTR_ lpCurrentDirectory, + LPSTARTUPINFOA_ lpStartupInfo, + LPPROCESS_INFORMATION_ lpProcessInformation) +{ + return ::CreateProcessA( + lpApplicationName, + lpCommandLine, + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpProcessAttributes), + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpThreadAttributes), + bInheritHandles, + dwCreationFlags, + lpEnvironment, + lpCurrentDirectory, + reinterpret_cast< ::_STARTUPINFOA* >(lpStartupInfo), + reinterpret_cast< ::_PROCESS_INFORMATION* >(lpProcessInformation)); +} +#endif + +BOOST_FORCEINLINE BOOL_ CreateProcessW( + LPCWSTR_ lpApplicationName, + LPWSTR_ lpCommandLine, + LPSECURITY_ATTRIBUTES_ lpProcessAttributes, + LPSECURITY_ATTRIBUTES_ lpThreadAttributes, + INT_ bInheritHandles, + DWORD_ dwCreationFlags, + LPVOID_ lpEnvironment, + LPCWSTR_ lpCurrentDirectory, + LPSTARTUPINFOW_ lpStartupInfo, + LPPROCESS_INFORMATION_ lpProcessInformation) +{ + return ::CreateProcessW( + lpApplicationName, + lpCommandLine, + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpProcessAttributes), + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpThreadAttributes), + bInheritHandles, + dwCreationFlags, + lpEnvironment, + lpCurrentDirectory, + reinterpret_cast< ::_STARTUPINFOW* >(lpStartupInfo), + reinterpret_cast< ::_PROCESS_INFORMATION* >(lpProcessInformation)); +} + +BOOST_FORCEINLINE BOOL_ create_process( + LPCWSTR_ lpApplicationName, + LPWSTR_ lpCommandLine, + LPSECURITY_ATTRIBUTES_ lpProcessAttributes, + LPSECURITY_ATTRIBUTES_ lpThreadAttributes, + INT_ bInheritHandles, + DWORD_ dwCreationFlags, + LPVOID_ lpEnvironment, + LPCWSTR_ lpCurrentDirectory, + LPSTARTUPINFOW_ lpStartupInfo, + LPPROCESS_INFORMATION_ lpProcessInformation) +{ + return ::CreateProcessW( + lpApplicationName, + lpCommandLine, + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpProcessAttributes), + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpThreadAttributes), + bInheritHandles, + dwCreationFlags, + lpEnvironment, + lpCurrentDirectory, + reinterpret_cast< ::_STARTUPINFOW* >(lpStartupInfo), + reinterpret_cast< ::_PROCESS_INFORMATION* >(lpProcessInformation)); +} + +} +} +} + +#endif // BOOST_PLAT_WINDOWS_DESKTOP + +#endif // BOOST_DETAIL_WINAPI_PROCESS_HPP_ diff --git a/contrib/src/boost/detail/winapi/thread.hpp b/contrib/src/boost/detail/winapi/thread.hpp new file mode 100644 index 0000000..6162708 --- /dev/null +++ b/contrib/src/boost/detail/winapi/thread.hpp @@ -0,0 +1,42 @@ +// thread.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_THREAD_HPP +#define BOOST_DETAIL_WINAPI_THREAD_HPP + +#include <boost/detail/winapi/basic_types.hpp> +#include <boost/detail/winapi/get_current_thread.hpp> +#include <boost/detail/winapi/get_current_thread_id.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined( BOOST_USE_WINDOWS_H ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI +SleepEx( + boost::detail::winapi::DWORD_ dwMilliseconds, + boost::detail::winapi::BOOL_ bAlertable); +BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI Sleep(boost::detail::winapi::DWORD_ dwMilliseconds); +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI SwitchToThread(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::SleepEx; +using ::Sleep; +using ::SwitchToThread; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_THREAD_HPP diff --git a/contrib/src/boost/detail/winapi/timers.hpp b/contrib/src/boost/detail/winapi/timers.hpp index e129dd9..c3bf826 100644 --- a/contrib/src/boost/detail/winapi/timers.hpp +++ b/contrib/src/boost/detail/winapi/timers.hpp @@ -1,48 +1,48 @@ -// timers.hpp --------------------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-// Copyright 2015 Andrey Semashev
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#ifndef BOOST_DETAIL_WINAPI_TIMERS_HPP
-#define BOOST_DETAIL_WINAPI_TIMERS_HPP
-
-#include <boost/detail/winapi/basic_types.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-#if !defined( BOOST_USE_WINDOWS_H )
-extern "C" {
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-QueryPerformanceCounter(::_LARGE_INTEGER* lpPerformanceCount);
-
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-QueryPerformanceFrequency(::_LARGE_INTEGER* lpFrequency);
-}
-#endif
-
-
-namespace boost {
-namespace detail {
-namespace winapi {
-
-BOOST_FORCEINLINE BOOL_ QueryPerformanceCounter(LARGE_INTEGER_* lpPerformanceCount)
-{
- return ::QueryPerformanceCounter(reinterpret_cast< ::_LARGE_INTEGER* >(lpPerformanceCount));
-}
-
-BOOST_FORCEINLINE BOOL_ QueryPerformanceFrequency(LARGE_INTEGER_* lpFrequency)
-{
- return ::QueryPerformanceFrequency(reinterpret_cast< ::_LARGE_INTEGER* >(lpFrequency));
-}
-
-}
-}
-}
-
-#endif // BOOST_DETAIL_WINAPI_TIMERS_HPP
+// timers.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_TIMERS_HPP +#define BOOST_DETAIL_WINAPI_TIMERS_HPP + +#include <boost/detail/winapi/basic_types.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined( BOOST_USE_WINDOWS_H ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +QueryPerformanceCounter(::_LARGE_INTEGER* lpPerformanceCount); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +QueryPerformanceFrequency(::_LARGE_INTEGER* lpFrequency); +} +#endif + + +namespace boost { +namespace detail { +namespace winapi { + +BOOST_FORCEINLINE BOOL_ QueryPerformanceCounter(LARGE_INTEGER_* lpPerformanceCount) +{ + return ::QueryPerformanceCounter(reinterpret_cast< ::_LARGE_INTEGER* >(lpPerformanceCount)); +} + +BOOST_FORCEINLINE BOOL_ QueryPerformanceFrequency(LARGE_INTEGER_* lpFrequency) +{ + return ::QueryPerformanceFrequency(reinterpret_cast< ::_LARGE_INTEGER* >(lpFrequency)); +} + +} +} +} + +#endif // BOOST_DETAIL_WINAPI_TIMERS_HPP |