update boost on linux

This commit is contained in:
Bassem Girgis
2019-08-10 16:06:25 -05:00
parent 76ad52be58
commit 861b918727
5363 changed files with 483306 additions and 116507 deletions

View File

@@ -11,7 +11,7 @@
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
#include <boost/detail/workaround.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/detail/select_type.hpp>
#include <boost/type_traits/is_same.hpp>
#include <cstddef>
#include <memory>
@@ -44,7 +44,7 @@ public:
typedef Type value_type;
partial_std_allocator_wrapper(){};
partial_std_allocator_wrapper(){}
template<typename Other>
partial_std_allocator_wrapper(const partial_std_allocator_wrapper<Other>&){}
@@ -52,7 +52,7 @@ public:
partial_std_allocator_wrapper(const std::allocator<Type>& x):
std::allocator<Type>(x)
{
};
}
#if defined(BOOST_DINKUMWARE_STDLIB)
/* Dinkumware guys didn't provide a means to call allocate() without
@@ -121,8 +121,13 @@ struct rebinder
template<typename Type>
struct result
{
typedef typename Allocator::BOOST_NESTED_TEMPLATE
#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename Allocator::BOOST_NESTED_TEMPLATE
rebind<Type>::other other;
#else
typedef typename std::allocator_traits<Allocator>::BOOST_NESTED_TEMPLATE
rebind_alloc<Type> other;
#endif
};
};
@@ -137,11 +142,12 @@ struct compliant_allocator_rebind_to
template<typename Allocator,typename Type>
struct rebind_to:
mpl::eval_if_c<
is_partial_std_allocator<Allocator>::value,
boost::detail::if_true<
is_partial_std_allocator<Allocator>::value
>::template then<
partial_std_allocator_rebind_to<Allocator,Type>,
compliant_allocator_rebind_to<Allocator,Type>
>
>::type
{
};
@@ -159,7 +165,7 @@ void construct(void* p,const Type& t)
*/
#pragma warning(push)
#pragma warning(disable:4100)
#pragma warning(disable:4100)
#endif
template<typename Type>

View File

@@ -1,19 +0,0 @@
// Copyright (C) 2013 Vicente J. Botet Escriba
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#if defined(BOOST_INTEL)
#pragma pop_macro("atomic_compare_exchange")
#pragma pop_macro("atomic_compare_exchange_explicit")
#pragma pop_macro("atomic_exchange")
#pragma pop_macro("atomic_exchange_explicit")
#pragma pop_macro("atomic_is_lock_free")
#pragma pop_macro("atomic_load")
#pragma pop_macro("atomic_load_explicit")
#pragma pop_macro("atomic_store")
#pragma pop_macro("atomic_store_explicit")
#endif // #if defined(BOOST_INTEL)

View File

@@ -1,39 +0,0 @@
// Copyright (C) 2013 Vicente J. Botet Escriba
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#if defined(BOOST_INTEL)
#pragma push_macro("atomic_compare_exchange")
#undef atomic_compare_exchange
#pragma push_macro("atomic_compare_exchange_explicit")
#undef atomic_compare_exchange_explicit
#pragma push_macro("atomic_exchange")
#undef atomic_exchange
#pragma push_macro("atomic_exchange_explicit")
#undef atomic_exchange_explicit
#pragma push_macro("atomic_is_lock_free")
#undef atomic_is_lock_free
#pragma push_macro("atomic_load")
#undef atomic_load
#pragma push_macro("atomic_load_explicit")
#undef atomic_load_explicit
#pragma push_macro("atomic_store")
#undef atomic_store
#pragma push_macro("atomic_store_explicit")
#undef atomic_store_explicit
#endif // #if defined(BOOST_INTEL)

View File

@@ -39,7 +39,7 @@ protected:
typedef typename base_type::off_type off_type;
public:
basic_pointerbuf() : base_type() { setbuf(0, 0); }
basic_pointerbuf() : base_type() { this_type::setbuf(0, 0); }
const charT* getnext() { return this->gptr(); }
#ifndef BOOST_NO_USING_TEMPLATE

View File

@@ -6,42 +6,53 @@
// http://www.boost.org/LICENSE_1_0.txt
// Usage: enum foo { a=1, b=2, c=4 };
// BOOST_BITMASK( foo );
// BOOST_BITMASK( foo )
//
// void f( foo arg );
// ...
// f( a | c );
//
// See [bitmask.types] in the C++ standard for the formal specification
#ifndef BOOST_BITMASK_HPP
#define BOOST_BITMASK_HPP
#include <boost/config.hpp>
#include <boost/cstdint.hpp>
#define BOOST_BITMASK(Bitmask) \
\
inline Bitmask operator| (Bitmask x , Bitmask y ) \
inline BOOST_CONSTEXPR Bitmask operator| (Bitmask x , Bitmask y ) \
{ return static_cast<Bitmask>( static_cast<boost::int_least32_t>(x) \
| static_cast<boost::int_least32_t>(y)); } \
\
inline Bitmask operator& (Bitmask x , Bitmask y ) \
inline BOOST_CONSTEXPR Bitmask operator& (Bitmask x , Bitmask y ) \
{ return static_cast<Bitmask>( static_cast<boost::int_least32_t>(x) \
& static_cast<boost::int_least32_t>(y)); } \
\
inline Bitmask operator^ (Bitmask x , Bitmask y ) \
inline BOOST_CONSTEXPR Bitmask operator^ (Bitmask x , Bitmask y ) \
{ return static_cast<Bitmask>( static_cast<boost::int_least32_t>(x) \
^ static_cast<boost::int_least32_t>(y)); } \
\
inline Bitmask operator~ (Bitmask x ) \
inline BOOST_CONSTEXPR Bitmask operator~ (Bitmask x ) \
{ return static_cast<Bitmask>(~static_cast<boost::int_least32_t>(x)); } \
\
inline Bitmask & operator&=(Bitmask & x , Bitmask y) \
inline Bitmask & operator&=(Bitmask& x , Bitmask y) \
{ x = x & y ; return x ; } \
\
inline Bitmask & operator|=(Bitmask & x , Bitmask y) \
inline Bitmask & operator|=(Bitmask& x , Bitmask y) \
{ x = x | y ; return x ; } \
\
inline Bitmask & operator^=(Bitmask & x , Bitmask y) \
{ x = x ^ y ; return x ; }
inline Bitmask & operator^=(Bitmask& x , Bitmask y) \
{ x = x ^ y ; return x ; } \
\
/* Boost extensions to [bitmask.types] */ \
\
inline BOOST_CONSTEXPR bool operator!(Bitmask x) \
{ return !static_cast<int>(x); } \
\
inline BOOST_CONSTEXPR bool bitmask_set(Bitmask x) \
{ return !!x; }
#endif // BOOST_BITMASK_HPP

View File

@@ -24,6 +24,7 @@
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/is_empty.hpp>
#include <boost/type_traits/is_final.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/call_traits.hpp>
@@ -42,6 +43,14 @@ class compressed_pair;
namespace details
{
template<class T, bool E = boost::is_final<T>::value>
struct compressed_pair_empty
: ::boost::false_type { };
template<class T>
struct compressed_pair_empty<T, false>
: ::boost::is_empty<T> { };
// JM altered 26 Jan 2000:
template <class T1, class T2, bool IsSame, bool FirstEmpty, bool SecondEmpty>
struct compressed_pair_switch;
@@ -343,8 +352,8 @@ class compressed_pair
T1,
T2,
::boost::is_same<typename remove_cv<T1>::type, typename remove_cv<T2>::type>::value,
::boost::is_empty<T1>::value,
::boost::is_empty<T2>::value>::value>
::boost::details::compressed_pair_empty<T1>::value,
::boost::details::compressed_pair_empty<T2>::value>::value>
{
private:
typedef details::compressed_pair_imp<T1, T2,
@@ -352,8 +361,8 @@ private:
T1,
T2,
::boost::is_same<typename remove_cv<T1>::type, typename remove_cv<T2>::type>::value,
::boost::is_empty<T1>::value,
::boost::is_empty<T2>::value>::value> base;
::boost::details::compressed_pair_empty<T1>::value,
::boost::details::compressed_pair_empty<T2>::value>::value> base;
public:
typedef T1 first_type;
typedef T2 second_type;
@@ -388,8 +397,8 @@ class compressed_pair<T, T>
T,
T,
::boost::is_same<typename remove_cv<T>::type, typename remove_cv<T>::type>::value,
::boost::is_empty<T>::value,
::boost::is_empty<T>::value>::value>
::boost::details::compressed_pair_empty<T>::value,
::boost::details::compressed_pair_empty<T>::value>::value>
{
private:
typedef details::compressed_pair_imp<T, T,
@@ -397,8 +406,8 @@ private:
T,
T,
::boost::is_same<typename remove_cv<T>::type, typename remove_cv<T>::type>::value,
::boost::is_empty<T>::value,
::boost::is_empty<T>::value>::value> base;
::boost::details::compressed_pair_empty<T>::value,
::boost::details::compressed_pair_empty<T>::value>::value> base;
public:
typedef T first_type;
typedef T second_type;

View File

@@ -1,241 +0,0 @@
// -----------------------------------------------------------
//
// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
// Copyright (c) 2003-2006, 2008 Gennaro Prota
//
// Copyright (c) 2014 Glen Joseph Fernandes
// glenfe at live dot com
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// -----------------------------------------------------------
#ifndef BOOST_DETAIL_DYNAMIC_BITSET_HPP
#define BOOST_DETAIL_DYNAMIC_BITSET_HPP
#include <memory>
#include <cstddef>
#include "boost/config.hpp"
#include "boost/detail/workaround.hpp"
namespace boost {
namespace detail {
namespace dynamic_bitset_impl {
// Gives (read-)access to the object representation
// of an object of type T (3.9p4). CANNOT be used
// on a base sub-object
//
template <typename T>
inline const unsigned char * object_representation (T* p)
{
return static_cast<const unsigned char *>(static_cast<const void *>(p));
}
template<typename T, int amount, int width /* = default */>
struct shifter
{
static void left_shift(T & v) {
amount >= width ? (v = 0)
: (v >>= BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(amount));
}
};
// ------- count function implementation --------------
typedef unsigned char byte_type;
// These two entities
//
// enum mode { access_by_bytes, access_by_blocks };
// template <mode> struct mode_to_type {};
//
// were removed, since the regression logs (as of 24 Aug 2008)
// showed that several compilers had troubles with recognizing
//
// const mode m = access_by_bytes
//
// as a constant expression
//
// * So, we'll use bool, instead of enum *.
//
template <bool value>
struct value_to_type
{
value_to_type() {}
};
const bool access_by_bytes = true;
const bool access_by_blocks = false;
// the table: wrapped in a class template, so
// that it is only instantiated if/when needed
//
template <bool dummy_name = true>
struct count_table { static const byte_type table[]; };
template <>
struct count_table<false> { /* no table */ };
const unsigned int table_width = 8;
template <bool b>
const byte_type count_table<b>::table[] =
{
// Automatically generated by GPTableGen.exe v.1.0
//
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
};
// overload for access by bytes
//
template <typename Iterator>
inline std::size_t do_count(Iterator first, std::size_t length,
int /*dummy param*/,
value_to_type<access_by_bytes>* )
{
std::size_t num = 0;
if (length)
{
const byte_type * p = object_representation(&*first);
length *= sizeof(*first);
do {
num += count_table<>::table[*p];
++p;
--length;
} while (length);
}
return num;
}
// overload for access by blocks
//
template <typename Iterator, typename ValueType>
inline std::size_t do_count(Iterator first, std::size_t length, ValueType,
value_to_type<access_by_blocks>*)
{
std::size_t num = 0;
while (length){
ValueType value = *first;
while (value) {
num += count_table<>::table[value & ((1u<<table_width) - 1)];
value >>= table_width;
}
++first;
--length;
}
return num;
}
// -------------------------------------------------------
// Some library implementations simply return a dummy
// value such as
//
// size_type(-1) / sizeof(T)
//
// from vector<>::max_size. This tries to get more
// meaningful info.
//
template <typename T>
inline typename T::size_type vector_max_size_workaround(const T & v)
BOOST_NOEXCEPT
{
typedef typename T::allocator_type allocator_type;
const allocator_type& alloc = v.get_allocator();
#if !defined(BOOST_NO_CXX11_ALLOCATOR)
typedef std::allocator_traits<allocator_type> allocator_traits;
const typename allocator_traits::size_type alloc_max =
allocator_traits::max_size(alloc);
#else
const typename allocator_type::size_type alloc_max = alloc.max_size();
#endif
const typename T::size_type container_max = v.max_size();
return alloc_max < container_max ? alloc_max : container_max;
}
// for static_asserts
template <typename T>
struct allowed_block_type {
enum { value = T(-1) > 0 }; // ensure T has no sign
};
template <>
struct allowed_block_type<bool> {
enum { value = false };
};
template <typename T>
struct is_numeric {
enum { value = false };
};
# define BOOST_dynamic_bitset_is_numeric(x) \
template<> \
struct is_numeric< x > { \
enum { value = true }; \
} /**/
BOOST_dynamic_bitset_is_numeric(bool);
BOOST_dynamic_bitset_is_numeric(char);
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
BOOST_dynamic_bitset_is_numeric(wchar_t);
#endif
BOOST_dynamic_bitset_is_numeric(signed char);
BOOST_dynamic_bitset_is_numeric(short int);
BOOST_dynamic_bitset_is_numeric(int);
BOOST_dynamic_bitset_is_numeric(long int);
BOOST_dynamic_bitset_is_numeric(unsigned char);
BOOST_dynamic_bitset_is_numeric(unsigned short);
BOOST_dynamic_bitset_is_numeric(unsigned int);
BOOST_dynamic_bitset_is_numeric(unsigned long);
#if defined(BOOST_HAS_LONG_LONG)
BOOST_dynamic_bitset_is_numeric(::boost::long_long_type);
BOOST_dynamic_bitset_is_numeric(::boost::ulong_long_type);
#endif
// intentionally omitted
//BOOST_dynamic_bitset_is_numeric(float);
//BOOST_dynamic_bitset_is_numeric(double);
//BOOST_dynamic_bitset_is_numeric(long double);
#undef BOOST_dynamic_bitset_is_numeric
} // dynamic_bitset_impl
} // namespace detail
} // namespace boost
#endif // include guard

View File

@@ -4,6 +4,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef INDIRECT_TRAITS_DWA2002131_HPP
# define INDIRECT_TRAITS_DWA2002131_HPP
# include <boost/type_traits/integral_constant.hpp>
# include <boost/type_traits/is_function.hpp>
# include <boost/type_traits/is_reference.hpp>
# include <boost/type_traits/is_pointer.hpp>
@@ -17,13 +18,7 @@
# include <boost/type_traits/remove_pointer.hpp>
# include <boost/detail/workaround.hpp>
# include <boost/mpl/eval_if.hpp>
# include <boost/mpl/if.hpp>
# include <boost/mpl/bool.hpp>
# include <boost/mpl/and.hpp>
# include <boost/mpl/not.hpp>
# include <boost/mpl/aux_/lambda_support.hpp>
# include <boost/detail/select_type.hpp>
namespace boost { namespace detail {
@@ -31,24 +26,24 @@ namespace boost { namespace detail {
namespace indirect_traits {
template <class T>
struct is_reference_to_const : mpl::false_
struct is_reference_to_const : boost::false_type
{
};
template <class T>
struct is_reference_to_const<T const&> : mpl::true_
struct is_reference_to_const<T const&> : boost::true_type
{
};
# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
template<class T>
struct is_reference_to_const<T const volatile&> : mpl::true_
struct is_reference_to_const<T const volatile&> : boost::true_type
{
};
# endif
# endif
template <class T>
struct is_reference_to_function : mpl::false_
struct is_reference_to_function : boost::false_type
{
};
@@ -58,7 +53,7 @@ struct is_reference_to_function<T&> : is_function<T>
};
template <class T>
struct is_pointer_to_function : mpl::false_
struct is_pointer_to_function : boost::false_type
{
};
@@ -70,7 +65,7 @@ struct is_pointer_to_function<T*> : is_function<T>
};
template <class T>
struct is_reference_to_member_function_pointer_impl : mpl::false_
struct is_reference_to_member_function_pointer_impl : boost::false_type
{
};
@@ -85,18 +80,17 @@ template <class T>
struct is_reference_to_member_function_pointer
: is_reference_to_member_function_pointer_impl<T>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T))
};
template <class T>
struct is_reference_to_function_pointer_aux
: mpl::and_<
is_reference<T>
, is_pointer_to_function<
: boost::integral_constant<bool,
is_reference<T>::value &&
is_pointer_to_function<
typename remove_cv<
typename remove_reference<T>::type
>::type
>
>::value
>
{
// There's no such thing as a pointer-to-cv-function, so we don't need specializations for those
@@ -104,94 +98,91 @@ struct is_reference_to_function_pointer_aux
template <class T>
struct is_reference_to_function_pointer
: mpl::if_<
is_reference_to_function<T>
, mpl::false_
: boost::detail::if_true<
is_reference_to_function<T>::value
>::template then<
boost::false_type
, is_reference_to_function_pointer_aux<T>
>::type
>::type
{
};
template <class T>
struct is_reference_to_non_const
: mpl::and_<
is_reference<T>
, mpl::not_<
is_reference_to_const<T>
>
: boost::integral_constant<bool,
is_reference<T>::value &&
!is_reference_to_const<T>::value
>
{
};
template <class T>
struct is_reference_to_volatile : mpl::false_
struct is_reference_to_volatile : boost::false_type
{
};
template <class T>
struct is_reference_to_volatile<T volatile&> : mpl::true_
struct is_reference_to_volatile<T volatile&> : boost::true_type
{
};
# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
template <class T>
struct is_reference_to_volatile<T const volatile&> : mpl::true_
struct is_reference_to_volatile<T const volatile&> : boost::true_type
{
};
# endif
# endif
template <class T>
struct is_reference_to_pointer : mpl::false_
struct is_reference_to_pointer : boost::false_type
{
};
template <class T>
struct is_reference_to_pointer<T*&> : mpl::true_
struct is_reference_to_pointer<T*&> : boost::true_type
{
};
template <class T>
struct is_reference_to_pointer<T* const&> : mpl::true_
struct is_reference_to_pointer<T* const&> : boost::true_type
{
};
template <class T>
struct is_reference_to_pointer<T* volatile&> : mpl::true_
struct is_reference_to_pointer<T* volatile&> : boost::true_type
{
};
template <class T>
struct is_reference_to_pointer<T* const volatile&> : mpl::true_
struct is_reference_to_pointer<T* const volatile&> : boost::true_type
{
};
template <class T>
struct is_reference_to_class
: mpl::and_<
is_reference<T>
, is_class<
: boost::integral_constant<bool,
is_reference<T>::value &&
is_class<
typename remove_cv<
typename remove_reference<T>::type
>::type
>
>::value
>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T))
};
template <class T>
struct is_pointer_to_class
: mpl::and_<
is_pointer<T>
, is_class<
: boost::integral_constant<bool,
is_pointer<T>::value &&
is_class<
typename remove_cv<
typename remove_pointer<T>::type
>::type
>
>::value
>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_class,(T))
};

View File

@@ -5,6 +5,7 @@
// boost/detail/interlocked.hpp
//
// Copyright 2005 Peter Dimov
// Copyright 2018 Andrey Semashev
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -13,11 +14,40 @@
#include <boost/config.hpp>
// MS compatible compilers support #pragma once
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
// BOOST_INTERLOCKED_HAS_INTRIN_H
// VC9 has intrin.h, but it collides with <utility>
#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
# define BOOST_INTERLOCKED_HAS_INTRIN_H
// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets.
#elif defined( __MINGW64_VERSION_MAJOR )
// MinGW-w64 provides intrin.h for both 32 and 64-bit targets.
# define BOOST_INTERLOCKED_HAS_INTRIN_H
#elif defined( __CYGWIN__ ) && defined( __LP64__ )
// We have to use intrin.h on Cygwin 64
# define BOOST_INTERLOCKED_HAS_INTRIN_H
// Intel C++ on Windows on VC10+ stdlib
#elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
# define BOOST_INTERLOCKED_HAS_INTRIN_H
// clang-cl on Windows on VC10+ stdlib
#elif defined( __clang__ ) && defined( _MSC_VER ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
# define BOOST_INTERLOCKED_HAS_INTRIN_H
#endif
#if defined( BOOST_USE_WINDOWS_H )
# include <windows.h>
@@ -30,7 +60,7 @@
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER InterlockedCompareExchangePointer
# define BOOST_INTERLOCKED_EXCHANGE_POINTER InterlockedExchangePointer
#elif defined( BOOST_USE_INTRIN_H )
#elif defined( BOOST_USE_INTRIN_H ) || defined( BOOST_INTERLOCKED_HAS_INTRIN_H )
#include <intrin.h>
@@ -70,14 +100,15 @@ extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
#else
#else // _WIN32_WCE >= 0x600
// under Windows CE we still have old-style Interlocked* functions
extern "C" long __cdecl InterlockedIncrement( long* );
extern "C" long __cdecl InterlockedDecrement( long* );
extern "C" long __cdecl InterlockedCompareExchange( long*, long, long );
extern "C" long __cdecl InterlockedExchange( long*, long );
extern "C" long __cdecl InterlockedExchangeAdd( long*, long );
extern "C" long __cdecl InterlockedIncrement( long * );
extern "C" long __cdecl InterlockedDecrement( long * );
extern "C" long __cdecl InterlockedCompareExchange( long *, long, long );
extern "C" long __cdecl InterlockedExchange( long *, long );
extern "C" long __cdecl InterlockedExchangeAdd( long *, long );
# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement
# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement
@@ -85,7 +116,7 @@ extern "C" long __cdecl InterlockedExchangeAdd( long*, long );
# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange
# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
#endif
#endif // _WIN32_WCE >= 0x600
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest),(long)(exchange),(long)(compare)))
@@ -94,12 +125,6 @@ extern "C" long __cdecl InterlockedExchangeAdd( long*, long );
#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1400
#include <intrin.h>
#else
# if defined( __CLRCALL_PURE_OR_CDECL )
# define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __CLRCALL_PURE_OR_CDECL
# else
@@ -122,8 +147,6 @@ extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd(
# pragma intrinsic( _InterlockedExchangeAdd )
# endif
#endif
# if defined(_M_IA64) || defined(_M_AMD64)
extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* );
@@ -147,27 +170,6 @@ extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* );
# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets.
#elif defined(__MINGW64_VERSION_MAJOR)
// MinGW-w64 provides intrin.h for both 32 and 64-bit targets.
#include <intrin.h>
# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement
# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
# if defined(__x86_64__) || defined(__x86_64)
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer
# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer
# else
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
# endif
#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
#define BOOST_INTERLOCKED_IMPORT __declspec(dllimport)

View File

@@ -6,8 +6,6 @@
# include <boost/type_traits/integral_constant.hpp>
# include <boost/type_traits/remove_cv.hpp>
# include <boost/mpl/aux_/lambda_support.hpp>
# include <boost/mpl/bool.hpp>
# include <boost/detail/workaround.hpp>
namespace boost { namespace detail {
@@ -106,14 +104,12 @@ template<typename T>
struct is_incrementable :
public boost::integral_constant<bool, boost::detail::is_incrementable_::impl<T>::value>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_incrementable,(T))
};
template<typename T>
struct is_postfix_incrementable :
public boost::integral_constant<bool, boost::detail::is_incrementable_::postfix_impl<T>::value>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_postfix_incrementable,(T))
};
} // namespace detail

View File

@@ -5,13 +5,13 @@
# define BOOST_DETAIL_IS_XXX_DWA20051011_HPP
# include <boost/config.hpp>
# include <boost/mpl/bool.hpp>
# include <boost/type_traits/integral_constant.hpp>
# include <boost/preprocessor/enum_params.hpp>
# define BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs) \
template <class T> \
struct is_##name : mpl::false_ \
struct is_##name : boost::false_type \
{ \
}; \
\
@@ -19,7 +19,7 @@ template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class T) > \
struct is_##name< \
qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, T) > \
> \
: mpl::true_ \
: boost::true_type \
{ \
};

View File

@@ -17,7 +17,7 @@
#ifndef BOOST_NO_IS_ABSTRACT
// Fix for SF:1358600 - lexical_cast & pure virtual functions & VC 8 STL
#include <boost/mpl/if.hpp>
#include <boost/type_traits/conditional.hpp>
#include <boost/type_traits/is_abstract.hpp>
#endif
@@ -47,8 +47,8 @@ struct lcast_precision
#ifdef BOOST_NO_IS_ABSTRACT
typedef std::numeric_limits<T> limits; // No fix for SF:1358600.
#else
typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
boost::is_abstract<T>
typedef BOOST_DEDUCED_TYPENAME boost::conditional<
boost::is_abstract<T>::value
, std::numeric_limits<lcast_abstract_stub>
, std::numeric_limits<T>
>::type limits;
@@ -105,8 +105,8 @@ inline std::streamsize lcast_get_precision(T* = 0)
#ifdef BOOST_NO_IS_ABSTRACT
typedef std::numeric_limits<T> limits; // No fix for SF:1358600.
#else
typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
boost::is_abstract<T>
typedef BOOST_DEDUCED_TYPENAME boost::conditional<
boost::is_abstract<T>::value
, std::numeric_limits<lcast_abstract_stub>
, std::numeric_limits<T>
>::type limits;

View File

@@ -10,30 +10,59 @@
// boost/detail/lightweight_thread.hpp
//
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
// Copyright (c) 2008 Peter Dimov
// Copyright (c) 2008, 2018 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
//
// typedef /*...*/ lw_thread_t; // as pthread_t
// template<class F> int lw_thread_create( lw_thread_t & th, F f );
// void lw_thread_join( lw_thread_t th );
#include <boost/config.hpp>
#include <memory>
#include <cerrno>
// pthread_create, pthread_join
#if defined( BOOST_HAS_PTHREADS )
#include <pthread.h>
#else
namespace boost
{
namespace detail
{
typedef ::pthread_t lw_thread_t;
inline int lw_thread_create_( lw_thread_t* thread, const pthread_attr_t* attr, void* (*start_routine)( void* ), void* arg )
{
return ::pthread_create( thread, attr, start_routine, arg );
}
inline void lw_thread_join( lw_thread_t th )
{
::pthread_join( th, 0 );
}
} // namespace detail
} // namespace boost
#else // defined( BOOST_HAS_PTHREADS )
#include <windows.h>
#include <process.h>
typedef HANDLE pthread_t;
namespace boost
{
namespace detail
{
int pthread_create( pthread_t * thread, void const *, unsigned (__stdcall * start_routine) (void*), void* arg )
typedef HANDLE lw_thread_t;
inline int lw_thread_create_( lw_thread_t * thread, void const *, unsigned (__stdcall * start_routine) (void*), void* arg )
{
HANDLE h = (HANDLE)_beginthreadex( 0, 0, start_routine, arg, 0, 0 );
@@ -48,20 +77,20 @@ int pthread_create( pthread_t * thread, void const *, unsigned (__stdcall * star
}
}
int pthread_join( pthread_t thread, void ** /*value_ptr*/ )
inline void lw_thread_join( lw_thread_t thread )
{
::WaitForSingleObject( thread, INFINITE );
::CloseHandle( thread );
return 0;
}
#endif
} // namespace detail
} // namespace boost
#endif // defined( BOOST_HAS_PTHREADS )
// template<class F> int lw_thread_create( pthread_t & pt, F f );
namespace boost
{
namespace detail
{
@@ -77,8 +106,16 @@ public:
extern "C" void * lw_thread_routine( void * pv )
{
#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<lw_abstract_thread> pt( static_cast<lw_abstract_thread *>( pv ) );
#else
std::unique_ptr<lw_abstract_thread> pt( static_cast<lw_abstract_thread *>( pv ) );
#endif
pt->run();
return 0;
@@ -88,8 +125,16 @@ extern "C" void * lw_thread_routine( void * pv )
unsigned __stdcall lw_thread_routine( void * pv )
{
#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<lw_abstract_thread> pt( static_cast<lw_abstract_thread *>( pv ) );
#else
std::unique_ptr<lw_abstract_thread> pt( static_cast<lw_abstract_thread *>( pv ) );
#endif
pt->run();
return 0;
@@ -115,11 +160,19 @@ private:
F f_;
};
template<class F> int lw_thread_create( pthread_t & pt, F f )
template<class F> int lw_thread_create( lw_thread_t & th, F f )
{
#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<lw_abstract_thread> p( new lw_thread_impl<F>( f ) );
int r = pthread_create( &pt, 0, lw_thread_routine, p.get() );
#else
std::unique_ptr<lw_abstract_thread> p( new lw_thread_impl<F>( f ) );
#endif
int r = lw_thread_create_( &th, 0, lw_thread_routine, p.get() );
if( r == 0 )
{

View File

@@ -56,65 +56,39 @@
// 21 Jan 2001 - Created (David Abrahams)
#ifndef BOOST_NUMERIC_TRAITS_HPP_DWA20001901
# define BOOST_NUMERIC_TRAITS_HPP_DWA20001901
#define BOOST_NUMERIC_TRAITS_HPP_DWA20001901
# include <boost/config.hpp>
# include <boost/cstdint.hpp>
# include <boost/static_assert.hpp>
# include <boost/type_traits.hpp>
# include <boost/detail/select_type.hpp>
# include <boost/limits.hpp>
#include <cstddef>
#include <boost/config.hpp>
#include <boost/limits.hpp>
#include <boost/cstdint.hpp>
#include <boost/type_traits/is_signed.hpp>
#include <boost/type_traits/conditional.hpp>
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_integral.hpp>
#endif
namespace boost { namespace detail {
// Template class is_signed -- determine whether a numeric type is signed
// Requires that T is constructable from the literals -1 and 0. Compile-time
// error results if that requirement is not met (and thus signedness is not
// likely to have meaning for that type).
template <class Number>
struct is_signed
{
#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
BOOST_STATIC_CONSTANT(bool, value = (Number(-1) < Number(0)));
#else
BOOST_STATIC_CONSTANT(bool, value = std::numeric_limits<Number>::is_signed);
#endif
};
# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
// digit_traits - compute the number of digits in a built-in integer
// type. Needed for implementations on which numeric_limits is not specialized
// for intmax_t (e.g. VC6).
template <bool is_specialized> struct digit_traits_select;
// numeric_limits is specialized; just select that version of digits
template <> struct digit_traits_select<true>
// for some integer types, like __int128 in libstdc++ (gcc).
template <class T, bool IsSpecialized = std::numeric_limits<T>::is_specialized>
struct digit_traits
{
template <class T> struct traits
{
BOOST_STATIC_CONSTANT(int, digits = std::numeric_limits<T>::digits);
};
BOOST_STATIC_CONSTANT(int, digits = std::numeric_limits<T>::digits);
};
// numeric_limits is not specialized; compute digits from sizeof(T)
template <> struct digit_traits_select<false>
template <class T>
struct digit_traits<T, false>
{
template <class T> struct traits
{
BOOST_STATIC_CONSTANT(int, digits = (
sizeof(T) * std::numeric_limits<unsigned char>::digits
- (is_signed<T>::value ? 1 : 0))
);
};
};
// here's the "usable" template
template <class T> struct digit_traits
{
typedef digit_traits_select<
::std::numeric_limits<T>::is_specialized> selector;
typedef typename selector::template traits<T> traits;
BOOST_STATIC_CONSTANT(int, digits = traits::digits);
BOOST_STATIC_CONSTANT(int, digits = (
sizeof(T) * std::numeric_limits<unsigned char>::digits
- (boost::is_signed<T>::value ? 1 : 0))
);
};
#endif
@@ -124,44 +98,48 @@ namespace boost { namespace detail {
template <class Integer>
struct integer_traits
{
# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
private:
typedef Integer integer_type;
typedef std::numeric_limits<integer_type> x;
public:
typedef typename
if_true<(int(x::is_signed)
&& (!int(x::is_bounded)
// digits is the number of no-sign bits
|| (int(x::digits) + 1 >= digit_traits<boost::intmax_t>::digits)))>::template then<
typedef typename boost::conditional<
(int(x::is_signed)
&& (!int(x::is_bounded)
// digits is the number of no-sign bits
|| (int(x::digits) + 1 >= digit_traits<boost::intmax_t>::digits))),
Integer,
typename if_true<(int(x::digits) + 1 < digit_traits<signed int>::digits)>::template then<
signed int,
typename if_true<(int(x::digits) + 1 < digit_traits<signed long>::digits)>::template then<
signed long,
typename boost::conditional<
(int(x::digits) + 1 < digit_traits<signed int>::digits),
signed int,
// else
intmax_t
>::type>::type>::type difference_type;
typename boost::conditional<
(int(x::digits) + 1 < digit_traits<signed long>::digits),
signed long,
boost::intmax_t
>::type
>::type
>::type difference_type;
#else
BOOST_STATIC_ASSERT(boost::is_integral<Integer>::value);
typedef typename
if_true<(sizeof(Integer) >= sizeof(intmax_t))>::template then<
typename if_true<(is_signed<Integer>::value)>::template then<
Integer,
intmax_t
>::type,
typedef typename boost::conditional<
(sizeof(Integer) >= sizeof(intmax_t)),
typename if_true<(sizeof(Integer) < sizeof(std::ptrdiff_t))>::template then<
boost::conditional<
(boost::is_signed<Integer>::value),
Integer,
boost::intmax_t
>,
boost::conditional<
(sizeof(Integer) < sizeof(std::ptrdiff_t)),
std::ptrdiff_t,
intmax_t
>::type
>::type difference_type;
# endif
boost::intmax_t
>
>::type::type difference_type;
#endif
};
// Right now, only supports integers, but should be expanded.
@@ -172,7 +150,7 @@ namespace boost { namespace detail {
};
template <class Number>
typename numeric_traits<Number>::difference_type numeric_distance(Number x, Number y)
inline BOOST_CONSTEXPR typename numeric_traits<Number>::difference_type numeric_distance(Number x, Number y)
{
typedef typename numeric_traits<Number>::difference_type difference_type;
return difference_type(y) - difference_type(x);

View File

@@ -15,15 +15,15 @@
#include "boost/config.hpp"
# include "boost/mpl/bool.hpp"
# include "boost/type_traits/integral_constant.hpp"
# include "boost/type_traits/has_nothrow_copy.hpp"
#include "boost/mpl/void.hpp"
namespace boost {
namespace detail {
struct void_type {};
///////////////////////////////////////////////////////////////////////////////
// (detail) class template reference_content
//
@@ -71,7 +71,7 @@ public: // queries
// Wraps with reference_content if specified type is reference.
//
template <typename T = mpl::void_> struct make_reference_content;
template <typename T = void_type> struct make_reference_content;
template <typename T>
@@ -88,7 +88,7 @@ struct make_reference_content< T& >
template <>
struct make_reference_content< mpl::void_ >
struct make_reference_content< void_type >
{
template <typename T>
struct apply
@@ -96,7 +96,7 @@ struct make_reference_content< mpl::void_ >
{
};
typedef mpl::void_ type;
typedef void_type type;
};
} // namespace detail
@@ -110,7 +110,7 @@ template <typename T>
struct has_nothrow_copy<
::boost::detail::reference_content< T& >
>
: mpl::true_
: boost::true_type
{
};

View File

@@ -109,14 +109,14 @@ BOOST_UTF8_BEGIN_NAMESPACE
#define BOOST_UTF8_DECL
#endif
struct BOOST_SYMBOL_VISIBLE utf8_codecvt_facet :
struct BOOST_UTF8_DECL utf8_codecvt_facet :
public std::codecvt<wchar_t, char, std::mbstate_t>
{
public:
BOOST_UTF8_DECL explicit utf8_codecvt_facet(std::size_t no_locale_manage=0);
virtual ~utf8_codecvt_facet(){}
explicit utf8_codecvt_facet(std::size_t no_locale_manage=0);
virtual ~utf8_codecvt_facet();
protected:
BOOST_UTF8_DECL virtual std::codecvt_base::result do_in(
virtual std::codecvt_base::result do_in(
std::mbstate_t& state,
const char * from,
const char * from_end,
@@ -126,7 +126,7 @@ protected:
wchar_t*& to_next
) const;
BOOST_UTF8_DECL virtual std::codecvt_base::result do_out(
virtual std::codecvt_base::result do_out(
std::mbstate_t & state,
const wchar_t * from,
const wchar_t * from_end,
@@ -150,11 +150,11 @@ protected:
return get_octet_count(lead_octet) - 1;
}
BOOST_UTF8_DECL static unsigned int get_octet_count(unsigned char lead_octet);
static unsigned int get_octet_count(unsigned char lead_octet);
// How many "continuing octets" will be needed for this word
// == total octets - 1.
BOOST_UTF8_DECL int get_cont_octet_out_count(wchar_t word) const ;
int get_cont_octet_out_count(wchar_t word) const ;
virtual bool do_always_noconv() const BOOST_NOEXCEPT_OR_NOTHROW {
return false;
@@ -178,8 +178,8 @@ protected:
// How many char objects can I process to get <= max_limit
// wchar_t objects?
BOOST_UTF8_DECL virtual int do_length(
const std::mbstate_t &,
virtual int do_length(
std::mbstate_t &,
const char * from,
const char * from_end,
std::size_t max_limit
@@ -188,8 +188,10 @@ protected:
throw()
#endif
;
// Nonstandard override
virtual int do_length(
std::mbstate_t & s,
const std::mbstate_t & s,
const char * from,
const char * from_end,
std::size_t max_limit
@@ -199,12 +201,13 @@ protected:
#endif
{
return do_length(
const_cast<const std::mbstate_t &>(s),
const_cast<std::mbstate_t &>(s),
from,
from_end,
max_limit
);
}
// Largest possible value do_length(state,from,from_end,1) could return.
virtual int do_max_length() const BOOST_NOEXCEPT_OR_NOTHROW {
return 6; // largest UTF-8 encoding of a UCS-4 character

View File

@@ -30,14 +30,17 @@ BOOST_UTF8_BEGIN_NAMESPACE
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// implementation for wchar_t
BOOST_UTF8_DECL utf8_codecvt_facet::utf8_codecvt_facet(
utf8_codecvt_facet::utf8_codecvt_facet(
std::size_t no_locale_manage
) :
std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
{}
utf8_codecvt_facet::~utf8_codecvt_facet()
{}
// Translate incoming UTF-8 into UCS-4
BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_in(
std::codecvt_base::result utf8_codecvt_facet::do_in(
std::mbstate_t& /*state*/,
const char * from,
const char * from_end,
@@ -114,7 +117,7 @@ BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_in(
else return std::codecvt_base::partial;
}
BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_out(
std::codecvt_base::result utf8_codecvt_facet::do_out(
std::mbstate_t& /*state*/,
const wchar_t * from,
const wchar_t * from_end,
@@ -176,8 +179,8 @@ BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_out(
// How many char objects can I process to get <= max_limit
// wchar_t objects?
BOOST_UTF8_DECL int utf8_codecvt_facet::do_length(
const std::mbstate_t &,
int utf8_codecvt_facet::do_length(
std::mbstate_t &,
const char * from,
const char * from_end,
std::size_t max_limit
@@ -207,8 +210,8 @@ BOOST_UTF8_DECL int utf8_codecvt_facet::do_length(
return static_cast<int>(from_next-from);
}
BOOST_UTF8_DECL unsigned int utf8_codecvt_facet::get_octet_count(
unsigned char lead_octet
unsigned int utf8_codecvt_facet::get_octet_count(
unsigned char lead_octet
){
// if the 0-bit (MSB) is 0, then 1 character
if (lead_octet <= 0x7f) return 1;
@@ -279,7 +282,7 @@ int get_cont_octet_out_count_impl<4>(wchar_t word){
// How many "continuing octets" will be needed for this word
// == total octets - 1.
BOOST_UTF8_DECL int utf8_codecvt_facet::get_cont_octet_out_count(
int utf8_codecvt_facet::get_cont_octet_out_count(
wchar_t word
) const {
return detail::get_cont_octet_out_count_impl<sizeof(wchar_t)>(word);

View File

@@ -1,25 +0,0 @@
// GetCurrentProcess.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_GETCURRENTPROCESS_HPP
#define BOOST_DETAIL_WINAPI_GETCURRENTPROCESS_HPP
#include <boost/detail/winapi/get_current_process.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if defined(__GNUC__) && (((__GNUC__*100)+__GNUC_MINOR__) > 403)
#pragma message "This header is deprecated, use boost/detail/winapi/get_current_process.hpp instead."
#elif defined(_MSC_VER)
#pragma message("This header is deprecated, use boost/detail/winapi/get_current_process.hpp instead.")
#endif
#endif // BOOST_DETAIL_WINAPI_GETCURRENTPROCESS_HPP

View File

@@ -1,25 +0,0 @@
// GetCurrentThread.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_GETCURRENTTHREAD_HPP
#define BOOST_DETAIL_WINAPI_GETCURRENTTHREAD_HPP
#include <boost/detail/winapi/get_current_thread.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if defined(__GNUC__) && (((__GNUC__*100)+__GNUC_MINOR__) > 403)
#pragma message "This header is deprecated, use boost/detail/winapi/get_current_thread.hpp instead."
#elif defined(_MSC_VER)
#pragma message("This header is deprecated, use boost/detail/winapi/get_current_thread.hpp instead.")
#endif
#endif // BOOST_DETAIL_WINAPI_GETCURRENTTHREAD_HPP

View File

@@ -1,25 +0,0 @@
// GetLastError.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_GETLASTERROR_HPP
#define BOOST_DETAIL_WINAPI_GETLASTERROR_HPP
#include <boost/detail/winapi/get_last_error.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if defined(__GNUC__) && (((__GNUC__*100)+__GNUC_MINOR__) > 403)
#pragma message "This header is deprecated, use boost/detail/winapi/get_last_error.hpp instead."
#elif defined(_MSC_VER)
#pragma message("This header is deprecated, use boost/detail/winapi/get_last_error.hpp instead.")
#endif
#endif // BOOST_DETAIL_WINAPI_GETLASTERROR_HPP

View File

@@ -1,24 +0,0 @@
// GetProcessTimes.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_GETPROCESSTIMES_HPP
#define BOOST_DETAIL_WINAPI_GETPROCESSTIMES_HPP
#include <boost/detail/winapi/get_process_times.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if defined(__GNUC__) && (((__GNUC__*100)+__GNUC_MINOR__) > 403)
#pragma message "This header is deprecated, use boost/detail/winapi/get_process_times.hpp instead."
#elif defined(_MSC_VER)
#pragma message("This header is deprecated, use boost/detail/winapi/get_process_times.hpp instead.")
#endif
#endif // BOOST_DETAIL_WINAPI_GETPROCESSTIMES_HPP

View File

@@ -1,25 +0,0 @@
// GetThreadTimes.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_GETTHREADTIMES_HPP
#define BOOST_DETAIL_WINAPI_GETTHREADTIMES_HPP
#include <boost/detail/winapi/get_thread_times.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if defined(__GNUC__) && (((__GNUC__*100)+__GNUC_MINOR__) > 403)
#pragma message "This header is deprecated, use boost/detail/winapi/get_thread_times.hpp instead."
#elif defined(_MSC_VER)
#pragma message("This header is deprecated, use boost/detail/winapi/get_thread_times.hpp instead.")
#endif
#endif // BOOST_DETAIL_WINAPI_GETTHREADTIMES_HPP

View File

@@ -1,84 +1,20 @@
// access_rights.hpp --------------------------------------------------------------//
// Copyright 2016 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/access_rights.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_ACCESS_RIGHTS_HPP
#define BOOST_DETAIL_WINAPI_ACCESS_RIGHTS_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/access_rights.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
namespace boost {
namespace detail {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ DELETE_ = DELETE;
const DWORD_ READ_CONTROL_ = READ_CONTROL;
const DWORD_ WRITE_DAC_ = WRITE_DAC;
const DWORD_ WRITE_OWNER_ = WRITE_OWNER;
const DWORD_ SYNCHRONIZE_ = SYNCHRONIZE;
const DWORD_ STANDARD_RIGHTS_ALL_ = STANDARD_RIGHTS_ALL;
const DWORD_ STANDARD_RIGHTS_EXECUTE_ = STANDARD_RIGHTS_EXECUTE;
const DWORD_ STANDARD_RIGHTS_READ_ = STANDARD_RIGHTS_READ;
const DWORD_ STANDARD_RIGHTS_REQUIRED_ = STANDARD_RIGHTS_REQUIRED;
const DWORD_ STANDARD_RIGHTS_WRITE_ = STANDARD_RIGHTS_WRITE;
const DWORD_ SPECIFIC_RIGHTS_ALL_ = SPECIFIC_RIGHTS_ALL;
const DWORD_ ACCESS_SYSTEM_SECURITY_ = ACCESS_SYSTEM_SECURITY;
const DWORD_ MAXIMUM_ALLOWED_ = MAXIMUM_ALLOWED;
const DWORD_ GENERIC_ALL_ = GENERIC_ALL;
const DWORD_ GENERIC_EXECUTE_ = GENERIC_EXECUTE;
const DWORD_ GENERIC_WRITE_ = GENERIC_WRITE;
const DWORD_ GENERIC_READ_ = GENERIC_READ;
typedef ::ACCESS_MASK ACCESS_MASK_;
typedef ::PACCESS_MASK PACCESS_MASK_;
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ DELETE_ = 0x00010000;
const DWORD_ READ_CONTROL_ = 0x00020000;
const DWORD_ WRITE_DAC_ = 0x00040000;
const DWORD_ WRITE_OWNER_ = 0x00080000;
const DWORD_ SYNCHRONIZE_ = 0x00100000;
const DWORD_ STANDARD_RIGHTS_ALL_ = 0x001F0000;
const DWORD_ STANDARD_RIGHTS_EXECUTE_ = READ_CONTROL_;
const DWORD_ STANDARD_RIGHTS_READ_ = READ_CONTROL_;
const DWORD_ STANDARD_RIGHTS_REQUIRED_ = 0x000F0000;
const DWORD_ STANDARD_RIGHTS_WRITE_ = READ_CONTROL_;
const DWORD_ SPECIFIC_RIGHTS_ALL_ = 0x0000FFFF;
const DWORD_ ACCESS_SYSTEM_SECURITY_ = 0x01000000;
const DWORD_ MAXIMUM_ALLOWED_ = 0x02000000;
const DWORD_ GENERIC_ALL_ = 0x10000000;
const DWORD_ GENERIC_EXECUTE_ = 0x20000000;
const DWORD_ GENERIC_WRITE_ = 0x40000000;
const DWORD_ GENERIC_READ_ = 0x80000000;
typedef DWORD_ ACCESS_MASK_;
typedef ACCESS_MASK_* PACCESS_MASK_;
#endif // defined( BOOST_USE_WINDOWS_H )
}
}
}
#endif // BOOST_DETAIL_WINAPI_ACCESS_RIGHTS_HPP

View File

@@ -1,47 +1,20 @@
// apc.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/apc.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_APC_HPP
#define BOOST_DETAIL_WINAPI_APC_HPP
#include <boost/detail/winapi/config.hpp>
#include <boost/winapi/apc.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
#include <boost/detail/winapi/basic_types.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
typedef boost::detail::winapi::VOID_
(NTAPI *PAPCFUNC)(boost::detail::winapi::ULONG_PTR_ Parameter);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
QueueUserAPC(
PAPCFUNC pfnAPC,
boost::detail::winapi::HANDLE_ hThread,
boost::detail::winapi::ULONG_PTR_ dwData);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
typedef ::PAPCFUNC PAPCFUNC_;
using ::QueueUserAPC;
}
}
}
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
#endif // BOOST_DETAIL_WINAPI_APC_HPP

View File

@@ -1,233 +1,20 @@
// 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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/basic_types.hpp instead.
*/
#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>
#include <boost/winapi/basic_types.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.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

View File

@@ -0,0 +1,20 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/bcrypt.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_BCRYPT_HPP_
#define BOOST_DETAIL_WINAPI_BCRYPT_HPP_
#include <boost/winapi/bcrypt.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_BCRYPT_HPP_

View File

@@ -1,108 +1,20 @@
// character_code_conversion.hpp --------------------------------------------------------------//
// Copyright 2016 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/character_code_conversion.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_CHARACTER_CODE_CONVERSION_HPP
#define BOOST_DETAIL_WINAPI_CHARACTER_CODE_CONVERSION_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/character_code_conversion.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_SYMBOL_IMPORT int WINAPI
MultiByteToWideChar(
boost::detail::winapi::UINT_ CodePage,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::LPCSTR_ lpMultiByteStr,
int cbMultiByte,
boost::detail::winapi::LPWSTR_ lpWideCharStr,
int cchWideChar);
BOOST_SYMBOL_IMPORT int WINAPI
WideCharToMultiByte(
boost::detail::winapi::UINT_ CodePage,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::LPCWSTR_ lpWideCharStr,
int cchWideChar,
boost::detail::winapi::LPSTR_ lpMultiByteStr,
int cbMultiByte,
boost::detail::winapi::LPCSTR_ lpDefaultChar,
boost::detail::winapi::LPBOOL_ lpUsedDefaultChar);
} // extern "C"
#endif // #if !defined( BOOST_USE_WINDOWS_H )
namespace boost {
namespace detail {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
const UINT_ CP_ACP_ = CP_ACP;
const UINT_ CP_OEMCP_ = CP_OEMCP;
const UINT_ CP_MACCP_ = CP_MACCP;
const UINT_ CP_THREAD_ACP_ = CP_THREAD_ACP;
const UINT_ CP_SYMBOL_ = CP_SYMBOL;
const UINT_ CP_UTF7_ = CP_UTF7;
const UINT_ CP_UTF8_ = CP_UTF8;
const DWORD_ MB_PRECOMPOSED_ = MB_PRECOMPOSED;
const DWORD_ MB_COMPOSITE_ = MB_COMPOSITE;
const DWORD_ MB_USEGLYPHCHARS_ = MB_USEGLYPHCHARS;
const DWORD_ MB_ERR_INVALID_CHARS_ = MB_ERR_INVALID_CHARS;
const DWORD_ WC_COMPOSITECHECK_ = WC_COMPOSITECHECK;
const DWORD_ WC_DISCARDNS_ = WC_DISCARDNS;
const DWORD_ WC_SEPCHARS_ = WC_SEPCHARS;
const DWORD_ WC_DEFAULTCHAR_ = WC_DEFAULTCHAR;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN2K
const DWORD_ WC_NO_BEST_FIT_CHARS_ = WC_NO_BEST_FIT_CHARS;
#endif
#else // defined( BOOST_USE_WINDOWS_H )
const UINT_ CP_ACP_ = 0u;
const UINT_ CP_OEMCP_ = 1u;
const UINT_ CP_MACCP_ = 2u;
const UINT_ CP_THREAD_ACP_ = 3u;
const UINT_ CP_SYMBOL_ = 42u;
const UINT_ CP_UTF7_ = 65000u;
const UINT_ CP_UTF8_ = 65001u;
const DWORD_ MB_PRECOMPOSED_ = 0x00000001;
const DWORD_ MB_COMPOSITE_ = 0x00000002;
const DWORD_ MB_USEGLYPHCHARS_ = 0x00000004;
const DWORD_ MB_ERR_INVALID_CHARS_ = 0x00000008;
const DWORD_ WC_COMPOSITECHECK_ = 0x00000200;
const DWORD_ WC_DISCARDNS_ = 0x00000010;
const DWORD_ WC_SEPCHARS_ = 0x00000020;
const DWORD_ WC_DEFAULTCHAR_ = 0x00000040;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN2K
const DWORD_ WC_NO_BEST_FIT_CHARS_ = 0x00000400;
#endif
#endif // defined( BOOST_USE_WINDOWS_H )
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
// This constant is not present in MinGW
const DWORD_ WC_ERR_INVALID_CHARS_ = 0x00000080;
#endif
using ::MultiByteToWideChar;
using ::WideCharToMultiByte;
} // namespace winapi
} // namespace detail
} // namespace boost
#endif // BOOST_DETAIL_WINAPI_CHARACTER_CODE_CONVERSION_HPP

View File

@@ -1,123 +1,23 @@
// condition_variable.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/condition_variable.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_HPP
#define BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_HPP
#include <boost/detail/winapi/config.hpp>
#include <boost/winapi/condition_variable.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#include <boost/detail/winapi/basic_types.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
struct _RTL_CONDITION_VARIABLE;
struct _RTL_CRITICAL_SECTION;
struct _RTL_SRWLOCK;
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
InitializeConditionVariable(::_RTL_CONDITION_VARIABLE* ConditionVariable);
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
WakeConditionVariable(::_RTL_CONDITION_VARIABLE* ConditionVariable);
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
WakeAllConditionVariable(::_RTL_CONDITION_VARIABLE* ConditionVariable);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
SleepConditionVariableCS(
::_RTL_CONDITION_VARIABLE* ConditionVariable,
::_RTL_CRITICAL_SECTION* CriticalSection,
boost::detail::winapi::DWORD_ dwMilliseconds);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
SleepConditionVariableSRW(
::_RTL_CONDITION_VARIABLE* ConditionVariable,
::_RTL_SRWLOCK* SRWLock,
boost::detail::winapi::DWORD_ dwMilliseconds,
boost::detail::winapi::ULONG_ Flags);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _RTL_CONDITION_VARIABLE {
PVOID_ Ptr;
} CONDITION_VARIABLE_, *PCONDITION_VARIABLE_;
#if defined( BOOST_USE_WINDOWS_H )
#define BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_INIT CONDITION_VARIABLE_INIT
#else
#define BOOST_DETAIL_WINAPI_CONDITION_VARIABLE {0}
#endif
struct _RTL_CRITICAL_SECTION;
struct _RTL_SRWLOCK;
BOOST_FORCEINLINE VOID_ InitializeConditionVariable(PCONDITION_VARIABLE_ ConditionVariable)
{
::InitializeConditionVariable(reinterpret_cast< ::_RTL_CONDITION_VARIABLE* >(ConditionVariable));
}
BOOST_FORCEINLINE VOID_ WakeConditionVariable(PCONDITION_VARIABLE_ ConditionVariable)
{
::WakeConditionVariable(reinterpret_cast< ::_RTL_CONDITION_VARIABLE* >(ConditionVariable));
}
BOOST_FORCEINLINE VOID_ WakeAllConditionVariable(PCONDITION_VARIABLE_ ConditionVariable)
{
::WakeAllConditionVariable(reinterpret_cast< ::_RTL_CONDITION_VARIABLE* >(ConditionVariable));
}
BOOST_FORCEINLINE BOOL_ SleepConditionVariableCS(
PCONDITION_VARIABLE_ ConditionVariable,
_RTL_CRITICAL_SECTION* CriticalSection,
DWORD_ dwMilliseconds)
{
return ::SleepConditionVariableCS(
reinterpret_cast< ::_RTL_CONDITION_VARIABLE* >(ConditionVariable),
reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(CriticalSection),
dwMilliseconds);
}
BOOST_FORCEINLINE BOOL_ SleepConditionVariableSRW(
PCONDITION_VARIABLE_ ConditionVariable,
_RTL_SRWLOCK* SRWLock,
DWORD_ dwMilliseconds,
ULONG_ Flags)
{
return ::SleepConditionVariableSRW(
reinterpret_cast< ::_RTL_CONDITION_VARIABLE* >(ConditionVariable),
reinterpret_cast< ::_RTL_SRWLOCK* >(SRWLock),
dwMilliseconds,
Flags);
}
#if defined( BOOST_USE_WINDOWS_H )
const ULONG_ CONDITION_VARIABLE_LOCKMODE_SHARED_ = CONDITION_VARIABLE_LOCKMODE_SHARED;
#else // defined( BOOST_USE_WINDOWS_H )
const ULONG_ CONDITION_VARIABLE_LOCKMODE_SHARED_ = 0x00000001;
#endif // defined( BOOST_USE_WINDOWS_H )
const ULONG_ condition_variable_lockmode_shared = CONDITION_VARIABLE_LOCKMODE_SHARED_;
}
}
}
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
// Deprecated
#define BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_INIT BOOST_WINAPI_CONDITION_VARIABLE_INIT
#endif // BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_HPP

View File

@@ -1,76 +1,16 @@
// config.hpp --------------------------------------------------------------//
// Copyright 2013 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/config.hpp instead.
*/
#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>
#include <boost/winapi/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once

View File

@@ -1,184 +1,20 @@
// critical_section.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/critical_section.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_CRITICAL_SECTION_HPP
#define BOOST_DETAIL_WINAPI_CRITICAL_SECTION_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/detail/winapi/detail/cast_ptr.hpp>
#include <boost/winapi/critical_section.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_WINAPI_IS_MINGW )
struct _RTL_CRITICAL_SECTION;
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
InitializeCriticalSection(::_RTL_CRITICAL_SECTION* lpCriticalSection);
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
EnterCriticalSection(::_RTL_CRITICAL_SECTION* lpCriticalSection);
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
LeaveCriticalSection(::_RTL_CRITICAL_SECTION* lpCriticalSection);
#if BOOST_USE_WINAPI_VERSION >= 0x0403
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
InitializeCriticalSectionAndSpinCount(
::_RTL_CRITICAL_SECTION* lpCriticalSection,
boost::detail::winapi::DWORD_ dwSpinCount);
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
InitializeCriticalSectionEx(
::_RTL_CRITICAL_SECTION* lpCriticalSection,
boost::detail::winapi::DWORD_ dwSpinCount,
boost::detail::winapi::DWORD_ Flags);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
SetCriticalSectionSpinCount(
::_RTL_CRITICAL_SECTION* lpCriticalSection,
boost::detail::winapi::DWORD_ dwSpinCount);
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
TryEnterCriticalSection(::_RTL_CRITICAL_SECTION* lpCriticalSection);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
DeleteCriticalSection(::_RTL_CRITICAL_SECTION* lpCriticalSection);
#else // defined( BOOST_WINAPI_IS_MINGW )
// MinGW uses a different name for the structure
struct _CRITICAL_SECTION;
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
InitializeCriticalSection(::_CRITICAL_SECTION* lpCriticalSection);
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
EnterCriticalSection(::_CRITICAL_SECTION* lpCriticalSection);
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
LeaveCriticalSection(::_CRITICAL_SECTION* lpCriticalSection);
#if BOOST_USE_WINAPI_VERSION >= 0x0403
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
InitializeCriticalSectionAndSpinCount(
::_CRITICAL_SECTION* lpCriticalSection,
boost::detail::winapi::DWORD_ dwSpinCount);
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
InitializeCriticalSectionEx(
::_CRITICAL_SECTION* lpCriticalSection,
boost::detail::winapi::DWORD_ dwSpinCount,
boost::detail::winapi::DWORD_ Flags);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
SetCriticalSectionSpinCount(
::_CRITICAL_SECTION* lpCriticalSection,
boost::detail::winapi::DWORD_ dwSpinCount);
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
TryEnterCriticalSection(::_CRITICAL_SECTION* lpCriticalSection);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
DeleteCriticalSection(::_CRITICAL_SECTION* lpCriticalSection);
#endif // defined( BOOST_WINAPI_IS_MINGW )
}
#endif
namespace boost {
namespace detail {
namespace winapi {
struct _RTL_CRITICAL_SECTION_DEBUG;
#pragma pack(push, 8)
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _RTL_CRITICAL_SECTION {
_RTL_CRITICAL_SECTION_DEBUG* DebugInfo;
LONG_ LockCount;
LONG_ RecursionCount;
HANDLE_ OwningThread;
HANDLE_ LockSemaphore;
ULONG_PTR_ SpinCount;
} CRITICAL_SECTION_, *PCRITICAL_SECTION_;
#pragma pack(pop)
BOOST_FORCEINLINE VOID_ InitializeCriticalSection(CRITICAL_SECTION_* lpCriticalSection)
{
::InitializeCriticalSection(winapi::detail::cast_ptr(lpCriticalSection));
}
BOOST_FORCEINLINE VOID_ EnterCriticalSection(CRITICAL_SECTION_* lpCriticalSection)
{
::EnterCriticalSection(winapi::detail::cast_ptr(lpCriticalSection));
}
BOOST_FORCEINLINE VOID_ LeaveCriticalSection(CRITICAL_SECTION_* lpCriticalSection)
{
::LeaveCriticalSection(winapi::detail::cast_ptr(lpCriticalSection));
}
#if BOOST_USE_WINAPI_VERSION >= 0x0403
BOOST_FORCEINLINE BOOL_ InitializeCriticalSectionAndSpinCount(CRITICAL_SECTION_* lpCriticalSection, DWORD_ dwSpinCount)
{
return ::InitializeCriticalSectionAndSpinCount(winapi::detail::cast_ptr(lpCriticalSection), dwSpinCount);
}
// CRITICAL_SECTION_NO_DEBUG_INFO is defined for WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
const DWORD_ CRITICAL_SECTION_NO_DEBUG_INFO_ = 0x01000000;
const DWORD_ CRITICAL_SECTION_FLAG_NO_DEBUG_INFO_ = CRITICAL_SECTION_NO_DEBUG_INFO_;
const DWORD_ CRITICAL_SECTION_FLAG_DYNAMIC_SPIN_ = 0x02000000; // undocumented
const DWORD_ CRITICAL_SECTION_FLAG_STATIC_INIT_ = 0x04000000; // undocumented
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_FORCEINLINE BOOL_ InitializeCriticalSectionEx(CRITICAL_SECTION_* lpCriticalSection, DWORD_ dwSpinCount, DWORD_ Flags)
{
return ::InitializeCriticalSectionEx(winapi::detail::cast_ptr(lpCriticalSection), dwSpinCount, Flags);
}
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_FORCEINLINE DWORD_ SetCriticalSectionSpinCount(CRITICAL_SECTION_* lpCriticalSection, DWORD_ dwSpinCount)
{
return ::SetCriticalSectionSpinCount(winapi::detail::cast_ptr(lpCriticalSection), dwSpinCount);
}
#endif // BOOST_USE_WINAPI_VERSION >= 0x0403
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
BOOST_FORCEINLINE BOOL_ TryEnterCriticalSection(CRITICAL_SECTION_* lpCriticalSection)
{
return ::TryEnterCriticalSection(winapi::detail::cast_ptr(lpCriticalSection));
}
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
BOOST_FORCEINLINE VOID_ DeleteCriticalSection(CRITICAL_SECTION_* lpCriticalSection)
{
::DeleteCriticalSection(winapi::detail::cast_ptr(lpCriticalSection));
}
}
}
}
#endif // BOOST_DETAIL_WINAPI_CRITICAL_SECTION_HPP

View File

@@ -1,230 +1,20 @@
// 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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/crypt.hpp instead.
*/
#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
#include <boost/winapi/crypt.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#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

View File

@@ -1,171 +1,20 @@
// dbghelp.hpp --------------------------------------------------------------//
// Copyright 2015 Klemens Morgenstern
// Copyright 2016 Jorge Lodos
// Copyright 2016 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/dbghelp.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_DBGHELP_HPP
#define BOOST_DETAIL_WINAPI_DBGHELP_HPP
#include <boost/detail/winapi/basic_types.hpp>
#if defined( BOOST_USE_WINDOWS_H )
#if !defined( BOOST_WINAPI_IS_MINGW )
#include <dbghelp.h>
#else
// In MinGW there is no dbghelp.h but an older imagehlp.h header defines some of the symbols from it.
// Note that the user has to link with libimagehlp.a instead of libdbghelp.a for it to work.
#include <imagehlp.h>
#endif
#endif
#include <boost/winapi/dbghelp.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
// Some symbols declared below are not present in all versions of Windows SDK, MinGW and MinGW-w64.
// dbghelp.h/imagehlp.h define the API_VERSION_NUMBER macro which we use to detect its version.
// When the macro is not available we can only guess based on the compiler version or SDK type.
#if defined(API_VERSION_NUMBER)
#if API_VERSION_NUMBER >= 11
// UnDecorateSymbolNameW available since Windows SDK 6.0A and MinGW-w64 (as of 2016-02-14)
#define BOOST_DETAIL_WINAPI_HAS_UNDECORATESYMBOLNAMEW
#endif
#elif defined(_MSC_VER) && _MSC_VER >= 1500
// Until MSVC 9.0 Windows SDK was bundled in Visual Studio and didn't have UnDecorateSymbolNameW.
// Supposedly, Windows SDK 6.0A was the first standalone one and it is used with MSVC 9.0.
#define BOOST_DETAIL_WINAPI_HAS_UNDECORATESYMBOLNAMEW
#elif !defined(BOOST_WINAPI_IS_MINGW)
// MinGW does not provide UnDecorateSymbolNameW (as of 2016-02-14)
#define BOOST_DETAIL_WINAPI_HAS_UNDECORATESYMBOLNAMEW
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
struct API_VERSION;
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
UnDecorateSymbolName(
boost::detail::winapi::LPCSTR_ DecoratedName,
boost::detail::winapi::LPSTR_ UnDecoratedName,
boost::detail::winapi::DWORD_ UndecoratedLength,
boost::detail::winapi::DWORD_ Flags);
#if defined( BOOST_DETAIL_WINAPI_HAS_UNDECORATESYMBOLNAMEW )
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
UnDecorateSymbolNameW(
boost::detail::winapi::LPCWSTR_ DecoratedName,
boost::detail::winapi::LPWSTR_ UnDecoratedName,
boost::detail::winapi::DWORD_ UndecoratedLength,
boost::detail::winapi::DWORD_ Flags);
#endif
BOOST_SYMBOL_IMPORT API_VERSION* WINAPI
ImagehlpApiVersion(BOOST_DETAIL_WINAPI_VOID);
} // extern "C"
#endif
namespace boost {
namespace detail {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ UNDNAME_COMPLETE_ = UNDNAME_COMPLETE;
const DWORD_ UNDNAME_NO_LEADING_UNDERSCORES_ = UNDNAME_NO_LEADING_UNDERSCORES;
const DWORD_ UNDNAME_NO_MS_KEYWORDS_ = UNDNAME_NO_MS_KEYWORDS;
const DWORD_ UNDNAME_NO_FUNCTION_RETURNS_ = UNDNAME_NO_FUNCTION_RETURNS;
const DWORD_ UNDNAME_NO_ALLOCATION_MODEL_ = UNDNAME_NO_ALLOCATION_MODEL;
const DWORD_ UNDNAME_NO_ALLOCATION_LANGUAGE_ = UNDNAME_NO_ALLOCATION_LANGUAGE;
const DWORD_ UNDNAME_NO_MS_THISTYPE_ = UNDNAME_NO_MS_THISTYPE;
const DWORD_ UNDNAME_NO_CV_THISTYPE_ = UNDNAME_NO_CV_THISTYPE;
const DWORD_ UNDNAME_NO_THISTYPE_ = UNDNAME_NO_THISTYPE;
const DWORD_ UNDNAME_NO_ACCESS_SPECIFIERS_ = UNDNAME_NO_ACCESS_SPECIFIERS;
const DWORD_ UNDNAME_NO_THROW_SIGNATURES_ = UNDNAME_NO_THROW_SIGNATURES;
const DWORD_ UNDNAME_NO_MEMBER_TYPE_ = UNDNAME_NO_MEMBER_TYPE;
const DWORD_ UNDNAME_NO_RETURN_UDT_MODEL_ = UNDNAME_NO_RETURN_UDT_MODEL;
const DWORD_ UNDNAME_32_BIT_DECODE_ = UNDNAME_32_BIT_DECODE;
const DWORD_ UNDNAME_NAME_ONLY_ = UNDNAME_NAME_ONLY;
const DWORD_ UNDNAME_NO_ARGUMENTS_ = UNDNAME_NO_ARGUMENTS;
const DWORD_ UNDNAME_NO_SPECIAL_SYMS_ = UNDNAME_NO_SPECIAL_SYMS;
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ UNDNAME_COMPLETE_ = 0x00000000;
const DWORD_ UNDNAME_NO_LEADING_UNDERSCORES_ = 0x00000001;
const DWORD_ UNDNAME_NO_MS_KEYWORDS_ = 0x00000002;
const DWORD_ UNDNAME_NO_FUNCTION_RETURNS_ = 0x00000004;
const DWORD_ UNDNAME_NO_ALLOCATION_MODEL_ = 0x00000008;
const DWORD_ UNDNAME_NO_ALLOCATION_LANGUAGE_ = 0x00000010;
const DWORD_ UNDNAME_NO_MS_THISTYPE_ = 0x00000020;
const DWORD_ UNDNAME_NO_CV_THISTYPE_ = 0x00000040;
const DWORD_ UNDNAME_NO_THISTYPE_ = 0x00000060;
const DWORD_ UNDNAME_NO_ACCESS_SPECIFIERS_ = 0x00000080;
const DWORD_ UNDNAME_NO_THROW_SIGNATURES_ = 0x00000100;
const DWORD_ UNDNAME_NO_MEMBER_TYPE_ = 0x00000200;
const DWORD_ UNDNAME_NO_RETURN_UDT_MODEL_ = 0x00000400;
const DWORD_ UNDNAME_32_BIT_DECODE_ = 0x00000800;
const DWORD_ UNDNAME_NAME_ONLY_ = 0x00001000;
const DWORD_ UNDNAME_NO_ARGUMENTS_ = 0x00002000;
const DWORD_ UNDNAME_NO_SPECIAL_SYMS_ = 0x00004000;
#endif // defined( BOOST_USE_WINDOWS_H )
using ::UnDecorateSymbolName;
#if defined( BOOST_DETAIL_WINAPI_HAS_UNDECORATESYMBOLNAMEW )
using ::UnDecorateSymbolNameW;
#endif
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS API_VERSION {
USHORT_ MajorVersion;
USHORT_ MinorVersion;
USHORT_ Revision;
USHORT_ Reserved;
} API_VERSION_, *LPAPI_VERSION_;
BOOST_FORCEINLINE LPAPI_VERSION_ ImagehlpApiVersion()
{
return reinterpret_cast<LPAPI_VERSION_>(::ImagehlpApiVersion());
}
BOOST_FORCEINLINE DWORD_ undecorate_symbol_name(
LPCSTR_ DecoratedName,
LPSTR_ UnDecoratedName,
DWORD_ UndecoratedLength,
DWORD_ Flags)
{
return ::UnDecorateSymbolName(
DecoratedName,
UnDecoratedName,
UndecoratedLength,
Flags);
}
#if defined( BOOST_DETAIL_WINAPI_HAS_UNDECORATESYMBOLNAMEW )
BOOST_FORCEINLINE DWORD_ undecorate_symbol_name(
LPCWSTR_ DecoratedName,
LPWSTR_ UnDecoratedName,
DWORD_ UndecoratedLength,
DWORD_ Flags)
{
return ::UnDecorateSymbolNameW(
DecoratedName,
UnDecoratedName,
UndecoratedLength,
Flags);
}
#endif
}
}
}
#endif // BOOST_DETAIL_WINAPI_DBGHELP_HPP

View File

@@ -0,0 +1,20 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/debugapi.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_DEBUGAPI_HPP
#define BOOST_DETAIL_WINAPI_DEBUGAPI_HPP
#include <boost/winapi/debugapi.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_DEBUGAPI_HPP

View File

@@ -1,40 +0,0 @@
// 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

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, it provides the deprecated namespace for backward compatibility.
*/
#ifndef BOOST_DETAIL_WINAPI_DETAIL_DEPRECATED_NAMESPACE_HPP_INCLUDED_
#define BOOST_DETAIL_WINAPI_DETAIL_DEPRECATED_NAMESPACE_HPP_INCLUDED_
#include <boost/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
namespace boost {
namespace winapi {}
namespace detail {
namespace winapi {
using namespace boost::winapi;
} // namespace winapi
} // namespace detail
} // namespace boost
#endif // BOOST_DETAIL_WINAPI_DETAIL_DEPRECATED_NAMESPACE_HPP_INCLUDED_

View File

@@ -1,94 +1,20 @@
// directory_management.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/directory_management.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_DIRECTORY_MANAGEMENT_HPP
#define BOOST_DETAIL_WINAPI_DIRECTORY_MANAGEMENT_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/detail/winapi/get_system_directory.hpp>
#include <boost/winapi/directory_management.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
CreateDirectoryA(boost::detail::winapi::LPCSTR_, ::_SECURITY_ATTRIBUTES*);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
GetTempPathA(boost::detail::winapi::DWORD_ length, boost::detail::winapi::LPSTR_ buffer);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
RemoveDirectoryA(boost::detail::winapi::LPCSTR_);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
CreateDirectoryW(boost::detail::winapi::LPCWSTR_, ::_SECURITY_ATTRIBUTES*);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
GetTempPathW(boost::detail::winapi::DWORD_ length, boost::detail::winapi::LPWSTR_ buffer);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
RemoveDirectoryW(boost::detail::winapi::LPCWSTR_);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
#if !defined( BOOST_NO_ANSI_APIS )
using ::GetTempPathA;
using ::RemoveDirectoryA;
#endif
using ::GetTempPathW;
using ::RemoveDirectoryW;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE BOOL_ CreateDirectoryA(LPCSTR_ pPathName, PSECURITY_ATTRIBUTES_ pSecurityAttributes)
{
return ::CreateDirectoryA(pPathName, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(pSecurityAttributes));
}
#endif
BOOST_FORCEINLINE BOOL_ CreateDirectoryW(LPCWSTR_ pPathName, PSECURITY_ATTRIBUTES_ pSecurityAttributes)
{
return ::CreateDirectoryW(pPathName, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(pSecurityAttributes));
}
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE BOOL_ create_directory(LPCSTR_ pPathName, PSECURITY_ATTRIBUTES_ pSecurityAttributes)
{
return ::CreateDirectoryA(pPathName, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(pSecurityAttributes));
}
BOOST_FORCEINLINE DWORD_ get_temp_path(DWORD_ length, LPSTR_ buffer)
{
return ::GetTempPathA(length, buffer);
}
BOOST_FORCEINLINE BOOL_ remove_directory(LPCSTR_ pPathName)
{
return ::RemoveDirectoryA(pPathName);
}
#endif
BOOST_FORCEINLINE BOOL_ create_directory(LPCWSTR_ pPathName, PSECURITY_ATTRIBUTES_ pSecurityAttributes)
{
return ::CreateDirectoryW(pPathName, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(pSecurityAttributes));
}
BOOST_FORCEINLINE DWORD_ get_temp_path(DWORD_ length, LPWSTR_ buffer)
{
return ::GetTempPathW(length, buffer);
}
BOOST_FORCEINLINE BOOL_ remove_directory(LPCWSTR_ pPathName)
{
return ::RemoveDirectoryW(pPathName);
}
} // namespace winapi
} // namespace detail
} // namespace boost
#endif // BOOST_DETAIL_WINAPI_DIRECTORY_MANAGEMENT_HPP

View File

@@ -1,221 +1,20 @@
// dll.hpp --------------------------------------------------------------//
// Copyright 2010 Vicente J. Botet Escriba
// Copyright 2014 Renato Tegon Forti, Antony Polukhin
// Copyright 2015 Andrey Semashev
// Copyright 2015 Antony Polukhin
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/dll.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_DLL_HPP
#define BOOST_DETAIL_WINAPI_DLL_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/dll.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
namespace boost { namespace detail { namespace winapi {
#ifdef _WIN64
typedef INT_PTR_ (WINAPI *FARPROC_)();
typedef INT_PTR_ (WINAPI *NEARPROC_)();
typedef INT_PTR_ (WINAPI *PROC_)();
#else
typedef int (WINAPI *FARPROC_)();
typedef int (WINAPI *NEARPROC_)();
typedef int (WINAPI *PROC_)();
#endif // _WIN64
}}} // namespace boost::detail::winapi
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::HMODULE_ WINAPI
LoadLibraryA(boost::detail::winapi::LPCSTR_ lpFileName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HMODULE_ WINAPI
LoadLibraryExA(
boost::detail::winapi::LPCSTR_ lpFileName,
boost::detail::winapi::HANDLE_ hFile,
boost::detail::winapi::DWORD_ dwFlags
);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HMODULE_ WINAPI
GetModuleHandleA(boost::detail::winapi::LPCSTR_ lpFileName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
GetModuleFileNameA(
boost::detail::winapi::HMODULE_ hModule,
boost::detail::winapi::LPSTR_ lpFilename,
boost::detail::winapi::DWORD_ nSize
);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HMODULE_ WINAPI
LoadLibraryW(boost::detail::winapi::LPCWSTR_ lpFileName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HMODULE_ WINAPI
LoadLibraryExW(
boost::detail::winapi::LPCWSTR_ lpFileName,
boost::detail::winapi::HANDLE_ hFile,
boost::detail::winapi::DWORD_ dwFlags
);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HMODULE_ WINAPI
GetModuleHandleW(boost::detail::winapi::LPCWSTR_ lpFileName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
GetModuleFileNameW(
boost::detail::winapi::HMODULE_ hModule,
boost::detail::winapi::LPWSTR_ lpFilename,
boost::detail::winapi::DWORD_ nSize
);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
FreeLibrary(boost::detail::winapi::HMODULE_ hModule);
#if !defined( UNDER_CE )
BOOST_SYMBOL_IMPORT boost::detail::winapi::FARPROC_ WINAPI
GetProcAddress(boost::detail::winapi::HMODULE_ hModule, boost::detail::winapi::LPCSTR_ lpProcName);
#else
// On Windows CE there are two functions: GetProcAddressA (since Windows CE 3.0) and GetProcAddressW.
// GetProcAddress is a macro that is _always_ defined to GetProcAddressW.
BOOST_SYMBOL_IMPORT boost::detail::winapi::FARPROC_ WINAPI
GetProcAddressA(boost::detail::winapi::HMODULE_ hModule, boost::detail::winapi::LPCSTR_ lpProcName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::FARPROC_ WINAPI
GetProcAddressW(boost::detail::winapi::HMODULE_ hModule, boost::detail::winapi::LPCWSTR_ lpProcName);
#endif
struct _MEMORY_BASIC_INFORMATION;
#if !defined( BOOST_WINAPI_IS_MINGW )
BOOST_SYMBOL_IMPORT boost::detail::winapi::SIZE_T_ WINAPI
VirtualQuery(
boost::detail::winapi::LPCVOID_ lpAddress,
::_MEMORY_BASIC_INFORMATION* lpBuffer,
boost::detail::winapi::ULONG_PTR_ dwLength
);
#else // !defined( BOOST_WINAPI_IS_MINGW )
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
VirtualQuery(
boost::detail::winapi::LPCVOID_ lpAddress,
::_MEMORY_BASIC_INFORMATION* lpBuffer,
boost::detail::winapi::DWORD_ dwLength
);
#endif // !defined( BOOST_WINAPI_IS_MINGW )
} // extern "C"
#endif // #if !defined( BOOST_USE_WINDOWS_H )
namespace boost {
namespace detail {
namespace winapi {
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS MEMORY_BASIC_INFORMATION_ {
PVOID_ BaseAddress;
PVOID_ AllocationBase;
DWORD_ AllocationProtect;
SIZE_T_ RegionSize;
DWORD_ State;
DWORD_ Protect;
DWORD_ Type;
} *PMEMORY_BASIC_INFORMATION_;
#if defined( BOOST_USE_WINDOWS_H )
typedef ::FARPROC FARPROC_;
typedef ::NEARPROC NEARPROC_;
typedef ::PROC PROC_;
const DWORD_ DONT_RESOLVE_DLL_REFERENCES_ = DONT_RESOLVE_DLL_REFERENCES;
const DWORD_ LOAD_WITH_ALTERED_SEARCH_PATH_ = LOAD_WITH_ALTERED_SEARCH_PATH;
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ DONT_RESOLVE_DLL_REFERENCES_ = 0x00000001;
const DWORD_ LOAD_WITH_ALTERED_SEARCH_PATH_ = 0x00000008;
#endif // defined( BOOST_USE_WINDOWS_H )
// This one is not defined by MinGW
const DWORD_ LOAD_IGNORE_CODE_AUTHZ_LEVEL_ = 0x00000010;
#if !defined( BOOST_NO_ANSI_APIS )
using ::LoadLibraryA;
using ::LoadLibraryExA;
using ::GetModuleHandleA;
using ::GetModuleFileNameA;
#endif // !defined( BOOST_NO_ANSI_APIS )
using ::LoadLibraryW;
using ::LoadLibraryExW;
using ::GetModuleHandleW;
using ::GetModuleFileNameW;
using ::FreeLibrary;
#if !defined( UNDER_CE )
// For backward compatibility, don't use directly. Use get_proc_address instead.
using ::GetProcAddress;
#else
using ::GetProcAddressA;
using ::GetProcAddressW;
#endif
BOOST_FORCEINLINE FARPROC_ get_proc_address(HMODULE_ hModule, LPCSTR_ lpProcName)
{
#if !defined( UNDER_CE )
return ::GetProcAddress(hModule, lpProcName);
#else
return ::GetProcAddressA(hModule, lpProcName);
#endif
}
BOOST_FORCEINLINE SIZE_T_ VirtualQuery(LPCVOID_ lpAddress, MEMORY_BASIC_INFORMATION_* lpBuffer, ULONG_PTR_ dwLength)
{
return ::VirtualQuery(lpAddress, reinterpret_cast< ::_MEMORY_BASIC_INFORMATION* >(lpBuffer), dwLength);
}
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HMODULE_ load_library(LPCSTR_ lpFileName)
{
return ::LoadLibraryA(lpFileName);
}
BOOST_FORCEINLINE HMODULE_ load_library_ex(LPCSTR_ lpFileName, HANDLE_ hFile, DWORD_ dwFlags)
{
return ::LoadLibraryExA(lpFileName, hFile, dwFlags);
}
BOOST_FORCEINLINE HMODULE_ get_module_handle(LPCSTR_ lpFileName)
{
return ::GetModuleHandleA(lpFileName);
}
BOOST_FORCEINLINE DWORD_ get_module_file_name(HMODULE_ hModule, LPSTR_ lpFilename, DWORD_ nSize)
{
return ::GetModuleFileNameA(hModule, lpFilename, nSize);
}
#endif // #if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HMODULE_ load_library(LPCWSTR_ lpFileName)
{
return ::LoadLibraryW(lpFileName);
}
BOOST_FORCEINLINE HMODULE_ load_library_ex(LPCWSTR_ lpFileName, HANDLE_ hFile, DWORD_ dwFlags)
{
return ::LoadLibraryExW(lpFileName, hFile, dwFlags);
}
BOOST_FORCEINLINE HMODULE_ get_module_handle(LPCWSTR_ lpFileName)
{
return ::GetModuleHandleW(lpFileName);
}
BOOST_FORCEINLINE DWORD_ get_module_file_name(HMODULE_ hModule, LPWSTR_ lpFilename, DWORD_ nSize)
{
return ::GetModuleFileNameW(hModule, lpFilename, nSize);
}
} // namespace winapi
} // namespace detail
} // namespace boost
#endif // BOOST_DETAIL_WINAPI_DLL_HPP

View File

@@ -1,118 +1,20 @@
// environment.hpp --------------------------------------------------------------//
// Copyright 2016 Klemens D. Morgenstern
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/environment.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_ENVIRONMENT_HPP_
#define BOOST_DETAIL_WINAPI_ENVIRONMENT_HPP_
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/environment.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::LPSTR_ WINAPI GetEnvironmentStringsA();
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI FreeEnvironmentStringsA(boost::detail::winapi::LPSTR_);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetEnvironmentVariableA(
boost::detail::winapi::LPCSTR_ lpName,
boost::detail::winapi::LPSTR_ lpBuffer,
boost::detail::winapi::DWORD_ nSize
);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI SetEnvironmentVariableA(
boost::detail::winapi::LPCSTR_ lpName,
boost::detail::winapi::LPCSTR_ lpValue
);
#endif // !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::LPWSTR_ WINAPI GetEnvironmentStringsW();
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI FreeEnvironmentStringsW(boost::detail::winapi::LPWSTR_);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetEnvironmentVariableW(
boost::detail::winapi::LPCWSTR_ lpName,
boost::detail::winapi::LPWSTR_ lpBuffer,
boost::detail::winapi::DWORD_ nSize
);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI SetEnvironmentVariableW(
boost::detail::winapi::LPCWSTR_ lpName,
boost::detail::winapi::LPCWSTR_ lpValue
);
} // extern "C"
#endif // !defined( BOOST_USE_WINDOWS_H )
namespace boost { namespace detail { namespace winapi {
#if !defined( BOOST_NO_ANSI_APIS )
using ::GetEnvironmentStringsA;
using ::FreeEnvironmentStringsA;
using ::GetEnvironmentVariableA;
using ::SetEnvironmentVariableA;
#endif // !defined( BOOST_NO_ANSI_APIS )
using ::GetEnvironmentStringsW;
using ::FreeEnvironmentStringsW;
using ::GetEnvironmentVariableW;
using ::SetEnvironmentVariableW;
template< typename Char >
Char* get_environment_strings();
#if !defined( BOOST_NO_ANSI_APIS )
template< >
BOOST_FORCEINLINE char* get_environment_strings< char >()
{
return GetEnvironmentStringsA();
}
BOOST_FORCEINLINE BOOL_ free_environment_strings(boost::detail::winapi::LPSTR_ p)
{
return FreeEnvironmentStringsA(p);
}
BOOST_FORCEINLINE DWORD_ get_environment_variable(LPCSTR_ name, LPSTR_ buffer, DWORD_ size)
{
return GetEnvironmentVariableA(name, buffer, size);
}
BOOST_FORCEINLINE BOOL_ set_environment_variable(LPCSTR_ name, LPCSTR_ value)
{
return SetEnvironmentVariableA(name, value);
}
#endif // !defined( BOOST_NO_ANSI_APIS )
template< >
BOOST_FORCEINLINE wchar_t* get_environment_strings< wchar_t >()
{
return GetEnvironmentStringsW();
}
BOOST_FORCEINLINE BOOL_ free_environment_strings(boost::detail::winapi::LPWSTR_ p)
{
return FreeEnvironmentStringsW(p);
}
BOOST_FORCEINLINE DWORD_ get_environment_variable(LPCWSTR_ name, LPWSTR_ buffer, DWORD_ size)
{
return GetEnvironmentVariableW(name, buffer, size);
}
BOOST_FORCEINLINE BOOL_ set_environment_variable(LPCWSTR_ name, LPCWSTR_ value)
{
return SetEnvironmentVariableW(name, value);
}
} // namespace winapi
} // namespace detail
} // namespace boost
#endif // BOOST_DETAIL_WINAPI_ENVIRONMENT_HPP_

File diff suppressed because it is too large Load Diff

View File

@@ -1,143 +1,20 @@
// error_handling.hpp --------------------------------------------------------------//
// Copyright 2010 Vicente J. Botet Escriba
// Copyright 2015 Andrey Semashev
// Copyright 2016 Jorge Lodos
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/error_handling.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_ERROR_HANDLING_HPP
#define BOOST_DETAIL_WINAPI_ERROR_HANDLING_HPP
#include <stdarg.h>
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/detail/winapi/get_last_error.hpp>
#include <boost/winapi/error_handling.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
FormatMessageA(
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::LPCVOID_ lpSource,
boost::detail::winapi::DWORD_ dwMessageId,
boost::detail::winapi::DWORD_ dwLanguageId,
boost::detail::winapi::LPSTR_ lpBuffer,
boost::detail::winapi::DWORD_ nSize,
va_list *Arguments);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
FormatMessageW(
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::LPCVOID_ lpSource,
boost::detail::winapi::DWORD_ dwMessageId,
boost::detail::winapi::DWORD_ dwLanguageId,
boost::detail::winapi::LPWSTR_ lpBuffer,
boost::detail::winapi::DWORD_ nSize,
va_list *Arguments);
BOOST_SYMBOL_IMPORT boost::detail::winapi::UINT_ WINAPI
SetErrorMode(boost::detail::winapi::UINT_ uMode);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ FORMAT_MESSAGE_ALLOCATE_BUFFER_= FORMAT_MESSAGE_ALLOCATE_BUFFER;
const DWORD_ FORMAT_MESSAGE_IGNORE_INSERTS_= FORMAT_MESSAGE_IGNORE_INSERTS;
const DWORD_ FORMAT_MESSAGE_FROM_STRING_= FORMAT_MESSAGE_FROM_STRING;
const DWORD_ FORMAT_MESSAGE_FROM_HMODULE_= FORMAT_MESSAGE_FROM_HMODULE;
const DWORD_ FORMAT_MESSAGE_FROM_SYSTEM_= FORMAT_MESSAGE_FROM_SYSTEM;
const DWORD_ FORMAT_MESSAGE_ARGUMENT_ARRAY_= FORMAT_MESSAGE_ARGUMENT_ARRAY;
const DWORD_ FORMAT_MESSAGE_MAX_WIDTH_MASK_= FORMAT_MESSAGE_MAX_WIDTH_MASK;
const WORD_ LANG_NEUTRAL_= LANG_NEUTRAL;
const WORD_ LANG_INVARIANT_= LANG_INVARIANT;
const WORD_ SUBLANG_DEFAULT_= SUBLANG_DEFAULT; // user default
BOOST_FORCEINLINE WORD_ MAKELANGID_(WORD_ p, WORD_ s)
{
return MAKELANGID(p,s);
}
const DWORD_ SEM_FAILCRITICALERRORS_ = SEM_FAILCRITICALERRORS;
const DWORD_ SEM_NOGPFAULTERRORBOX_ = SEM_NOGPFAULTERRORBOX;
const DWORD_ SEM_NOALIGNMENTFAULTEXCEPT_ = SEM_NOALIGNMENTFAULTEXCEPT;
const DWORD_ SEM_NOOPENFILEERRORBOX_ = SEM_NOOPENFILEERRORBOX;
#else
const DWORD_ FORMAT_MESSAGE_ALLOCATE_BUFFER_= 0x00000100;
const DWORD_ FORMAT_MESSAGE_IGNORE_INSERTS_= 0x00000200;
const DWORD_ FORMAT_MESSAGE_FROM_STRING_= 0x00000400;
const DWORD_ FORMAT_MESSAGE_FROM_HMODULE_= 0x00000800;
const DWORD_ FORMAT_MESSAGE_FROM_SYSTEM_= 0x00001000;
const DWORD_ FORMAT_MESSAGE_ARGUMENT_ARRAY_= 0x00002000;
const DWORD_ FORMAT_MESSAGE_MAX_WIDTH_MASK_= 0x000000FF;
const WORD_ LANG_NEUTRAL_= 0x00;
const WORD_ LANG_INVARIANT_= 0x7f;
const WORD_ SUBLANG_DEFAULT_= 0x01; // user default
BOOST_FORCEINLINE WORD_ MAKELANGID_(WORD_ p, WORD_ s)
{
return (WORD_)((((WORD_)(s)) << 10) | (WORD_)(p));
}
const DWORD_ SEM_FAILCRITICALERRORS_ = 0x0001;
const DWORD_ SEM_NOGPFAULTERRORBOX_ = 0x0002;
const DWORD_ SEM_NOALIGNMENTFAULTEXCEPT_ = 0x0004;
const DWORD_ SEM_NOOPENFILEERRORBOX_ = 0x8000;
#endif
#if !defined( BOOST_NO_ANSI_APIS )
using ::FormatMessageA;
#endif
using ::FormatMessageW;
using ::SetErrorMode;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE DWORD_ format_message(
DWORD_ dwFlags,
LPCVOID_ lpSource,
DWORD_ dwMessageId,
DWORD_ dwLanguageId,
LPSTR_ lpBuffer,
DWORD_ nSize,
va_list *Arguments)
{
return ::FormatMessageA(dwFlags, lpSource, dwMessageId, dwLanguageId, lpBuffer, nSize, Arguments);
}
#endif
BOOST_FORCEINLINE DWORD_ format_message(
DWORD_ dwFlags,
LPCVOID_ lpSource,
DWORD_ dwMessageId,
DWORD_ dwLanguageId,
LPWSTR_ lpBuffer,
DWORD_ nSize,
va_list *Arguments)
{
return ::FormatMessageW(dwFlags, lpSource, dwMessageId, dwLanguageId, lpBuffer, nSize, Arguments);
}
}
}
}
#endif // BOOST_DETAIL_WINAPI_ERROR_HANDLING_HPP

View File

@@ -1,190 +1,20 @@
// event.hpp --------------------------------------------------------------//
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/event.hpp instead.
*/
// Copyright 2010 Vicente J. Botet Escriba
// Copyright 2015 Andrey Semashev
#ifndef BOOST_DETAIL_WINAPI_EVENT_HPP_
#define BOOST_DETAIL_WINAPI_EVENT_HPP_
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_DETAIL_WINAPI_EVENT_HPP
#define BOOST_DETAIL_WINAPI_EVENT_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/predef/platform.h>
#include <boost/winapi/event.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
#if !defined( BOOST_PLAT_WINDOWS_RUNTIME_AVALIABLE )
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateEventA(
::_SECURITY_ATTRIBUTES* lpEventAttributes,
boost::detail::winapi::BOOL_ bManualReset,
boost::detail::winapi::BOOL_ bInitialState,
boost::detail::winapi::LPCSTR_ lpName);
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateEventExA(
::_SECURITY_ATTRIBUTES *lpEventAttributes,
boost::detail::winapi::LPCSTR_ lpName,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::DWORD_ dwDesiredAccess);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
OpenEventA(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::LPCSTR_ lpName);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateEventW(
::_SECURITY_ATTRIBUTES* lpEventAttributes,
boost::detail::winapi::BOOL_ bManualReset,
boost::detail::winapi::BOOL_ bInitialState,
boost::detail::winapi::LPCWSTR_ lpName);
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateEventExW(
::_SECURITY_ATTRIBUTES *lpEventAttributes,
boost::detail::winapi::LPCWSTR_ lpName,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::DWORD_ dwDesiredAccess);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
OpenEventW(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::LPCWSTR_ lpName);
// Windows CE define SetEvent/ResetEvent as inline functions in kfuncs.h
#if !defined( UNDER_CE )
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
SetEvent(boost::detail::winapi::HANDLE_ hEvent);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
ResetEvent(boost::detail::winapi::HANDLE_ hEvent);
#endif
}
#endif
namespace boost {
namespace detail {
namespace winapi {
#if !defined( BOOST_NO_ANSI_APIS )
using ::OpenEventA;
#endif
using ::OpenEventW;
using ::SetEvent;
using ::ResetEvent;
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ EVENT_ALL_ACCESS_ = EVENT_ALL_ACCESS;
const DWORD_ EVENT_MODIFY_STATE_ = EVENT_MODIFY_STATE;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ CREATE_EVENT_INITIAL_SET_ = CREATE_EVENT_INITIAL_SET;
const DWORD_ CREATE_EVENT_MANUAL_RESET_ = CREATE_EVENT_MANUAL_RESET;
#endif
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ EVENT_ALL_ACCESS_ = 0x001F0003;
const DWORD_ EVENT_MODIFY_STATE_ = 0x00000002;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ CREATE_EVENT_INITIAL_SET_ = 0x00000002;
const DWORD_ CREATE_EVENT_MANUAL_RESET_ = 0x00000001;
#endif
#endif // defined( BOOST_USE_WINDOWS_H )
// Undocumented and not present in Windows SDK. Enables NtQueryEvent.
// http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FNT%20Objects%2FEvent%2FNtQueryEvent.html
const DWORD_ EVENT_QUERY_STATE_ = 0x00000001;
const DWORD_ event_all_access = EVENT_ALL_ACCESS_;
const DWORD_ event_modify_state = EVENT_MODIFY_STATE_;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ create_event_initial_set = CREATE_EVENT_INITIAL_SET_;
const DWORD_ create_event_manual_reset = CREATE_EVENT_MANUAL_RESET_;
#endif
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateEventA(SECURITY_ATTRIBUTES_* lpEventAttributes, BOOL_ bManualReset, BOOL_ bInitialState, LPCSTR_ lpName)
{
#if BOOST_PLAT_WINDOWS_RUNTIME && BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ flags = (bManualReset ? create_event_manual_reset : 0u) | (bInitialState ? create_event_initial_set : 0u);
return ::CreateEventExA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpEventAttributes), lpName, flags, event_all_access);
#else
return ::CreateEventA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpEventAttributes), bManualReset, bInitialState, lpName);
#endif
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_FORCEINLINE HANDLE_ CreateEventExA(SECURITY_ATTRIBUTES_* lpEventAttributes, LPCSTR_ lpName, DWORD_ dwFlags, DWORD_ dwDesiredAccess)
{
return ::CreateEventExA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpEventAttributes), lpName, dwFlags, dwDesiredAccess);
}
#endif
#endif
BOOST_FORCEINLINE HANDLE_ CreateEventW(SECURITY_ATTRIBUTES_* lpEventAttributes, BOOL_ bManualReset, BOOL_ bInitialState, LPCWSTR_ lpName)
{
#if BOOST_PLAT_WINDOWS_RUNTIME && BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ flags = (bManualReset ? create_event_manual_reset : 0u) | (bInitialState ? create_event_initial_set : 0u);
return ::CreateEventExW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpEventAttributes), lpName, flags, event_all_access);
#else
return ::CreateEventW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpEventAttributes), bManualReset, bInitialState, lpName);
#endif
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_FORCEINLINE HANDLE_ CreateEventExW(SECURITY_ATTRIBUTES_* lpEventAttributes, LPCWSTR_ lpName, DWORD_ dwFlags, DWORD_ dwDesiredAccess)
{
return ::CreateEventExW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpEventAttributes), lpName, dwFlags, dwDesiredAccess);
}
#endif
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ create_event(SECURITY_ATTRIBUTES_* lpEventAttributes, BOOL_ bManualReset, BOOL_ bInitialState, LPCSTR_ lpName)
{
return winapi::CreateEventA(lpEventAttributes, bManualReset, bInitialState, lpName);
}
BOOST_FORCEINLINE HANDLE_ open_event(DWORD_ dwDesiredAccess, BOOL_ bInheritHandle, LPCSTR_ lpName)
{
return ::OpenEventA(dwDesiredAccess, bInheritHandle, lpName);
}
#endif
BOOST_FORCEINLINE HANDLE_ create_event(SECURITY_ATTRIBUTES_* lpEventAttributes, BOOL_ bManualReset, BOOL_ bInitialState, LPCWSTR_ lpName)
{
return winapi::CreateEventW(lpEventAttributes, bManualReset, bInitialState, lpName);
}
BOOST_FORCEINLINE HANDLE_ open_event(DWORD_ dwDesiredAccess, BOOL_ bInheritHandle, LPCWSTR_ lpName)
{
return ::OpenEventW(dwDesiredAccess, bInheritHandle, lpName);
}
BOOST_FORCEINLINE HANDLE_ create_anonymous_event(SECURITY_ATTRIBUTES_* lpEventAttributes, BOOL_ bManualReset, BOOL_ bInitialState)
{
return winapi::CreateEventW(lpEventAttributes, bManualReset, bInitialState, 0);
}
}
}
}
#endif // BOOST_DETAIL_WINAPI_EVENT_HPP
#endif // BOOST_DETAIL_WINAPI_EVENT_HPP_

View File

@@ -1,535 +1,20 @@
// file_management.hpp --------------------------------------------------------------//
// Copyright 2010 Vicente J. Botet Escriba
// Copyright 2015 Andrey Semashev
// Copyright 2016 Jorge Lodos
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/file_management.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_FILE_MANAGEMENT_HPP
#define BOOST_DETAIL_WINAPI_FILE_MANAGEMENT_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/detail/winapi/limits.hpp>
#include <boost/detail/winapi/time.hpp>
#include <boost/detail/winapi/overlapped.hpp>
#include <boost/winapi/file_management.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateFileA(
boost::detail::winapi::LPCSTR_ lpFileName,
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::DWORD_ dwShareMode,
::_SECURITY_ATTRIBUTES* lpSecurityAttributes,
boost::detail::winapi::DWORD_ dwCreationDisposition,
boost::detail::winapi::DWORD_ dwFlagsAndAttributes,
boost::detail::winapi::HANDLE_ hTemplateFile);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
DeleteFileA(boost::detail::winapi::LPCSTR_ lpFileName);
struct _WIN32_FIND_DATAA;
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
FindFirstFileA(boost::detail::winapi::LPCSTR_ lpFileName, ::_WIN32_FIND_DATAA* lpFindFileData);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
FindNextFileA(boost::detail::winapi::HANDLE_ hFindFile, ::_WIN32_FIND_DATAA* lpFindFileData);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
MoveFileExA(
boost::detail::winapi::LPCSTR_ lpExistingFileName,
boost::detail::winapi::LPCSTR_ lpNewFileName,
boost::detail::winapi::DWORD_ dwFlags);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
GetFileAttributesA(boost::detail::winapi::LPCSTR_ lpFileName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
AreFileApisANSI(BOOST_DETAIL_WINAPI_VOID);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateFileW(
boost::detail::winapi::LPCWSTR_ lpFileName,
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::DWORD_ dwShareMode,
::_SECURITY_ATTRIBUTES* lpSecurityAttributes,
boost::detail::winapi::DWORD_ dwCreationDisposition,
boost::detail::winapi::DWORD_ dwFlagsAndAttributes,
boost::detail::winapi::HANDLE_ hTemplateFile);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
DeleteFileW(boost::detail::winapi::LPCWSTR_ lpFileName);
struct _WIN32_FIND_DATAW;
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
FindFirstFileW(boost::detail::winapi::LPCWSTR_ lpFileName, ::_WIN32_FIND_DATAW* lpFindFileData);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
FindNextFileW(boost::detail::winapi::HANDLE_ hFindFile, ::_WIN32_FIND_DATAW* lpFindFileData);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
MoveFileExW(
boost::detail::winapi::LPCWSTR_ lpExistingFileName,
boost::detail::winapi::LPCWSTR_ lpNewFileName,
boost::detail::winapi::DWORD_ dwFlags);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
GetFileAttributesW(boost::detail::winapi::LPCWSTR_ lpFileName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
FindClose(boost::detail::winapi::HANDLE_ hFindFile);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
GetFileSizeEx(boost::detail::winapi::HANDLE_ hFile, ::_LARGE_INTEGER* lpFileSize);
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
SetFileValidData(boost::detail::winapi::HANDLE_ hFile, boost::detail::winapi::LONGLONG_ ValidDataLength);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
SetEndOfFile(boost::detail::winapi::HANDLE_ hFile);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
LockFile(
boost::detail::winapi::HANDLE_ hFile,
boost::detail::winapi::DWORD_ dwFileOffsetLow,
boost::detail::winapi::DWORD_ dwFileOffsetHigh,
boost::detail::winapi::DWORD_ nNumberOfBytesToLockLow,
boost::detail::winapi::DWORD_ nNumberOfBytesToLockHigh);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
UnlockFile(
boost::detail::winapi::HANDLE_ hFile,
boost::detail::winapi::DWORD_ dwFileOffsetLow,
boost::detail::winapi::DWORD_ dwFileOffsetHigh,
boost::detail::winapi::DWORD_ nNumberOfBytesToUnlockLow,
boost::detail::winapi::DWORD_ nNumberOfBytesToUnlockHigh);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
LockFileEx(
boost::detail::winapi::HANDLE_ hFile,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::DWORD_ dwReserved,
boost::detail::winapi::DWORD_ nNumberOfBytesToLockLow,
boost::detail::winapi::DWORD_ nNumberOfBytesToLockHigh,
::_OVERLAPPED* lpOverlapped);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
UnlockFileEx(
boost::detail::winapi::HANDLE_ hFile,
boost::detail::winapi::DWORD_ dwReserved,
boost::detail::winapi::DWORD_ nNumberOfBytesToUnlockLow,
boost::detail::winapi::DWORD_ nNumberOfBytesToUnlockHigh,
::_OVERLAPPED* lpOverlapped);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
ReadFile(
boost::detail::winapi::HANDLE_ hFile,
boost::detail::winapi::LPVOID_ lpBuffer,
boost::detail::winapi::DWORD_ nNumberOfBytesToRead,
boost::detail::winapi::LPDWORD_ lpNumberOfBytesRead,
::_OVERLAPPED* lpOverlapped);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
WriteFile(
boost::detail::winapi::HANDLE_ hFile,
boost::detail::winapi::LPCVOID_ lpBuffer,
boost::detail::winapi::DWORD_ nNumberOfBytesToWrite,
boost::detail::winapi::LPDWORD_ lpNumberOfBytesWritten,
::_OVERLAPPED* lpOverlapped);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
SetFilePointer(
boost::detail::winapi::HANDLE_ hFile,
boost::detail::winapi::LONG_ lpDistanceToMove,
boost::detail::winapi::PLONG_ lpDistanceToMoveHigh,
boost::detail::winapi::DWORD_ dwMoveMethod);
struct _BY_HANDLE_FILE_INFORMATION;
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
GetFileInformationByHandle(
boost::detail::winapi::HANDLE_ hFile,
::_BY_HANDLE_FILE_INFORMATION* lpFileInformation);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ INVALID_FILE_SIZE_ = INVALID_FILE_SIZE;
const DWORD_ INVALID_SET_FILE_POINTER_ = INVALID_SET_FILE_POINTER;
const DWORD_ INVALID_FILE_ATTRIBUTES_ = INVALID_FILE_ATTRIBUTES;
const DWORD_ FILE_ATTRIBUTE_READONLY_ = FILE_ATTRIBUTE_READONLY;
const DWORD_ FILE_ATTRIBUTE_HIDDEN_ = FILE_ATTRIBUTE_HIDDEN;
const DWORD_ FILE_ATTRIBUTE_SYSTEM_ = FILE_ATTRIBUTE_SYSTEM;
const DWORD_ FILE_ATTRIBUTE_DIRECTORY_ = FILE_ATTRIBUTE_DIRECTORY;
const DWORD_ FILE_ATTRIBUTE_ARCHIVE_ = FILE_ATTRIBUTE_ARCHIVE;
const DWORD_ FILE_ATTRIBUTE_DEVICE_ = FILE_ATTRIBUTE_DEVICE;
const DWORD_ FILE_ATTRIBUTE_NORMAL_ = FILE_ATTRIBUTE_NORMAL;
const DWORD_ FILE_ATTRIBUTE_TEMPORARY_ = FILE_ATTRIBUTE_TEMPORARY;
const DWORD_ FILE_ATTRIBUTE_SPARSE_FILE_ = FILE_ATTRIBUTE_SPARSE_FILE;
const DWORD_ FILE_ATTRIBUTE_REPARSE_POINT_ = FILE_ATTRIBUTE_REPARSE_POINT;
const DWORD_ FILE_ATTRIBUTE_COMPRESSED_ = FILE_ATTRIBUTE_COMPRESSED;
const DWORD_ FILE_ATTRIBUTE_OFFLINE_ = FILE_ATTRIBUTE_OFFLINE;
const DWORD_ FILE_ATTRIBUTE_NOT_CONTENT_INDEXED_ = FILE_ATTRIBUTE_NOT_CONTENT_INDEXED;
const DWORD_ FILE_ATTRIBUTE_ENCRYPTED_ = FILE_ATTRIBUTE_ENCRYPTED;
const DWORD_ CREATE_NEW_ = CREATE_NEW;
const DWORD_ CREATE_ALWAYS_ = CREATE_ALWAYS;
const DWORD_ OPEN_EXISTING_ = OPEN_EXISTING;
const DWORD_ OPEN_ALWAYS_ = OPEN_ALWAYS;
const DWORD_ TRUNCATE_EXISTING_ = TRUNCATE_EXISTING;
const DWORD_ FILE_SHARE_READ_ = FILE_SHARE_READ;
const DWORD_ FILE_SHARE_WRITE_ = FILE_SHARE_WRITE;
const DWORD_ FILE_SHARE_DELETE_ = FILE_SHARE_DELETE;
const DWORD_ FILE_BEGIN_ = FILE_BEGIN;
const DWORD_ FILE_CURRENT_ = FILE_CURRENT;
const DWORD_ FILE_END_ = FILE_END;
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ INVALID_FILE_SIZE_ = ((DWORD_)0xFFFFFFFF);
const DWORD_ INVALID_SET_FILE_POINTER_ = ((DWORD_)-1);
const DWORD_ INVALID_FILE_ATTRIBUTES_ = ((DWORD_)-1);
const DWORD_ FILE_ATTRIBUTE_READONLY_ = 0x00000001;
const DWORD_ FILE_ATTRIBUTE_HIDDEN_ = 0x00000002;
const DWORD_ FILE_ATTRIBUTE_SYSTEM_ = 0x00000004;
const DWORD_ FILE_ATTRIBUTE_DIRECTORY_ = 0x00000010;
const DWORD_ FILE_ATTRIBUTE_ARCHIVE_ = 0x00000020;
const DWORD_ FILE_ATTRIBUTE_DEVICE_ = 0x00000040;
const DWORD_ FILE_ATTRIBUTE_NORMAL_ = 0x00000080;
const DWORD_ FILE_ATTRIBUTE_TEMPORARY_ = 0x00000100;
const DWORD_ FILE_ATTRIBUTE_SPARSE_FILE_ = 0x00000200;
const DWORD_ FILE_ATTRIBUTE_REPARSE_POINT_ = 0x00000400;
const DWORD_ FILE_ATTRIBUTE_COMPRESSED_ = 0x00000800;
const DWORD_ FILE_ATTRIBUTE_OFFLINE_ = 0x00001000;
const DWORD_ FILE_ATTRIBUTE_NOT_CONTENT_INDEXED_ = 0x00002000;
const DWORD_ FILE_ATTRIBUTE_ENCRYPTED_ = 0x00004000;
const DWORD_ CREATE_NEW_ = 1;
const DWORD_ CREATE_ALWAYS_ = 2;
const DWORD_ OPEN_EXISTING_ = 3;
const DWORD_ OPEN_ALWAYS_ = 4;
const DWORD_ TRUNCATE_EXISTING_ = 5;
const DWORD_ FILE_SHARE_READ_ = 0x00000001;
const DWORD_ FILE_SHARE_WRITE_ = 0x00000002;
const DWORD_ FILE_SHARE_DELETE_ = 0x00000004;
const DWORD_ FILE_BEGIN_ = 0;
const DWORD_ FILE_CURRENT_ = 1;
const DWORD_ FILE_END_ = 2;
#endif // defined( BOOST_USE_WINDOWS_H )
// This constant is not defined in Windows SDK up until 6.0A
const DWORD_ FILE_ATTRIBUTE_VIRTUAL_ = 0x00010000;
// These constants are not defined in Windows SDK up until 8.0 and MinGW/MinGW-w64 (as of 2016-02-14).
// They are documented to be supported only since Windows 8/Windows Server 2012
// but defined unconditionally.
const DWORD_ FILE_ATTRIBUTE_INTEGRITY_STREAM_ = 0x00008000;
const DWORD_ FILE_ATTRIBUTE_NO_SCRUB_DATA_ = 0x00020000;
// Undocumented
const DWORD_ FILE_ATTRIBUTE_EA_ = 0x00040000;
#if !defined( BOOST_NO_ANSI_APIS )
using ::DeleteFileA;
using ::MoveFileExA;
using ::GetFileAttributesA;
using ::AreFileApisANSI;
#endif
using ::DeleteFileW;
using ::MoveFileExW;
using ::GetFileAttributesW;
using ::FindClose;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
using ::SetFileValidData;
#endif
using ::SetEndOfFile;
using ::LockFile;
using ::UnlockFile;
using ::SetFilePointer;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateFileA(
LPCSTR_ lpFileName,
DWORD_ dwDesiredAccess,
DWORD_ dwShareMode,
SECURITY_ATTRIBUTES_* lpSecurityAttributes,
DWORD_ dwCreationDisposition,
DWORD_ dwFlagsAndAttributes,
HANDLE_ hTemplateFile)
{
return ::CreateFileA(
lpFileName,
dwDesiredAccess,
dwShareMode,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSecurityAttributes),
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
}
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _WIN32_FIND_DATAA {
DWORD_ dwFileAttributes;
FILETIME_ ftCreationTime;
FILETIME_ ftLastAccessTime;
FILETIME_ ftLastWriteTime;
DWORD_ nFileSizeHigh;
DWORD_ nFileSizeLow;
DWORD_ dwReserved0;
DWORD_ dwReserved1;
CHAR_ cFileName[MAX_PATH_];
CHAR_ cAlternateFileName[14];
#ifdef _MAC
DWORD_ dwFileType;
DWORD_ dwCreatorType;
WORD_ wFinderFlags;
#endif
} WIN32_FIND_DATAA_, *PWIN32_FIND_DATAA_, *LPWIN32_FIND_DATAA_;
BOOST_FORCEINLINE HANDLE_ FindFirstFileA(LPCSTR_ lpFileName, WIN32_FIND_DATAA_* lpFindFileData)
{
return ::FindFirstFileA(lpFileName, reinterpret_cast< ::_WIN32_FIND_DATAA* >(lpFindFileData));
}
BOOST_FORCEINLINE BOOL_ FindNextFileA(HANDLE_ hFindFile, WIN32_FIND_DATAA_* lpFindFileData)
{
return ::FindNextFileA(hFindFile, reinterpret_cast< ::_WIN32_FIND_DATAA* >(lpFindFileData));
}
#endif
BOOST_FORCEINLINE HANDLE_ CreateFileW(
LPCWSTR_ lpFileName,
DWORD_ dwDesiredAccess,
DWORD_ dwShareMode,
SECURITY_ATTRIBUTES_* lpSecurityAttributes,
DWORD_ dwCreationDisposition,
DWORD_ dwFlagsAndAttributes,
HANDLE_ hTemplateFile)
{
return ::CreateFileW(
lpFileName,
dwDesiredAccess,
dwShareMode,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSecurityAttributes),
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
}
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _WIN32_FIND_DATAW {
DWORD_ dwFileAttributes;
FILETIME_ ftCreationTime;
FILETIME_ ftLastAccessTime;
FILETIME_ ftLastWriteTime;
DWORD_ nFileSizeHigh;
DWORD_ nFileSizeLow;
DWORD_ dwReserved0;
DWORD_ dwReserved1;
WCHAR_ cFileName[MAX_PATH_];
WCHAR_ cAlternateFileName[14];
#ifdef _MAC
DWORD_ dwFileType;
DWORD_ dwCreatorType;
WORD_ wFinderFlags;
#endif
} WIN32_FIND_DATAW_, *PWIN32_FIND_DATAW_, *LPWIN32_FIND_DATAW_;
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _BY_HANDLE_FILE_INFORMATION {
DWORD_ dwFileAttributes;
FILETIME_ ftCreationTime;
FILETIME_ ftLastAccessTime;
FILETIME_ ftLastWriteTime;
DWORD_ dwVolumeSerialNumber;
DWORD_ nFileSizeHigh;
DWORD_ nFileSizeLow;
DWORD_ nNumberOfLinks;
DWORD_ nFileIndexHigh;
DWORD_ nFileIndexLow;
} BY_HANDLE_FILE_INFORMATION_, *PBY_HANDLE_FILE_INFORMATION_, *LPBY_HANDLE_FILE_INFORMATION_;
BOOST_FORCEINLINE HANDLE_ FindFirstFileW(LPCWSTR_ lpFileName, WIN32_FIND_DATAW_* lpFindFileData)
{
return ::FindFirstFileW(lpFileName, reinterpret_cast< ::_WIN32_FIND_DATAW* >(lpFindFileData));
}
BOOST_FORCEINLINE BOOL_ FindNextFileW(HANDLE_ hFindFile, WIN32_FIND_DATAW_* lpFindFileData)
{
return ::FindNextFileW(hFindFile, reinterpret_cast< ::_WIN32_FIND_DATAW* >(lpFindFileData));
}
BOOST_FORCEINLINE BOOL_ GetFileSizeEx(HANDLE_ hFile, LARGE_INTEGER_* lpFileSize)
{
return ::GetFileSizeEx(hFile, reinterpret_cast< ::_LARGE_INTEGER* >(lpFileSize));
}
BOOST_FORCEINLINE BOOL_ LockFileEx(
HANDLE_ hFile,
DWORD_ dwFlags,
DWORD_ dwReserved,
DWORD_ nNumberOfBytesToLockLow,
DWORD_ nNumberOfBytesToLockHigh,
OVERLAPPED_* lpOverlapped)
{
return ::LockFileEx(hFile, dwFlags, dwReserved, nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
}
BOOST_FORCEINLINE BOOL_ UnlockFileEx(
HANDLE_ hFile,
DWORD_ dwReserved,
DWORD_ nNumberOfBytesToUnlockLow,
DWORD_ nNumberOfBytesToUnlockHigh,
OVERLAPPED_* lpOverlapped)
{
return ::UnlockFileEx(hFile, dwReserved, nNumberOfBytesToUnlockLow, nNumberOfBytesToUnlockHigh, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
}
BOOST_FORCEINLINE BOOL_ ReadFile(
HANDLE_ hFile,
LPVOID_ lpBuffer,
DWORD_ nNumberOfBytesToWrite,
LPDWORD_ lpNumberOfBytesWritten,
OVERLAPPED_* lpOverlapped)
{
return ::ReadFile(hFile, lpBuffer, nNumberOfBytesToWrite, lpNumberOfBytesWritten, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
}
BOOST_FORCEINLINE BOOL_ WriteFile(
HANDLE_ hFile,
LPCVOID_ lpBuffer,
DWORD_ nNumberOfBytesToWrite,
LPDWORD_ lpNumberOfBytesWritten,
OVERLAPPED_* lpOverlapped)
{
return ::WriteFile(hFile, lpBuffer, nNumberOfBytesToWrite, lpNumberOfBytesWritten, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
}
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ create_file(
LPCSTR_ lpFileName,
DWORD_ dwDesiredAccess,
DWORD_ dwShareMode,
SECURITY_ATTRIBUTES_* lpSecurityAttributes,
DWORD_ dwCreationDisposition,
DWORD_ dwFlagsAndAttributes,
HANDLE_ hTemplateFile)
{
return ::CreateFileA(
lpFileName,
dwDesiredAccess,
dwShareMode,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSecurityAttributes),
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
}
BOOST_FORCEINLINE BOOL_ delete_file(LPCSTR_ lpFileName)
{
return ::DeleteFileA(lpFileName);
}
BOOST_FORCEINLINE HANDLE_ find_first_file(LPCSTR_ lpFileName, WIN32_FIND_DATAA_* lpFindFileData)
{
return ::FindFirstFileA(lpFileName, reinterpret_cast< ::_WIN32_FIND_DATAA* >(lpFindFileData));
}
BOOST_FORCEINLINE BOOL_ find_next_file(HANDLE_ hFindFile, WIN32_FIND_DATAA_* lpFindFileData)
{
return ::FindNextFileA(hFindFile, reinterpret_cast< ::_WIN32_FIND_DATAA* >(lpFindFileData));
}
BOOST_FORCEINLINE BOOL_ move_file(LPCSTR_ lpExistingFileName, LPCSTR_ lpNewFileName, DWORD_ dwFlags)
{
return ::MoveFileExA(lpExistingFileName, lpNewFileName, dwFlags);
}
BOOST_FORCEINLINE DWORD_ get_file_attributes(LPCSTR_ lpFileName)
{
return ::GetFileAttributesA(lpFileName);
}
#endif
BOOST_FORCEINLINE HANDLE_ create_file(
LPCWSTR_ lpFileName,
DWORD_ dwDesiredAccess,
DWORD_ dwShareMode,
SECURITY_ATTRIBUTES_* lpSecurityAttributes,
DWORD_ dwCreationDisposition,
DWORD_ dwFlagsAndAttributes,
HANDLE_ hTemplateFile)
{
return ::CreateFileW(
lpFileName,
dwDesiredAccess,
dwShareMode,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSecurityAttributes),
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
}
BOOST_FORCEINLINE BOOL_ delete_file(LPCWSTR_ lpFileName)
{
return ::DeleteFileW(lpFileName);
}
BOOST_FORCEINLINE HANDLE_ find_first_file(LPCWSTR_ lpFileName, WIN32_FIND_DATAW_* lpFindFileData)
{
return ::FindFirstFileW(lpFileName, reinterpret_cast< ::_WIN32_FIND_DATAW* >(lpFindFileData));
}
BOOST_FORCEINLINE BOOL_ find_next_file(HANDLE_ hFindFile, WIN32_FIND_DATAW_* lpFindFileData)
{
return ::FindNextFileW(hFindFile, reinterpret_cast< ::_WIN32_FIND_DATAW* >(lpFindFileData));
}
BOOST_FORCEINLINE BOOL_ move_file(LPCWSTR_ lpExistingFileName, LPCWSTR_ lpNewFileName, DWORD_ dwFlags)
{
return ::MoveFileExW(lpExistingFileName, lpNewFileName, dwFlags);
}
BOOST_FORCEINLINE DWORD_ get_file_attributes(LPCWSTR_ lpFileName)
{
return ::GetFileAttributesW(lpFileName);
}
BOOST_FORCEINLINE BOOL_ GetFileInformationByHandle(HANDLE_ h, BY_HANDLE_FILE_INFORMATION_* info)
{
return ::GetFileInformationByHandle(h, reinterpret_cast< ::_BY_HANDLE_FILE_INFORMATION* >(info));
}
}
}
}
#endif // BOOST_DETAIL_WINAPI_FILE_MANAGEMENT_HPP

View File

@@ -1,238 +1,20 @@
// file_mapping.hpp --------------------------------------------------------------//
// Copyright 2010 Vicente J. Botet Escriba
// Copyright 2015 Andrey Semashev
// Copyright 2016 Jorge Lodos
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/file_mapping.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_FILE_MAPPING_HPP
#define BOOST_DETAIL_WINAPI_FILE_MAPPING_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/file_mapping.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateFileMappingA(
boost::detail::winapi::HANDLE_ hFile,
::_SECURITY_ATTRIBUTES* lpFileMappingAttributes,
boost::detail::winapi::DWORD_ flProtect,
boost::detail::winapi::DWORD_ dwMaximumSizeHigh,
boost::detail::winapi::DWORD_ dwMaximumSizeLow,
boost::detail::winapi::LPCSTR_ lpName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
OpenFileMappingA(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::LPCSTR_ lpName);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateFileMappingW(
boost::detail::winapi::HANDLE_ hFile,
::_SECURITY_ATTRIBUTES* lpFileMappingAttributes,
boost::detail::winapi::DWORD_ flProtect,
boost::detail::winapi::DWORD_ dwMaximumSizeHigh,
boost::detail::winapi::DWORD_ dwMaximumSizeLow,
boost::detail::winapi::LPCWSTR_ lpName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
OpenFileMappingW(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::LPCWSTR_ lpName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::LPVOID_ WINAPI
MapViewOfFile(
boost::detail::winapi::HANDLE_ hFileMappingObject,
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::DWORD_ dwFileOffsetHigh,
boost::detail::winapi::DWORD_ dwFileOffsetLow,
boost::detail::winapi::SIZE_T_ dwNumberOfBytesToMap);
BOOST_SYMBOL_IMPORT boost::detail::winapi::LPVOID_ WINAPI
MapViewOfFileEx(
boost::detail::winapi::HANDLE_ hFileMappingObject,
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::DWORD_ dwFileOffsetHigh,
boost::detail::winapi::DWORD_ dwFileOffsetLow,
boost::detail::winapi::SIZE_T_ dwNumberOfBytesToMap,
boost::detail::winapi::LPVOID_ lpBaseAddress);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
FlushViewOfFile(
boost::detail::winapi::LPCVOID_ lpBaseAddress,
boost::detail::winapi::SIZE_T_ dwNumberOfBytesToFlush);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
UnmapViewOfFile(boost::detail::winapi::LPCVOID_ lpBaseAddress);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ SEC_FILE_ = SEC_FILE;
const DWORD_ SEC_IMAGE_ = SEC_IMAGE;
const DWORD_ SEC_RESERVE_ = SEC_RESERVE;
const DWORD_ SEC_COMMIT_ = SEC_COMMIT;
const DWORD_ SEC_NOCACHE_ = SEC_NOCACHE;
// These permission flags are undocumented and some of them are equivalent to the FILE_MAP_* flags.
// SECTION_QUERY enables NtQuerySection.
// http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FNT%20Objects%2FSection%2FNtQuerySection.html
const DWORD_ SECTION_QUERY_ = SECTION_QUERY;
const DWORD_ SECTION_MAP_WRITE_ = SECTION_MAP_WRITE;
const DWORD_ SECTION_MAP_READ_ = SECTION_MAP_READ;
const DWORD_ SECTION_MAP_EXECUTE_ = SECTION_MAP_EXECUTE;
const DWORD_ SECTION_EXTEND_SIZE_ = SECTION_EXTEND_SIZE;
const DWORD_ SECTION_ALL_ACCESS_ = SECTION_ALL_ACCESS;
const DWORD_ FILE_MAP_COPY_ = FILE_MAP_COPY;
const DWORD_ FILE_MAP_WRITE_ = FILE_MAP_WRITE;
const DWORD_ FILE_MAP_READ_ = FILE_MAP_READ;
const DWORD_ FILE_MAP_ALL_ACCESS_ = FILE_MAP_ALL_ACCESS;
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ SEC_FILE_ = 0x800000;
const DWORD_ SEC_IMAGE_ = 0x1000000;
const DWORD_ SEC_RESERVE_ = 0x4000000;
const DWORD_ SEC_COMMIT_ = 0x8000000;
const DWORD_ SEC_NOCACHE_ = 0x10000000;
// These permission flags are undocumented and some of them are equivalent to the FILE_MAP_* flags.
// SECTION_QUERY enables NtQuerySection.
// http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FNT%20Objects%2FSection%2FNtQuerySection.html
const DWORD_ SECTION_QUERY_ = 0x00000001;
const DWORD_ SECTION_MAP_WRITE_ = 0x00000002;
const DWORD_ SECTION_MAP_READ_ = 0x00000004;
const DWORD_ SECTION_MAP_EXECUTE_ = 0x00000008;
const DWORD_ SECTION_EXTEND_SIZE_ = 0x00000010;
const DWORD_ SECTION_ALL_ACCESS_ = 0x000F001F; // STANDARD_RIGHTS_REQUIRED | SECTION_*
const DWORD_ FILE_MAP_COPY_ = SECTION_QUERY_;
const DWORD_ FILE_MAP_WRITE_ = SECTION_MAP_WRITE_;
const DWORD_ FILE_MAP_READ_ = SECTION_MAP_READ_;
const DWORD_ FILE_MAP_ALL_ACCESS_ = SECTION_ALL_ACCESS_;
#endif // defined( BOOST_USE_WINDOWS_H )
// These constants are not defined in Windows SDK up until the one shipped with MSVC 8 and MinGW (as of 2016-02-14)
const DWORD_ SECTION_MAP_EXECUTE_EXPLICIT_ = 0x00000020; // not included in SECTION_ALL_ACCESS
const DWORD_ FILE_MAP_EXECUTE_ = SECTION_MAP_EXECUTE_EXPLICIT_; // not included in FILE_MAP_ALL_ACCESS
// These constants are not defined in Windows SDK up until 6.0A and MinGW (as of 2016-02-14)
const DWORD_ SEC_PROTECTED_IMAGE_ = 0x2000000;
const DWORD_ SEC_WRITECOMBINE_ = 0x40000000;
const DWORD_ SEC_LARGE_PAGES_ = 0x80000000;
const DWORD_ SEC_IMAGE_NO_EXECUTE_ = (SEC_IMAGE_ | SEC_NOCACHE_);
#if !defined( BOOST_NO_ANSI_APIS )
using ::OpenFileMappingA;
#endif
using ::OpenFileMappingW;
using ::MapViewOfFile;
using ::MapViewOfFileEx;
using ::FlushViewOfFile;
using ::UnmapViewOfFile;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateFileMappingA(
HANDLE_ hFile,
SECURITY_ATTRIBUTES_* lpFileMappingAttributes,
DWORD_ flProtect,
DWORD_ dwMaximumSizeHigh,
DWORD_ dwMaximumSizeLow,
LPCSTR_ lpName)
{
return ::CreateFileMappingA(
hFile,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpFileMappingAttributes),
flProtect,
dwMaximumSizeHigh,
dwMaximumSizeLow,
lpName);
}
#endif
BOOST_FORCEINLINE HANDLE_ CreateFileMappingW(
HANDLE_ hFile,
SECURITY_ATTRIBUTES_* lpFileMappingAttributes,
DWORD_ flProtect,
DWORD_ dwMaximumSizeHigh,
DWORD_ dwMaximumSizeLow,
LPCWSTR_ lpName)
{
return ::CreateFileMappingW(
hFile,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpFileMappingAttributes),
flProtect,
dwMaximumSizeHigh,
dwMaximumSizeLow,
lpName);
}
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ create_file_mapping(
HANDLE_ hFile,
SECURITY_ATTRIBUTES_* lpFileMappingAttributes,
DWORD_ flProtect,
DWORD_ dwMaximumSizeHigh,
DWORD_ dwMaximumSizeLow,
LPCSTR_ lpName)
{
return ::CreateFileMappingA(
hFile,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpFileMappingAttributes),
flProtect,
dwMaximumSizeHigh,
dwMaximumSizeLow,
lpName);
}
BOOST_FORCEINLINE HANDLE_ open_file_mapping(DWORD_ dwDesiredAccess, BOOL_ bInheritHandle, LPCSTR_ lpName)
{
return ::OpenFileMappingA(dwDesiredAccess, bInheritHandle, lpName);
}
#endif
BOOST_FORCEINLINE HANDLE_ create_file_mapping(
HANDLE_ hFile,
SECURITY_ATTRIBUTES_* lpFileMappingAttributes,
DWORD_ flProtect,
DWORD_ dwMaximumSizeHigh,
DWORD_ dwMaximumSizeLow,
LPCWSTR_ lpName)
{
return ::CreateFileMappingW(
hFile,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpFileMappingAttributes),
flProtect,
dwMaximumSizeHigh,
dwMaximumSizeLow,
lpName);
}
BOOST_FORCEINLINE HANDLE_ open_file_mapping(DWORD_ dwDesiredAccess, BOOL_ bInheritHandle, LPCWSTR_ lpName)
{
return ::OpenFileMappingW(dwDesiredAccess, bInheritHandle, lpName);
}
}
}
}
#endif // BOOST_DETAIL_WINAPI_FILE_MAPPING_HPP

View File

@@ -1,34 +1,20 @@
// 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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_current_process.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP
#define BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/get_current_process.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.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

View File

@@ -1,33 +1,20 @@
// 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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_current_process_id.hpp instead.
*/
#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>
#include <boost/winapi/get_current_process_id.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.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

View File

@@ -1,34 +1,20 @@
// 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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_current_thread.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP
#define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/get_current_thread.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.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

View File

@@ -1,34 +1,20 @@
// 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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_current_thread_id.hpp instead.
*/
#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>
#include <boost/winapi/get_current_thread_id.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.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

View File

@@ -1,33 +1,20 @@
// get_last_error.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_last_error.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_LAST_ERROR_HPP
#define BOOST_DETAIL_WINAPI_GET_LAST_ERROR_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/get_last_error.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.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 GetLastError(BOOST_DETAIL_WINAPI_VOID);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
using ::GetLastError;
}
}
}
#endif // BOOST_DETAIL_WINAPI_GET_LAST_ERROR_HPP

View File

@@ -1,60 +1,20 @@
// get_process_times.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_process_times.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP
#define BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP
#include <boost/detail/winapi/config.hpp>
#include <boost/winapi/get_process_times.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
// Windows CE does not define GetProcessTimes
#if !defined( UNDER_CE )
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/detail/winapi/time.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
GetProcessTimes(
boost::detail::winapi::HANDLE_ hProcess,
::_FILETIME* lpCreationTime,
::_FILETIME* lpExitTime,
::_FILETIME* lpKernelTime,
::_FILETIME* lpUserTime);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
BOOST_FORCEINLINE BOOL_ GetProcessTimes(
HANDLE_ hProcess,
LPFILETIME_ lpCreationTime,
LPFILETIME_ lpExitTime,
LPFILETIME_ lpKernelTime,
LPFILETIME_ lpUserTime)
{
return ::GetProcessTimes(
hProcess,
reinterpret_cast< ::_FILETIME* >(lpCreationTime),
reinterpret_cast< ::_FILETIME* >(lpExitTime),
reinterpret_cast< ::_FILETIME* >(lpKernelTime),
reinterpret_cast< ::_FILETIME* >(lpUserTime));
}
}
}
}
#endif // !defined( UNDER_CE )
#endif // BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP

View File

@@ -1,63 +1,20 @@
// get_system_directory.hpp --------------------------------------------------------------//
// Copyright 2016 Klemens D. Morgenstern
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_system_directory.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_SYSTEM_DIRECTORY_HPP_
#define BOOST_DETAIL_WINAPI_GET_SYSTEM_DIRECTORY_HPP_
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/predef/platform.h>
#include <boost/winapi/get_system_directory.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_PLAT_WINDOWS_DESKTOP
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::UINT_ WINAPI
GetSystemDirectoryA(
boost::detail::winapi::LPSTR_ lpBuffer,
boost::detail::winapi::UINT_ uSize);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::UINT_ WINAPI
GetSystemDirectoryW(
boost::detail::winapi::LPWSTR_ lpBuffer,
boost::detail::winapi::UINT_ uSize);
} // extern "C"
#endif
namespace boost {
namespace detail {
namespace winapi {
#if !defined( BOOST_NO_ANSI_APIS )
using ::GetSystemDirectoryA;
#endif
using ::GetSystemDirectoryW;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE UINT_ get_system_directory(LPSTR_ lpBuffer, UINT_ uSize)
{
return ::GetSystemDirectoryA(lpBuffer, uSize);
}
#endif
BOOST_FORCEINLINE UINT_ get_system_directory(LPWSTR_ lpBuffer, UINT_ uSize)
{
return ::GetSystemDirectoryW(lpBuffer, uSize);
}
}
}
}
#endif // BOOST_PLAT_WINDOWS_DESKTOP
#endif // BOOST_DETAIL_WINAPI_GET_SYSTEM_DIRECTORY_HPP_

View File

@@ -1,55 +1,20 @@
// get_thread_times.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_thread_times.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
#define BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/detail/winapi/time.hpp>
#include <boost/winapi/get_thread_times.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.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
GetThreadTimes(
boost::detail::winapi::HANDLE_ hThread,
::_FILETIME* lpCreationTime,
::_FILETIME* lpExitTime,
::_FILETIME* lpKernelTime,
::_FILETIME* lpUserTime);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
BOOST_FORCEINLINE BOOL_ GetThreadTimes(
HANDLE_ hThread,
LPFILETIME_ lpCreationTime,
LPFILETIME_ lpExitTime,
LPFILETIME_ lpKernelTime,
LPFILETIME_ lpUserTime)
{
return ::GetThreadTimes(
hThread,
reinterpret_cast< ::_FILETIME* >(lpCreationTime),
reinterpret_cast< ::_FILETIME* >(lpExitTime),
reinterpret_cast< ::_FILETIME* >(lpKernelTime),
reinterpret_cast< ::_FILETIME* >(lpUserTime));
}
}
}
}
#endif // BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP

View File

@@ -1,62 +1,20 @@
// handle_info.hpp --------------------------------------------------------------//
// Copyright 2016 Klemens D. Morgenstern
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/handle_info.hpp instead.
*/
#ifndef BOOST_DETAIL_HANDLE_INFO_HPP_
#define BOOST_DETAIL_HANDLE_INFO_HPP_
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/predef/platform.h>
#include <boost/winapi/handle_info.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_PLAT_WINDOWS_DESKTOP
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
GetHandleInformation(
boost::detail::winapi::HANDLE_ hObject,
boost::detail::winapi::LPDWORD_ lpdwFlags);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
SetHandleInformation(
boost::detail::winapi::HANDLE_ hObject,
boost::detail::winapi::DWORD_ dwMask,
boost::detail::winapi::DWORD_ dwFlags);
} // extern "C"
#endif
namespace boost {
namespace detail {
namespace winapi {
using ::GetHandleInformation;
using ::SetHandleInformation;
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ HANDLE_FLAG_INHERIT_ = HANDLE_FLAG_INHERIT;
const DWORD_ HANDLE_FLAG_PROTECT_FROM_CLOSE_ = HANDLE_FLAG_PROTECT_FROM_CLOSE;
#else
const DWORD_ HANDLE_FLAG_INHERIT_ = 0x1;
const DWORD_ HANDLE_FLAG_PROTECT_FROM_CLOSE_ = 0x2;
#endif
}
}
}
#endif // BOOST_PLAT_WINDOWS_DESKTOP
#endif // BOOST_DETAIL_HANDLE_INFO_HPP_

View File

@@ -1,73 +1,20 @@
// handles.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/handles.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_HANDLES_HPP
#define BOOST_DETAIL_WINAPI_HANDLES_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/handles.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.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
CloseHandle(boost::detail::winapi::HANDLE_ handle);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
DuplicateHandle(
boost::detail::winapi::HANDLE_ hSourceProcessHandle,
boost::detail::winapi::HANDLE_ hSourceHandle,
boost::detail::winapi::HANDLE_ hTargetProcessHandle,
boost::detail::winapi::HANDLE_* lpTargetHandle,
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::DWORD_ dwOptions);
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN10
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
CompareObjectHandles(
boost::detail::winapi::HANDLE_ hFirstObjectHandle,
boost::detail::winapi::HANDLE_ hSecondObjectHandle);
#endif
#endif
namespace boost {
namespace detail {
namespace winapi {
using ::CloseHandle;
using ::DuplicateHandle;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN10
using ::CompareObjectHandles;
#endif
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ DUPLICATE_CLOSE_SOURCE_ = DUPLICATE_CLOSE_SOURCE;
const DWORD_ DUPLICATE_SAME_ACCESS_ = DUPLICATE_SAME_ACCESS;
const HANDLE_ INVALID_HANDLE_VALUE_ = INVALID_HANDLE_VALUE;
#else
const DWORD_ DUPLICATE_CLOSE_SOURCE_ = 1;
const DWORD_ DUPLICATE_SAME_ACCESS_ = 2;
const HANDLE_ INVALID_HANDLE_VALUE_ = (HANDLE_)(-1);
#endif
const DWORD_ duplicate_close_source = DUPLICATE_CLOSE_SOURCE_;
const DWORD_ duplicate_same_access = DUPLICATE_SAME_ACCESS_;
const HANDLE_ invalid_handle_value = INVALID_HANDLE_VALUE_;
}
}
}
#endif // BOOST_DETAIL_WINAPI_HANDLES_HPP

View File

@@ -1,72 +1,20 @@
// heap_memory.hpp --------------------------------------------------------------//
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/heap_memory.hpp instead.
*/
// Copyright 2010 Vicente J. Botet Escriba
// Copyright 2015 Andrey Semashev
#ifndef BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP_
#define BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP_
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP
#define BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/heap_memory.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
#undef HeapAlloc
extern "C" {
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
GetProcessHeap(BOOST_DETAIL_WINAPI_VOID);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
GetProcessHeaps(boost::detail::winapi::DWORD_ NumberOfHeaps, boost::detail::winapi::PHANDLE_ ProcessHeaps);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
HeapCreate(
boost::detail::winapi::DWORD_ flOptions,
boost::detail::winapi::SIZE_T_ dwInitialSize,
boost::detail::winapi::SIZE_T_ dwMaximumSize);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
HeapDestroy(boost::detail::winapi::HANDLE_ hHeap);
BOOST_SYMBOL_IMPORT boost::detail::winapi::LPVOID_ WINAPI
HeapAlloc(
boost::detail::winapi::HANDLE_ hHeap,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::SIZE_T_ dwBytes);
BOOST_SYMBOL_IMPORT boost::detail::winapi::LPVOID_ WINAPI
HeapReAlloc(
boost::detail::winapi::HANDLE_ hHeap,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::LPVOID_ lpMem,
boost::detail::winapi::SIZE_T_ dwBytes);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
HeapFree(
boost::detail::winapi::HANDLE_ hHeap,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::LPVOID_ lpMem);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
using ::GetProcessHeap;
using ::GetProcessHeaps;
using ::HeapCreate;
using ::HeapDestroy;
using ::HeapAlloc;
using ::HeapReAlloc;
using ::HeapFree;
}
}
}
#endif // BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP
#endif // BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP_

View File

@@ -1,123 +1,22 @@
// init_once.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/init_once.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_INIT_ONCE_HPP
#define BOOST_DETAIL_WINAPI_INIT_ONCE_HPP
#include <boost/detail/winapi/config.hpp>
#include <boost/winapi/init_once.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#include <boost/detail/winapi/basic_types.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if defined( BOOST_WINAPI_IS_MINGW_W64 )
struct _RTL_RUN_ONCE;
#else
union _RTL_RUN_ONCE;
#endif
typedef boost::detail::winapi::BOOL_
(WINAPI *PINIT_ONCE_FN) (
::_RTL_RUN_ONCE* InitOnce,
boost::detail::winapi::PVOID_ Parameter,
boost::detail::winapi::PVOID_ *Context);
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
InitOnceInitialize(::_RTL_RUN_ONCE* InitOnce);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
InitOnceExecuteOnce(
::_RTL_RUN_ONCE* InitOnce,
::PINIT_ONCE_FN InitFn,
boost::detail::winapi::PVOID_ Parameter,
boost::detail::winapi::LPVOID_ *Context);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
InitOnceBeginInitialize(
::_RTL_RUN_ONCE* lpInitOnce,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::PBOOL_ fPending,
boost::detail::winapi::LPVOID_ *lpContext);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
InitOnceComplete(
::_RTL_RUN_ONCE* lpInitOnce,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::LPVOID_ lpContext);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
typedef union BOOST_DETAIL_WINAPI_MAY_ALIAS _RTL_RUN_ONCE {
PVOID_ Ptr;
} INIT_ONCE_, *PINIT_ONCE_, *LPINIT_ONCE_;
extern "C" {
typedef BOOL_ (WINAPI *PINIT_ONCE_FN_) (PINIT_ONCE_ lpInitOnce, PVOID_ Parameter, PVOID_ *Context);
}
BOOST_FORCEINLINE VOID_ InitOnceInitialize(PINIT_ONCE_ lpInitOnce)
{
::InitOnceInitialize(reinterpret_cast< ::_RTL_RUN_ONCE* >(lpInitOnce));
}
BOOST_FORCEINLINE BOOL_ InitOnceExecuteOnce(PINIT_ONCE_ lpInitOnce, PINIT_ONCE_FN_ InitFn, PVOID_ Parameter, LPVOID_ *Context)
{
return ::InitOnceExecuteOnce(reinterpret_cast< ::_RTL_RUN_ONCE* >(lpInitOnce), reinterpret_cast< ::PINIT_ONCE_FN >(InitFn), Parameter, Context);
}
BOOST_FORCEINLINE BOOL_ InitOnceBeginInitialize(PINIT_ONCE_ lpInitOnce, DWORD_ dwFlags, PBOOL_ fPending, LPVOID_ *lpContext)
{
return ::InitOnceBeginInitialize(reinterpret_cast< ::_RTL_RUN_ONCE* >(lpInitOnce), dwFlags, fPending, lpContext);
}
BOOST_FORCEINLINE BOOL_ InitOnceComplete(PINIT_ONCE_ lpInitOnce, DWORD_ dwFlags, LPVOID_ lpContext)
{
return ::InitOnceComplete(reinterpret_cast< ::_RTL_RUN_ONCE* >(lpInitOnce), dwFlags, lpContext);
}
#if defined( BOOST_USE_WINDOWS_H )
#define BOOST_DETAIL_WINAPI_INIT_ONCE_STATIC_INIT INIT_ONCE_STATIC_INIT
const DWORD_ INIT_ONCE_ASYNC_ = INIT_ONCE_ASYNC;
const DWORD_ INIT_ONCE_CHECK_ONLY_ = INIT_ONCE_CHECK_ONLY;
const DWORD_ INIT_ONCE_INIT_FAILED_ = INIT_ONCE_INIT_FAILED;
const DWORD_ INIT_ONCE_CTX_RESERVED_BITS_ = INIT_ONCE_CTX_RESERVED_BITS;
#else // defined( BOOST_USE_WINDOWS_H )
#define BOOST_DETAIL_WINAPI_INIT_ONCE_STATIC_INIT {0}
const DWORD_ INIT_ONCE_ASYNC_ = 0x00000002UL;
const DWORD_ INIT_ONCE_CHECK_ONLY_ = 0x00000001UL;
const DWORD_ INIT_ONCE_INIT_FAILED_ = 0x00000004UL;
const DWORD_ INIT_ONCE_CTX_RESERVED_BITS_ = 2;
#endif // defined( BOOST_USE_WINDOWS_H )
const DWORD_ init_once_async = INIT_ONCE_ASYNC_;
const DWORD_ init_once_check_only = INIT_ONCE_CHECK_ONLY_;
const DWORD_ init_once_init_failed = INIT_ONCE_INIT_FAILED_;
const DWORD_ init_once_ctx_reserved_bits = INIT_ONCE_CTX_RESERVED_BITS_;
}
}
}
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#define BOOST_DETAIL_WINAPI_INIT_ONCE_STATIC_INIT BOOST_WINAPI_INIT_ONCE_STATIC_INIT
#endif // BOOST_DETAIL_WINAPI_INIT_ONCE_HPP

View File

@@ -1,119 +1,20 @@
// jobs.hpp --------------------------------------------------------------//
// Copyright 2016 Klemens D. Morgenstern
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/jobs.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_JOBS_HPP_
#define BOOST_DETAIL_WINAPI_JOBS_HPP_
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/detail/winapi/access_rights.hpp>
#include <boost/winapi/jobs.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI CreateJobObjectA(
::_SECURITY_ATTRIBUTES* lpJobAttributes,
boost::detail::winapi::LPCSTR_ lpName);
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI CreateJobObjectW(
::_SECURITY_ATTRIBUTES* lpJobAttributes,
boost::detail::winapi::LPCWSTR_ lpName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI AssignProcessToJobObject(
boost::detail::winapi::HANDLE_ hJob,
boost::detail::winapi::HANDLE_ hProcess);
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI IsProcessInJob(
boost::detail::winapi::HANDLE_ ProcessHandle,
boost::detail::winapi::HANDLE_ JobHandle,
boost::detail::winapi::PBOOL_ Result);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI TerminateJobObject(
boost::detail::winapi::HANDLE_ hJob,
boost::detail::winapi::UINT_ uExitCode);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI OpenJobObjectA(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandles,
boost::detail::winapi::LPCSTR_ lpName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI OpenJobObjectW(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandles,
boost::detail::winapi::LPCWSTR_ lpName);
} // extern "C"
#endif // !defined( BOOST_USE_WINDOWS_H )
namespace boost { namespace detail { namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ JOB_OBJECT_ASSIGN_PROCESS_ = JOB_OBJECT_ASSIGN_PROCESS;
const DWORD_ JOB_OBJECT_SET_ATTRIBUTES_ = JOB_OBJECT_SET_ATTRIBUTES;
const DWORD_ JOB_OBJECT_QUERY_ = JOB_OBJECT_QUERY;
const DWORD_ JOB_OBJECT_TERMINATE_ = JOB_OBJECT_TERMINATE;
const DWORD_ JOB_OBJECT_SET_SECURITY_ATTRIBUTES_ = JOB_OBJECT_SET_SECURITY_ATTRIBUTES;
const DWORD_ JOB_OBJECT_ALL_ACCESS_ = JOB_OBJECT_ALL_ACCESS;
#else
const DWORD_ JOB_OBJECT_ASSIGN_PROCESS_ = 0x0001;
const DWORD_ JOB_OBJECT_SET_ATTRIBUTES_ = 0x0002;
const DWORD_ JOB_OBJECT_QUERY_ = 0x0004;
const DWORD_ JOB_OBJECT_TERMINATE_ = 0x0008;
const DWORD_ JOB_OBJECT_SET_SECURITY_ATTRIBUTES_ = 0x0010;
const DWORD_ JOB_OBJECT_ALL_ACCESS_ = (STANDARD_RIGHTS_REQUIRED_ | SYNCHRONIZE_ | 0x1F);
#endif
#if !defined( BOOST_NO_ANSI_APIS )
using ::OpenJobObjectA;
#endif
using ::OpenJobObjectW;
using ::AssignProcessToJobObject;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
using ::IsProcessInJob;
#endif
using ::TerminateJobObject;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateJobObjectA(LPSECURITY_ATTRIBUTES_ lpJobAttributes, LPCSTR_ lpName)
{
return ::CreateJobObjectA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpJobAttributes), lpName);
}
BOOST_FORCEINLINE HANDLE_ create_job_object(LPSECURITY_ATTRIBUTES_ lpJobAttributes, LPCSTR_ lpName)
{
return ::CreateJobObjectA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpJobAttributes), lpName);
}
BOOST_FORCEINLINE HANDLE_ open_job_object(DWORD_ dwDesiredAccess, BOOL_ bInheritHandles, LPCSTR_ lpName)
{
return ::OpenJobObjectA(dwDesiredAccess, bInheritHandles, lpName);
}
#endif // !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateJobObjectW(LPSECURITY_ATTRIBUTES_ lpJobAttributes, LPCWSTR_ lpName)
{
return ::CreateJobObjectW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpJobAttributes), lpName);
}
BOOST_FORCEINLINE HANDLE_ create_job_object(LPSECURITY_ATTRIBUTES_ lpJobAttributes, LPCWSTR_ lpName)
{
return ::CreateJobObjectW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpJobAttributes), lpName);
}
BOOST_FORCEINLINE HANDLE_ open_job_object(DWORD_ dwDesiredAccess, BOOL_ bInheritHandles, LPCWSTR_ lpName)
{
return OpenJobObjectW(dwDesiredAccess, bInheritHandles, lpName);
}
} // namespace winapi
} // namespace detail
} // namespace boost
#endif // BOOST_DETAIL_WINAPI_JOBS_HPP_

View File

@@ -1,51 +1,20 @@
// limits.hpp --------------------------------------------------------------//
// Copyright 2016 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/limits.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_LIMITS_HPP_
#define BOOST_DETAIL_WINAPI_LIMITS_HPP_
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/limits.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
namespace boost {
namespace detail {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ MAX_PATH_ = MAX_PATH;
#else
const DWORD_ MAX_PATH_ = 260;
#endif
#if defined( BOOST_USE_WINDOWS_H ) && !defined( BOOST_WINAPI_IS_MINGW )
const DWORD_ UNICODE_STRING_MAX_BYTES_ = UNICODE_STRING_MAX_BYTES;
const DWORD_ UNICODE_STRING_MAX_CHARS_ = UNICODE_STRING_MAX_CHARS;
#else
const DWORD_ UNICODE_STRING_MAX_BYTES_ = 65534;
const DWORD_ UNICODE_STRING_MAX_CHARS_ = 32767;
#endif
const DWORD_ max_path = MAX_PATH_;
const DWORD_ unicode_string_max_bytes = UNICODE_STRING_MAX_BYTES_;
const DWORD_ unicode_string_max_chars = UNICODE_STRING_MAX_CHARS_;
}
}
}
#endif // BOOST_DETAIL_WINAPI_LIMITS_HPP_

View File

@@ -1,51 +1,20 @@
// local_memory.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/local_memory.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_LOCAL_MEMORY_HPP
#define BOOST_DETAIL_WINAPI_LOCAL_MEMORY_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/local_memory.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
namespace boost { namespace detail { namespace winapi {
typedef HANDLE_ HLOCAL_;
}}}
extern "C" {
BOOST_SYMBOL_IMPORT boost::detail::winapi::HLOCAL_ WINAPI
LocalAlloc(
boost::detail::winapi::UINT_ uFlags,
boost::detail::winapi::SIZE_T_ uBytes);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HLOCAL_ WINAPI
LocalReAlloc(
boost::detail::winapi::HLOCAL_ hMem,
boost::detail::winapi::SIZE_T_ uBytes,
boost::detail::winapi::UINT_ uFlags);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HLOCAL_ WINAPI LocalFree(boost::detail::winapi::HLOCAL_ hMem);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
typedef ::HLOCAL HLOCAL_;
#endif
using ::LocalAlloc;
using ::LocalReAlloc;
using ::LocalFree;
}
}
}
#endif // BOOST_DETAIL_WINAPI_LOCAL_MEMORY_HPP

View File

@@ -1,17 +1,17 @@
// memory.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/memory.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_MEMORY_HPP
#define BOOST_DETAIL_WINAPI_MEMORY_HPP
#include <boost/detail/winapi/heap_memory.hpp>
#include <boost/detail/winapi/local_memory.hpp>
#include <boost/winapi/memory.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once

View File

@@ -1,184 +1,20 @@
// mutex.hpp --------------------------------------------------------------//
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/mutex.hpp instead.
*/
// Copyright 2010 Vicente J. Botet Escriba
// Copyright 2015 Andrey Semashev
#ifndef BOOST_DETAIL_WINAPI_MUTEX_HPP_
#define BOOST_DETAIL_WINAPI_MUTEX_HPP_
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_DETAIL_WINAPI_MUTEX_HPP
#define BOOST_DETAIL_WINAPI_MUTEX_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/predef/platform.h>
#include <boost/winapi/mutex.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
#if !defined( BOOST_PLAT_WINDOWS_RUNTIME_AVALIABLE )
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateMutexA(
::_SECURITY_ATTRIBUTES* lpMutexAttributes,
boost::detail::winapi::BOOL_ bInitialOwner,
boost::detail::winapi::LPCSTR_ lpName);
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateMutexExA(
::_SECURITY_ATTRIBUTES* lpMutexAttributes,
boost::detail::winapi::LPCSTR_ lpName,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::DWORD_ dwDesiredAccess);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
OpenMutexA(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::LPCSTR_ lpName);
#endif
#if !defined( BOOST_PLAT_WINDOWS_RUNTIME_AVALIABLE )
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateMutexW(
::_SECURITY_ATTRIBUTES* lpMutexAttributes,
boost::detail::winapi::BOOL_ bInitialOwner,
boost::detail::winapi::LPCWSTR_ lpName);
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateMutexExW(
::_SECURITY_ATTRIBUTES* lpMutexAttributes,
boost::detail::winapi::LPCWSTR_ lpName,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::DWORD_ dwDesiredAccess);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
OpenMutexW(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::LPCWSTR_ lpName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
ReleaseMutex(boost::detail::winapi::HANDLE_ hMutex);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
#if !defined( BOOST_NO_ANSI_APIS )
using ::OpenMutexA;
#endif
using ::OpenMutexW;
using ::ReleaseMutex;
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ MUTEX_ALL_ACCESS_ = MUTEX_ALL_ACCESS;
const DWORD_ MUTEX_MODIFY_STATE_ = MUTEX_MODIFY_STATE;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ CREATE_MUTEX_INITIAL_OWNER_ = CREATE_MUTEX_INITIAL_OWNER;
#endif
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ MUTEX_ALL_ACCESS_ = 0x001F0001;
const DWORD_ MUTEX_MODIFY_STATE_ = 0x00000001;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ CREATE_MUTEX_INITIAL_OWNER_ = 0x00000001;
#endif
#endif // defined( BOOST_USE_WINDOWS_H )
const DWORD_ mutex_all_access = MUTEX_ALL_ACCESS_;
const DWORD_ mutex_modify_state = MUTEX_MODIFY_STATE_;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ create_mutex_initial_owner = CREATE_MUTEX_INITIAL_OWNER_;
#endif
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateMutexA(SECURITY_ATTRIBUTES_* lpMutexAttributes, BOOL_ bInitialOwner, LPCSTR_ lpName)
{
#if BOOST_PLAT_WINDOWS_RUNTIME && BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ flags = bInitialOwner ? create_mutex_initial_owner : 0u;
return ::CreateMutexExA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpMutexAttributes), lpName, flags, mutex_all_access);
#else
return ::CreateMutexA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpMutexAttributes), bInitialOwner, lpName);
#endif
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_FORCEINLINE HANDLE_ CreateMutexExA(
SECURITY_ATTRIBUTES_* lpMutexAttributes,
LPCSTR_ lpName,
DWORD_ dwFlags,
DWORD_ dwDesiredAccess)
{
return ::CreateMutexExA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpMutexAttributes), lpName, dwFlags, dwDesiredAccess);
}
#endif
#endif
BOOST_FORCEINLINE HANDLE_ CreateMutexW(SECURITY_ATTRIBUTES_* lpMutexAttributes, BOOL_ bInitialOwner, LPCWSTR_ lpName)
{
#if BOOST_PLAT_WINDOWS_RUNTIME && BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ flags = bInitialOwner ? create_mutex_initial_owner : 0u;
return ::CreateMutexExW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpMutexAttributes), lpName, flags, mutex_all_access);
#else
return ::CreateMutexW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpMutexAttributes), bInitialOwner, lpName);
#endif
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_FORCEINLINE HANDLE_ CreateMutexExW(
SECURITY_ATTRIBUTES_* lpMutexAttributes,
LPCWSTR_ lpName,
DWORD_ dwFlags,
DWORD_ dwDesiredAccess)
{
return ::CreateMutexExW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpMutexAttributes), lpName, dwFlags, dwDesiredAccess);
}
#endif
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ create_mutex(SECURITY_ATTRIBUTES_* lpAttributes, BOOL_ bInitialOwner, LPCSTR_ lpName)
{
return winapi::CreateMutexA(lpAttributes, bInitialOwner, lpName);
}
BOOST_FORCEINLINE HANDLE_ open_mutex(DWORD_ dwDesiredAccess, BOOL_ bInheritHandle, LPCSTR_ lpName)
{
return ::OpenMutexA(dwDesiredAccess, bInheritHandle, lpName);
}
#endif
BOOST_FORCEINLINE HANDLE_ create_mutex(SECURITY_ATTRIBUTES_* lpAttributes, BOOL_ bInitialOwner, LPCWSTR_ lpName)
{
return winapi::CreateMutexW(lpAttributes, bInitialOwner, lpName);
}
BOOST_FORCEINLINE HANDLE_ open_mutex(DWORD_ dwDesiredAccess, BOOL_ bInheritHandle, LPCWSTR_ lpName)
{
return ::OpenMutexW(dwDesiredAccess, bInheritHandle, lpName);
}
BOOST_FORCEINLINE HANDLE_ create_anonymous_mutex(SECURITY_ATTRIBUTES_* lpAttributes, BOOL_ bInitialOwner)
{
return winapi::CreateMutexW(lpAttributes, bInitialOwner, 0);
}
}
}
}
#endif // BOOST_DETAIL_WINAPI_MUTEX_HPP
#endif // BOOST_DETAIL_WINAPI_MUTEX_HPP_

View File

@@ -1,51 +1,20 @@
// overlapped.hpp --------------------------------------------------------------//
// Copyright 2016 Klemens D. Morgenstern
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/overlapped.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_OVERLAPPED_HPP_
#define BOOST_DETAIL_WINAPI_OVERLAPPED_HPP_
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/overlapped.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
struct _OVERLAPPED;
}
#endif
namespace boost {
namespace detail {
namespace winapi {
#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable:4201) // nonstandard extension used : nameless struct/union
#endif
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _OVERLAPPED {
ULONG_PTR_ Internal;
ULONG_PTR_ InternalHigh;
union {
struct {
DWORD_ Offset;
DWORD_ OffsetHigh;
};
PVOID_ Pointer;
};
HANDLE_ hEvent;
} OVERLAPPED_, *LPOVERLAPPED_;
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
}}}
#endif // BOOST_DETAIL_WINAPI_OVERLAPPED_HPP_

View File

@@ -1,56 +1,20 @@
// page_protection_flags.hpp --------------------------------------------------------------//
// Copyright 2016 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/page_protection_flags.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_PAGE_PROTECTION_FLAGS_HPP
#define BOOST_DETAIL_WINAPI_PAGE_PROTECTION_FLAGS_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/page_protection_flags.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
namespace boost {
namespace detail {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ PAGE_NOACCESS_ = PAGE_NOACCESS;
const DWORD_ PAGE_READONLY_ = PAGE_READONLY;
const DWORD_ PAGE_READWRITE_ = PAGE_READWRITE;
const DWORD_ PAGE_WRITECOPY_ = PAGE_WRITECOPY;
const DWORD_ PAGE_EXECUTE_ = PAGE_EXECUTE;
const DWORD_ PAGE_EXECUTE_READ_ = PAGE_EXECUTE_READ;
const DWORD_ PAGE_EXECUTE_READWRITE_ = PAGE_EXECUTE_READWRITE;
const DWORD_ PAGE_EXECUTE_WRITECOPY_ = PAGE_EXECUTE_WRITECOPY;
const DWORD_ PAGE_GUARD_ = PAGE_GUARD;
const DWORD_ PAGE_NOCACHE_ = PAGE_NOCACHE;
const DWORD_ PAGE_WRITECOMBINE_ = PAGE_WRITECOMBINE;
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ PAGE_NOACCESS_ = 0x01;
const DWORD_ PAGE_READONLY_ = 0x02;
const DWORD_ PAGE_READWRITE_ = 0x04;
const DWORD_ PAGE_WRITECOPY_ = 0x08;
const DWORD_ PAGE_EXECUTE_ = 0x10;
const DWORD_ PAGE_EXECUTE_READ_ = 0x20;
const DWORD_ PAGE_EXECUTE_READWRITE_ = 0x40;
const DWORD_ PAGE_EXECUTE_WRITECOPY_ = 0x80;
const DWORD_ PAGE_GUARD_ = 0x100;
const DWORD_ PAGE_NOCACHE_ = 0x200;
const DWORD_ PAGE_WRITECOMBINE_ = 0x400;
#endif // defined( BOOST_USE_WINDOWS_H )
}
}
}
#endif // BOOST_DETAIL_WINAPI_PAGE_PROTECTION_FLAGS_HPP

View File

@@ -1,317 +1,20 @@
// pipes.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/pipes.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_PIPES_HPP_
#define BOOST_DETAIL_WINAPI_PIPES_HPP_
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/detail/winapi/config.hpp>
#include <boost/detail/winapi/overlapped.hpp>
#include <boost/predef/platform.h>
#include <boost/winapi/pipes.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_PLAT_WINDOWS_DESKTOP
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI ImpersonateNamedPipeClient(
boost::detail::winapi::HANDLE_ hNamedPipe);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI CreatePipe(
boost::detail::winapi::PHANDLE_ hReadPipe,
boost::detail::winapi::PHANDLE_ hWritePipe,
_SECURITY_ATTRIBUTES* lpPipeAttributes,
boost::detail::winapi::DWORD_ nSize);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI ConnectNamedPipe(
boost::detail::winapi::HANDLE_ hNamedPipe,
_OVERLAPPED* lpOverlapped);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI DisconnectNamedPipe(
boost::detail::winapi::HANDLE_ hNamedPipe);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI SetNamedPipeHandleState(
boost::detail::winapi::HANDLE_ hNamedPipe,
boost::detail::winapi::LPDWORD_ lpMode,
boost::detail::winapi::LPDWORD_ lpMaxCollectionCount,
boost::detail::winapi::LPDWORD_ lpCollectDataTimeout);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI PeekNamedPipe(
boost::detail::winapi::HANDLE_ hNamedPipe,
boost::detail::winapi::LPVOID_ lpBuffer,
boost::detail::winapi::DWORD_ nBufferSize,
boost::detail::winapi::LPDWORD_ lpBytesRead,
boost::detail::winapi::LPDWORD_ lpTotalBytesAvail,
boost::detail::winapi::LPDWORD_ lpBytesLeftThisMessage);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI TransactNamedPipe(
boost::detail::winapi::HANDLE_ hNamedPipe,
boost::detail::winapi::LPVOID_ lpInBuffer,
boost::detail::winapi::DWORD_ nInBufferSize,
boost::detail::winapi::LPVOID_ lpOutBuffer,
boost::detail::winapi::DWORD_ nOutBufferSize,
boost::detail::winapi::LPDWORD_ lpBytesRead,
_OVERLAPPED* lpOverlapped);
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI CreateNamedPipeA(
boost::detail::winapi::LPCSTR_ lpName,
boost::detail::winapi::DWORD_ dwOpenMode,
boost::detail::winapi::DWORD_ dwPipeMode,
boost::detail::winapi::DWORD_ nMaxInstances,
boost::detail::winapi::DWORD_ nOutBufferSize,
boost::detail::winapi::DWORD_ nInBufferSize,
boost::detail::winapi::DWORD_ nDefaultTimeOut,
_SECURITY_ATTRIBUTES *lpSecurityAttributes);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI WaitNamedPipeA(
boost::detail::winapi::LPCSTR_ lpNamedPipeName,
boost::detail::winapi::DWORD_ nTimeOut);
#endif // !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI CreateNamedPipeW(
boost::detail::winapi::LPCWSTR_ lpName,
boost::detail::winapi::DWORD_ dwOpenMode,
boost::detail::winapi::DWORD_ dwPipeMode,
boost::detail::winapi::DWORD_ nMaxInstances,
boost::detail::winapi::DWORD_ nOutBufferSize,
boost::detail::winapi::DWORD_ nInBufferSize,
boost::detail::winapi::DWORD_ nDefaultTimeOut,
_SECURITY_ATTRIBUTES* lpSecurityAttributes);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI WaitNamedPipeW(
boost::detail::winapi::LPCWSTR_ lpNamedPipeName,
boost::detail::winapi::DWORD_ nTimeOut);
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI GetNamedPipeClientComputerNameA(
boost::detail::winapi::HANDLE_ Pipe,
boost::detail::winapi::LPSTR_ ClientComputerName,
boost::detail::winapi::ULONG_ ClientComputerNameLength);
#endif // !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI GetNamedPipeClientComputerNameW(
boost::detail::winapi::HANDLE_ Pipe,
boost::detail::winapi::LPWSTR_ ClientComputerName,
boost::detail::winapi::ULONG_ ClientComputerNameLength);
#endif
} // extern "C"
#endif // !defined( BOOST_USE_WINDOWS_H )
namespace boost {
namespace detail {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ PIPE_ACCESS_DUPLEX_ = PIPE_ACCESS_DUPLEX;
const DWORD_ PIPE_ACCESS_INBOUND_ = PIPE_ACCESS_INBOUND;
const DWORD_ PIPE_ACCESS_OUTBOUND_ = PIPE_ACCESS_OUTBOUND;
const DWORD_ PIPE_TYPE_BYTE_ = PIPE_TYPE_BYTE;
const DWORD_ PIPE_TYPE_MESSAGE_ = PIPE_TYPE_MESSAGE;
const DWORD_ PIPE_READMODE_BYTE_ = PIPE_READMODE_BYTE;
const DWORD_ PIPE_READMODE_MESSAGE_ = PIPE_READMODE_MESSAGE;
const DWORD_ PIPE_WAIT_ = PIPE_WAIT;
const DWORD_ PIPE_NOWAIT_ = PIPE_NOWAIT;
const DWORD_ PIPE_UNLIMITED_INSTANCES_ = PIPE_UNLIMITED_INSTANCES;
const DWORD_ NMPWAIT_USE_DEFAULT_WAIT_ = NMPWAIT_USE_DEFAULT_WAIT;
const DWORD_ NMPWAIT_NOWAIT_ = NMPWAIT_NOWAIT;
const DWORD_ NMPWAIT_WAIT_FOREVER_ = NMPWAIT_WAIT_FOREVER;
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ PIPE_ACCESS_DUPLEX_ = 0x00000003;
const DWORD_ PIPE_ACCESS_INBOUND_ = 0x00000001;
const DWORD_ PIPE_ACCESS_OUTBOUND_ = 0x00000002;
const DWORD_ PIPE_TYPE_BYTE_ = 0x00000000;
const DWORD_ PIPE_TYPE_MESSAGE_ = 0x00000004;
const DWORD_ PIPE_READMODE_BYTE_ = 0x00000000;
const DWORD_ PIPE_READMODE_MESSAGE_ = 0x00000002;
const DWORD_ PIPE_WAIT_ = 0x00000000;
const DWORD_ PIPE_NOWAIT_ = 0x00000001;
const DWORD_ PIPE_UNLIMITED_INSTANCES_ = 255u;
const DWORD_ NMPWAIT_USE_DEFAULT_WAIT_ = 0x00000000;
const DWORD_ NMPWAIT_NOWAIT_ = 0x00000001;
const DWORD_ NMPWAIT_WAIT_FOREVER_ = 0xFFFFFFFF;
#endif // defined( BOOST_USE_WINDOWS_H )
// These constants are not defined in Windows SDK prior to 7.0A
const DWORD_ PIPE_ACCEPT_REMOTE_CLIENTS_ = 0x00000000;
const DWORD_ PIPE_REJECT_REMOTE_CLIENTS_ = 0x00000008;
using ::ImpersonateNamedPipeClient;
using ::DisconnectNamedPipe;
using ::SetNamedPipeHandleState;
using ::PeekNamedPipe;
#if !defined( BOOST_NO_ANSI_APIS )
using ::WaitNamedPipeA;
#endif
using ::WaitNamedPipeW;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#if !defined( BOOST_NO_ANSI_APIS )
using ::GetNamedPipeClientComputerNameA;
#endif // !defined( BOOST_NO_ANSI_APIS )
using ::GetNamedPipeClientComputerNameW;
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_FORCEINLINE BOOL_ CreatePipe(PHANDLE_ hReadPipe, PHANDLE_ hWritePipe, LPSECURITY_ATTRIBUTES_ lpPipeAttributes, DWORD_ nSize)
{
return ::CreatePipe(hReadPipe, hWritePipe, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpPipeAttributes), nSize);
}
BOOST_FORCEINLINE BOOL_ ConnectNamedPipe(HANDLE_ hNamedPipe, LPOVERLAPPED_ lpOverlapped)
{
return ::ConnectNamedPipe(hNamedPipe, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
}
BOOST_FORCEINLINE BOOL_ TransactNamedPipe(HANDLE_ hNamedPipe, LPVOID_ lpInBuffer, DWORD_ nInBufferSize, LPVOID_ lpOutBuffer, DWORD_ nOutBufferSize, LPDWORD_ lpBytesRead, LPOVERLAPPED_ lpOverlapped)
{
return ::TransactNamedPipe(hNamedPipe, lpInBuffer, nInBufferSize, lpOutBuffer, nOutBufferSize, lpBytesRead, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
}
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateNamedPipeA(
LPCSTR_ lpName,
DWORD_ dwOpenMode,
DWORD_ dwPipeMode,
DWORD_ nMaxInstances,
DWORD_ nOutBufferSize,
DWORD_ nInBufferSize,
DWORD_ nDefaultTimeOut,
LPSECURITY_ATTRIBUTES_ lpSecurityAttributes)
{
return ::CreateNamedPipeA(
lpName,
dwOpenMode,
dwPipeMode,
nMaxInstances,
nOutBufferSize,
nInBufferSize,
nDefaultTimeOut,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSecurityAttributes));
}
BOOST_FORCEINLINE HANDLE_ create_named_pipe(
LPCSTR_ lpName,
DWORD_ dwOpenMode,
DWORD_ dwPipeMode,
DWORD_ nMaxInstances,
DWORD_ nOutBufferSize,
DWORD_ nInBufferSize,
DWORD_ nDefaultTimeOut,
LPSECURITY_ATTRIBUTES_ lpSecurityAttributes)
{
return ::CreateNamedPipeA(
lpName,
dwOpenMode,
dwPipeMode,
nMaxInstances,
nOutBufferSize,
nInBufferSize,
nDefaultTimeOut,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSecurityAttributes));
}
#endif // !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateNamedPipeW(
LPCWSTR_ lpName,
DWORD_ dwOpenMode,
DWORD_ dwPipeMode,
DWORD_ nMaxInstances,
DWORD_ nOutBufferSize,
DWORD_ nInBufferSize,
DWORD_ nDefaultTimeOut,
LPSECURITY_ATTRIBUTES_ lpSecurityAttributes)
{
return ::CreateNamedPipeW(
lpName,
dwOpenMode,
dwPipeMode,
nMaxInstances,
nOutBufferSize,
nInBufferSize,
nDefaultTimeOut,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSecurityAttributes));
}
BOOST_FORCEINLINE HANDLE_ create_named_pipe(
LPCWSTR_ lpName,
DWORD_ dwOpenMode,
DWORD_ dwPipeMode,
DWORD_ nMaxInstances,
DWORD_ nOutBufferSize,
DWORD_ nInBufferSize,
DWORD_ nDefaultTimeOut,
LPSECURITY_ATTRIBUTES_ lpSecurityAttributes)
{
return ::CreateNamedPipeW(
lpName,
dwOpenMode,
dwPipeMode,
nMaxInstances,
nOutBufferSize,
nInBufferSize,
nDefaultTimeOut,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSecurityAttributes));
}
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE BOOL_ wait_named_pipe(LPCSTR_ lpNamedPipeName, DWORD_ nTimeOut)
{
return ::WaitNamedPipeA(lpNamedPipeName, nTimeOut);
}
#endif //BOOST_NO_ANSI_APIS
BOOST_FORCEINLINE BOOL_ wait_named_pipe(LPCWSTR_ lpNamedPipeName, DWORD_ nTimeOut)
{
return ::WaitNamedPipeW(lpNamedPipeName, nTimeOut);
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE BOOL_ get_named_pipe_client_computer_name(HANDLE_ Pipe, LPSTR_ ClientComputerName, ULONG_ ClientComputerNameLength)
{
return ::GetNamedPipeClientComputerNameA(Pipe, ClientComputerName, ClientComputerNameLength);
}
#endif // !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE BOOL_ get_named_pipe_client_computer_name(HANDLE_ Pipe, LPWSTR_ ClientComputerName, ULONG_ ClientComputerNameLength)
{
return ::GetNamedPipeClientComputerNameW(Pipe, ClientComputerName, ClientComputerNameLength);
}
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
}
}
}
#endif // BOOST_PLAT_WINDOWS_DESKTOP
#endif // BOOST_DETAIL_WINAPI_PIPES_HPP_

View File

@@ -1,78 +1,20 @@
// priority_class.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/priority_class.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_PRIORITY_CLASS_HPP_
#define BOOST_DETAIL_WINAPI_PRIORITY_CLASS_HPP_
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/predef/platform.h>
#include <boost/winapi/priority_class.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_PLAT_WINDOWS_DESKTOP
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
GetPriorityClass(boost::detail::winapi::HANDLE_ hProcess);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
SetPriorityClass(
boost::detail::winapi::HANDLE_ hProcess,
boost::detail::winapi::DWORD_ dwPriorityClass);
} // extern "C"
#endif //defined BOOST_WINDOWS_H
namespace boost {
namespace detail {
namespace winapi {
#if defined(BOOST_USE_WINDOWS_H)
const DWORD_ NORMAL_PRIORITY_CLASS_ = NORMAL_PRIORITY_CLASS;
const DWORD_ IDLE_PRIORITY_CLASS_ = IDLE_PRIORITY_CLASS;
const DWORD_ HIGH_PRIORITY_CLASS_ = HIGH_PRIORITY_CLASS;
const DWORD_ REALTIME_PRIORITY_CLASS_ = REALTIME_PRIORITY_CLASS;
const DWORD_ BELOW_NORMAL_PRIORITY_CLASS_ = BELOW_NORMAL_PRIORITY_CLASS;
const DWORD_ ABOVE_NORMAL_PRIORITY_CLASS_ = ABOVE_NORMAL_PRIORITY_CLASS;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ PROCESS_MODE_BACKGROUND_BEGIN_ = PROCESS_MODE_BACKGROUND_BEGIN;
const DWORD_ PROCESS_MODE_BACKGROUND_END_ = PROCESS_MODE_BACKGROUND_END;
#endif
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ NORMAL_PRIORITY_CLASS_ = 0x20;
const DWORD_ IDLE_PRIORITY_CLASS_ = 0x40;
const DWORD_ HIGH_PRIORITY_CLASS_ = 0x80;
const DWORD_ REALTIME_PRIORITY_CLASS_ = 0x100;
const DWORD_ BELOW_NORMAL_PRIORITY_CLASS_ = 0x4000;
const DWORD_ ABOVE_NORMAL_PRIORITY_CLASS_ = 0x8000;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ PROCESS_MODE_BACKGROUND_BEGIN_ = 0x100000;
const DWORD_ PROCESS_MODE_BACKGROUND_END_ = 0x200000;
#endif
#endif // defined( BOOST_USE_WINDOWS_H )
using ::GetPriorityClass;
using ::SetPriorityClass;
}
}
}
#endif // BOOST_PLAT_WINDOWS_DESKTOP
#endif // BOOST_DETAIL_WINAPI_PRIORITY_CLASS_HPP_

View File

@@ -1,421 +1,20 @@
// 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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/process.hpp instead.
*/
#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/access_rights.hpp>
#include <boost/detail/winapi/get_current_process.hpp>
#include <boost/detail/winapi/get_current_process_id.hpp>
#include <boost/predef/platform.h>
#include <boost/winapi/process.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#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);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI OpenProcess(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::DWORD_ dwProcessId);
} // 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
const DWORD_ PROCESS_TERMINATE_ = PROCESS_TERMINATE;
const DWORD_ PROCESS_CREATE_THREAD_ = PROCESS_CREATE_THREAD;
const DWORD_ PROCESS_SET_SESSIONID_ = PROCESS_SET_SESSIONID;
const DWORD_ PROCESS_VM_OPERATION_ = PROCESS_VM_OPERATION;
const DWORD_ PROCESS_VM_READ_ = PROCESS_VM_READ;
const DWORD_ PROCESS_VM_WRITE_ = PROCESS_VM_WRITE;
const DWORD_ PROCESS_DUP_HANDLE_ = PROCESS_DUP_HANDLE;
const DWORD_ PROCESS_CREATE_PROCESS_ = PROCESS_CREATE_PROCESS;
const DWORD_ PROCESS_SET_QUOTA_ = PROCESS_SET_QUOTA;
const DWORD_ PROCESS_SET_INFORMATION_ = PROCESS_SET_INFORMATION;
const DWORD_ PROCESS_QUERY_INFORMATION_ = PROCESS_QUERY_INFORMATION;
const DWORD_ PROCESS_SUSPEND_RESUME_ = PROCESS_SUSPEND_RESUME;
const DWORD_ PROCESS_ALL_ACCESS_ = PROCESS_ALL_ACCESS;
#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
const DWORD_ PROCESS_TERMINATE_ = 0x0001;
const DWORD_ PROCESS_CREATE_THREAD_ = 0x0002;
const DWORD_ PROCESS_SET_SESSIONID_ = 0x0004;
const DWORD_ PROCESS_VM_OPERATION_ = 0x0008;
const DWORD_ PROCESS_VM_READ_ = 0x0010;
const DWORD_ PROCESS_VM_WRITE_ = 0x0020;
const DWORD_ PROCESS_DUP_HANDLE_ = 0x0040;
const DWORD_ PROCESS_CREATE_PROCESS_ = 0x0080;
const DWORD_ PROCESS_SET_QUOTA_ = 0x0100;
const DWORD_ PROCESS_SET_INFORMATION_ = 0x0200;
const DWORD_ PROCESS_QUERY_INFORMATION_ = 0x0400;
const DWORD_ PROCESS_SUSPEND_RESUME_ = 0x0800;
const DWORD_ PROCESS_ALL_ACCESS_ = (STANDARD_RIGHTS_REQUIRED_ | SYNCHRONIZE_ | 0xFFF);
#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;
using ::OpenProcess;
#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_

View File

@@ -1,80 +1,20 @@
// security.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/security.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SECURITY_HPP
#define BOOST_DETAIL_WINAPI_SECURITY_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/security.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
struct _ACL;
struct _SECURITY_DESCRIPTOR;
#if defined( BOOST_WINAPI_IS_MINGW )
typedef _SECURITY_DESCRIPTOR *PSECURITY_DESCRIPTOR;
#else
typedef boost::detail::winapi::PVOID_ PSECURITY_DESCRIPTOR;
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
InitializeSecurityDescriptor(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
boost::detail::winapi::DWORD_ dwRevision);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
SetSecurityDescriptorDacl(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
boost::detail::winapi::BOOL_ bDaclPresent,
::_ACL* pDacl,
boost::detail::winapi::BOOL_ bDaclDefaulted);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
typedef PVOID_ PSID_;
typedef WORD_ SECURITY_DESCRIPTOR_CONTROL_, *PSECURITY_DESCRIPTOR_CONTROL_;
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _ACL {
BYTE_ AclRevision;
BYTE_ Sbz1;
WORD_ AclSize;
WORD_ AceCount;
WORD_ Sbz2;
} ACL_, *PACL_;
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SECURITY_DESCRIPTOR {
BYTE_ Revision;
BYTE_ Sbz1;
SECURITY_DESCRIPTOR_CONTROL_ Control;
PSID_ Owner;
PSID_ Group;
PACL_ Sacl;
PACL_ Dacl;
} SECURITY_DESCRIPTOR_, *PISECURITY_DESCRIPTOR_;
typedef ::PSECURITY_DESCRIPTOR PSECURITY_DESCRIPTOR_;
using ::InitializeSecurityDescriptor;
BOOST_FORCEINLINE BOOL_ SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR_ pSecurityDescriptor, BOOL_ bDaclPresent, PACL_ pDacl, BOOL_ bDaclDefaulted)
{
return ::SetSecurityDescriptorDacl(pSecurityDescriptor, bDaclPresent, reinterpret_cast< ::_ACL* >(pDacl), bDaclDefaulted);
}
}
}
}
#endif // BOOST_DETAIL_WINAPI_SECURITY_HPP

View File

@@ -1,177 +1,20 @@
// semaphore.hpp --------------------------------------------------------------//
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/semaphore.hpp instead.
*/
// Copyright 2010 Vicente J. Botet Escriba
// Copyright 2015 Andrey Semashev
#ifndef BOOST_DETAIL_WINAPI_SEMAPHORE_HPP_
#define BOOST_DETAIL_WINAPI_SEMAPHORE_HPP_
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_DETAIL_WINAPI_SEMAPHORE_HPP
#define BOOST_DETAIL_WINAPI_SEMAPHORE_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/predef/platform.h>
#include <boost/winapi/semaphore.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
#if !defined( BOOST_PLAT_WINDOWS_RUNTIME_AVALIABLE )
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateSemaphoreA(
::_SECURITY_ATTRIBUTES* lpSemaphoreAttributes,
boost::detail::winapi::LONG_ lInitialCount,
boost::detail::winapi::LONG_ lMaximumCount,
boost::detail::winapi::LPCSTR_ lpName);
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateSemaphoreExA(
::_SECURITY_ATTRIBUTES* lpSemaphoreAttributes,
boost::detail::winapi::LONG_ lInitialCount,
boost::detail::winapi::LONG_ lMaximumCount,
boost::detail::winapi::LPCSTR_ lpName,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::DWORD_ dwDesiredAccess);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
OpenSemaphoreA(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::LPCSTR_ lpName);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateSemaphoreW(
::_SECURITY_ATTRIBUTES* lpSemaphoreAttributes,
boost::detail::winapi::LONG_ lInitialCount,
boost::detail::winapi::LONG_ lMaximumCount,
boost::detail::winapi::LPCWSTR_ lpName);
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateSemaphoreExW(
::_SECURITY_ATTRIBUTES* lpSemaphoreAttributes,
boost::detail::winapi::LONG_ lInitialCount,
boost::detail::winapi::LONG_ lMaximumCount,
boost::detail::winapi::LPCWSTR_ lpName,
boost::detail::winapi::DWORD_ dwFlags,
boost::detail::winapi::DWORD_ dwDesiredAccess);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
OpenSemaphoreW(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::LPCWSTR_ lpName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
ReleaseSemaphore(
boost::detail::winapi::HANDLE_ hSemaphore,
boost::detail::winapi::LONG_ lReleaseCount,
boost::detail::winapi::LPLONG_ lpPreviousCount);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
#if !defined( BOOST_NO_ANSI_APIS )
using ::OpenSemaphoreA;
#endif
using ::OpenSemaphoreW;
using ::ReleaseSemaphore;
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ SEMAPHORE_ALL_ACCESS_ = SEMAPHORE_ALL_ACCESS;
const DWORD_ SEMAPHORE_MODIFY_STATE_ = SEMAPHORE_MODIFY_STATE;
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ SEMAPHORE_ALL_ACCESS_ = 0x001F0003;
const DWORD_ SEMAPHORE_MODIFY_STATE_ = 0x00000002;
#endif // defined( BOOST_USE_WINDOWS_H )
// Undocumented and not present in Windows SDK. Enables NtQuerySemaphore.
// http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FNT%20Objects%2FEvent%2FNtQueryEvent.html
const DWORD_ SEMAPHORE_QUERY_STATE_ = 0x00000001;
const DWORD_ semaphore_all_access = SEMAPHORE_ALL_ACCESS_;
const DWORD_ semaphore_modify_state = SEMAPHORE_MODIFY_STATE_;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateSemaphoreA(SECURITY_ATTRIBUTES_* lpSemaphoreAttributes, LONG_ lInitialCount, LONG_ lMaximumCount, LPCSTR_ lpName)
{
#if BOOST_PLAT_WINDOWS_RUNTIME && BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
return ::CreateSemaphoreExA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSemaphoreAttributes), lInitialCount, lMaximumCount, lpName, 0, semaphore_all_access);
#else
return ::CreateSemaphoreA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSemaphoreAttributes), lInitialCount, lMaximumCount, lpName);
#endif
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_FORCEINLINE HANDLE_ CreateSemaphoreExA(SECURITY_ATTRIBUTES_* lpSemaphoreAttributes, LONG_ lInitialCount, LONG_ lMaximumCount, LPCSTR_ lpName, DWORD_ dwFlags, DWORD_ dwDesiredAccess)
{
return ::CreateSemaphoreExA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSemaphoreAttributes), lInitialCount, lMaximumCount, lpName, dwFlags, dwDesiredAccess);
}
#endif
#endif
BOOST_FORCEINLINE HANDLE_ CreateSemaphoreW(SECURITY_ATTRIBUTES_* lpSemaphoreAttributes, LONG_ lInitialCount, LONG_ lMaximumCount, LPCWSTR_ lpName)
{
#if BOOST_PLAT_WINDOWS_RUNTIME && BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
return ::CreateSemaphoreExW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSemaphoreAttributes), lInitialCount, lMaximumCount, lpName, 0, semaphore_all_access);
#else
return ::CreateSemaphoreW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSemaphoreAttributes), lInitialCount, lMaximumCount, lpName);
#endif
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_FORCEINLINE HANDLE_ CreateSemaphoreExW(SECURITY_ATTRIBUTES_* lpSemaphoreAttributes, LONG_ lInitialCount, LONG_ lMaximumCount, LPCWSTR_ lpName, DWORD_ dwFlags, DWORD_ dwDesiredAccess)
{
return ::CreateSemaphoreExW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSemaphoreAttributes), lInitialCount, lMaximumCount, lpName, dwFlags, dwDesiredAccess);
}
#endif
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ create_semaphore(SECURITY_ATTRIBUTES_* lpSemaphoreAttributes, LONG_ lInitialCount, LONG_ lMaximumCount, LPCSTR_ lpName)
{
return winapi::CreateSemaphoreA(lpSemaphoreAttributes, lInitialCount, lMaximumCount, lpName);
}
BOOST_FORCEINLINE HANDLE_ open_semaphore(DWORD_ dwDesiredAccess, BOOL_ bInheritHandle, LPCSTR_ lpName)
{
return ::OpenSemaphoreA(dwDesiredAccess, bInheritHandle, lpName);
}
#endif
BOOST_FORCEINLINE HANDLE_ create_semaphore(SECURITY_ATTRIBUTES_* lpSemaphoreAttributes, LONG_ lInitialCount, LONG_ lMaximumCount, LPCWSTR_ lpName)
{
return winapi::CreateSemaphoreW(lpSemaphoreAttributes, lInitialCount, lMaximumCount, lpName);
}
BOOST_FORCEINLINE HANDLE_ open_semaphore(DWORD_ dwDesiredAccess, BOOL_ bInheritHandle, LPCWSTR_ lpName)
{
return ::OpenSemaphoreW(dwDesiredAccess, bInheritHandle, lpName);
}
BOOST_FORCEINLINE HANDLE_ create_anonymous_semaphore(SECURITY_ATTRIBUTES_* lpSemaphoreAttributes, LONG_ lInitialCount, LONG_ lMaximumCount)
{
return winapi::CreateSemaphoreW(lpSemaphoreAttributes, lInitialCount, lMaximumCount, 0);
}
}
}
}
#endif // BOOST_DETAIL_WINAPI_SEMAPHORE_HPP
#endif // BOOST_DETAIL_WINAPI_SEMAPHORE_HPP_

View File

@@ -1,145 +1,20 @@
// shell.hpp --------------------------------------------------------------//
// Copyright 2016 Klemens D. Morgenstern
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/shell.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SHELL_HPP_
#define BOOST_DETAIL_WINAPI_SHELL_HPP_
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/detail/winapi/limits.hpp>
#if defined( BOOST_USE_WINDOWS_H )
#include <shellapi.h>
#endif
#include <boost/winapi/shell.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_DETAIL_WINAPI_DECLARE_HANDLE(HICON);
#if !defined( BOOST_NO_ANSI_APIS )
struct _SHFILEINFOA;
#endif
struct _SHFILEINFOW;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_PTR_ WINAPI SHGetFileInfoA(
boost::detail::winapi::LPCSTR_ pszPath,
boost::detail::winapi::DWORD_ dwFileAttributes,
::_SHFILEINFOA *psfinsigned,
boost::detail::winapi::UINT_ cbFileInfons,
boost::detail::winapi::UINT_ uFlags);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_PTR_ WINAPI SHGetFileInfoW(
boost::detail::winapi::LPCWSTR_ pszPath,
boost::detail::winapi::DWORD_ dwFileAttributes,
::_SHFILEINFOW *psfinsigned,
boost::detail::winapi::UINT_ cbFileInfons,
boost::detail::winapi::UINT_ uFlags);
} // extern "C"
#endif // !defined( BOOST_USE_WINDOWS_H )
namespace boost {
namespace detail {
namespace winapi {
typedef ::HICON HICON_;
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ SHGFI_ICON_ = SHGFI_ICON;
const DWORD_ SHGFI_DISPLAYNAME_ = SHGFI_DISPLAYNAME;
const DWORD_ SHGFI_TYPENAME_ = SHGFI_TYPENAME;
const DWORD_ SHGFI_ATTRIBUTES_ = SHGFI_ATTRIBUTES;
const DWORD_ SHGFI_ICONLOCATION_ = SHGFI_ICONLOCATION;
const DWORD_ SHGFI_EXETYPE_ = SHGFI_EXETYPE;
const DWORD_ SHGFI_SYSICONINDEX_ = SHGFI_SYSICONINDEX;
const DWORD_ SHGFI_LINKOVERLAY_ = SHGFI_LINKOVERLAY;
const DWORD_ SHGFI_SELECTED_ = SHGFI_SELECTED;
const DWORD_ SHGFI_ATTR_SPECIFIED_ = SHGFI_ATTR_SPECIFIED;
const DWORD_ SHGFI_LARGEICON_ = SHGFI_LARGEICON;
const DWORD_ SHGFI_SMALLICON_ = SHGFI_SMALLICON;
const DWORD_ SHGFI_OPENICON_ = SHGFI_OPENICON;
const DWORD_ SHGFI_SHELLICONSIZE_ = SHGFI_SHELLICONSIZE;
const DWORD_ SHGFI_PIDL_ = SHGFI_PIDL;
const DWORD_ SHGFI_USEFILEATTRIBUTES_ = SHGFI_USEFILEATTRIBUTES;
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ SHGFI_ICON_ = 0x000000100;
const DWORD_ SHGFI_DISPLAYNAME_ = 0x000000200;
const DWORD_ SHGFI_TYPENAME_ = 0x000000400;
const DWORD_ SHGFI_ATTRIBUTES_ = 0x000000800;
const DWORD_ SHGFI_ICONLOCATION_ = 0x000001000;
const DWORD_ SHGFI_EXETYPE_ = 0x000002000;
const DWORD_ SHGFI_SYSICONINDEX_ = 0x000004000;
const DWORD_ SHGFI_LINKOVERLAY_ = 0x000008000;
const DWORD_ SHGFI_SELECTED_ = 0x000010000;
const DWORD_ SHGFI_ATTR_SPECIFIED_ = 0x000020000;
const DWORD_ SHGFI_LARGEICON_ = 0x000000000;
const DWORD_ SHGFI_SMALLICON_ = 0x000000001;
const DWORD_ SHGFI_OPENICON_ = 0x000000002;
const DWORD_ SHGFI_SHELLICONSIZE_ = 0x000000004;
const DWORD_ SHGFI_PIDL_ = 0x000000008;
const DWORD_ SHGFI_USEFILEATTRIBUTES_ = 0x000000010;
#endif // defined( BOOST_USE_WINDOWS_H )
// These constants are only declared for _WIN32_IE >= 0x0500. We don't set IE version
// and 5.0 is the default version since NT4 SP6, so just define the constants unconditionally.
const DWORD_ SHGFI_ADDOVERLAYS_ = 0x000000020;
const DWORD_ SHGFI_OVERLAYINDEX_ = 0x000000040;
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SHFILEINFOA {
HICON_ hIcon;
int iIcon;
DWORD_ dwAttributes;
CHAR_ szDisplayName[MAX_PATH_];
CHAR_ szTypeName[80];
} SHFILEINFOA_;
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SHFILEINFOW {
HICON_ hIcon;
int iIcon;
DWORD_ dwAttributes;
WCHAR_ szDisplayName[MAX_PATH_];
WCHAR_ szTypeName[80];
} SHFILEINFOW_;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE DWORD_PTR_ SHGetFileInfoA(LPCSTR_ pszPath, DWORD_ dwFileAttributes, SHFILEINFOA_* psfinsigned, UINT_ cbFileInfons, UINT_ uFlags)
{
return ::SHGetFileInfoA(pszPath, dwFileAttributes, reinterpret_cast< ::_SHFILEINFOA* >(psfinsigned), cbFileInfons, uFlags);
}
BOOST_FORCEINLINE DWORD_PTR_ sh_get_file_info(LPCSTR_ pszPath, DWORD_ dwFileAttributes, SHFILEINFOA_* psfinsigned, UINT_ cbFileInfons, UINT_ uFlags)
{
return ::SHGetFileInfoA(pszPath, dwFileAttributes, reinterpret_cast< ::_SHFILEINFOA* >(psfinsigned), cbFileInfons, uFlags);
}
#endif // BOOST_NO_ANSI_APIS
BOOST_FORCEINLINE DWORD_PTR_ SHGetFileInfoW(LPCWSTR_ pszPath, DWORD_ dwFileAttributes, SHFILEINFOW_* psfinsigned, UINT_ cbFileInfons, UINT_ uFlags)
{
return ::SHGetFileInfoW(pszPath, dwFileAttributes, reinterpret_cast< ::_SHFILEINFOW* >(psfinsigned), cbFileInfons, uFlags);
}
BOOST_FORCEINLINE DWORD_PTR_ sh_get_file_info(LPCWSTR_ pszPath, DWORD_ dwFileAttributes, SHFILEINFOW_* psfinsigned, UINT_ cbFileInfons, UINT_ uFlags)
{
return ::SHGetFileInfoW(pszPath, dwFileAttributes, reinterpret_cast< ::_SHFILEINFOW* >(psfinsigned), cbFileInfons, uFlags);
}
}
}
}
#endif // BOOST_DETAIL_WINAPI_SHELL_HPP_

View File

@@ -1,105 +1,20 @@
// show_window.hpp --------------------------------------------------------------//
// Copyright 2016 Klemens D. Morgenstern
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/show_window.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SHOW_WINDOW_HPP_
#define BOOST_DETAIL_WINAPI_SHOW_WINDOW_HPP_
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/predef/platform.h>
#include <boost/winapi/show_window.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_PLAT_WINDOWS_DESKTOP
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_DETAIL_WINAPI_DECLARE_HANDLE(HWND);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI ShowWindow(
HWND hWnd,
int nCmdShow);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI ShowWindowAsync(
HWND hWnd,
int nCmdShow);
}
#endif // BOOST_USE_WINDOWS_H
namespace boost {
namespace detail {
namespace winapi {
typedef ::HWND HWND_;
using ::ShowWindow;
using ::ShowWindowAsync;
#if defined( BOOST_USE_WINDOWS_H ) && !defined( NOSHOWWINDOW )
const DWORD_ SW_HIDE_ = SW_HIDE;
const DWORD_ SW_SHOWNORMAL_ = SW_SHOWNORMAL;
const DWORD_ SW_NORMAL_ = SW_NORMAL;
const DWORD_ SW_SHOWMINIMIZED_ = SW_SHOWMINIMIZED;
const DWORD_ SW_SHOWMAXIMIZED_ = SW_SHOWMAXIMIZED;
const DWORD_ SW_MAXIMIZE_ = SW_MAXIMIZE;
const DWORD_ SW_SHOWNOACTIVATE_ = SW_SHOWNOACTIVATE;
const DWORD_ SW_SHOW_ = SW_SHOW;
const DWORD_ SW_MINIMIZE_ = SW_MINIMIZE;
const DWORD_ SW_SHOWMINNOACTIVE_ = SW_SHOWMINNOACTIVE;
const DWORD_ SW_SHOWNA_ = SW_SHOWNA;
const DWORD_ SW_RESTORE_ = SW_RESTORE;
const DWORD_ SW_SHOWDEFAULT_ = SW_SHOWDEFAULT;
const DWORD_ SW_FORCEMINIMIZE_ = SW_FORCEMINIMIZE;
const DWORD_ SW_MAX_ = SW_MAX;
const DWORD_ HIDE_WINDOW_ = HIDE_WINDOW;
const DWORD_ SHOW_OPENWINDOW_ = SHOW_OPENWINDOW;
const DWORD_ SHOW_ICONWINDOW_ = SHOW_ICONWINDOW;
const DWORD_ SHOW_FULLSCREEN_ = SHOW_FULLSCREEN;
const DWORD_ SHOW_OPENNOACTIVATE_ = SHOW_OPENNOACTIVATE;
const DWORD_ SW_PARENTCLOSING_ = SW_PARENTCLOSING;
const DWORD_ SW_OTHERZOOM_ = SW_OTHERZOOM;
const DWORD_ SW_PARENTOPENING_ = SW_PARENTOPENING;
const DWORD_ SW_OTHERUNZOOM_ = SW_OTHERUNZOOM;
#else
const DWORD_ SW_HIDE_ = 0;
const DWORD_ SW_SHOWNORMAL_ = 1;
const DWORD_ SW_NORMAL_ = 1;
const DWORD_ SW_SHOWMINIMIZED_ = 2;
const DWORD_ SW_SHOWMAXIMIZED_ = 3;
const DWORD_ SW_MAXIMIZE_ = 3;
const DWORD_ SW_SHOWNOACTIVATE_ = 4;
const DWORD_ SW_SHOW_ = 5;
const DWORD_ SW_MINIMIZE_ = 6;
const DWORD_ SW_SHOWMINNOACTIVE_ = 7;
const DWORD_ SW_SHOWNA_ = 8;
const DWORD_ SW_RESTORE_ = 9;
const DWORD_ SW_SHOWDEFAULT_ = 10;
const DWORD_ SW_FORCEMINIMIZE_ = 11;
const DWORD_ SW_MAX_ = 11;
const DWORD_ HIDE_WINDOW_ = 0;
const DWORD_ SHOW_OPENWINDOW_ = 1;
const DWORD_ SHOW_ICONWINDOW_ = 2;
const DWORD_ SHOW_FULLSCREEN_ = 3;
const DWORD_ SHOW_OPENNOACTIVATE_ = 4;
const DWORD_ SW_PARENTCLOSING_ = 1;
const DWORD_ SW_OTHERZOOM_ = 2;
const DWORD_ SW_PARENTOPENING_ = 3;
const DWORD_ SW_OTHERUNZOOM_ = 4;
#endif
}
}
}
#endif // BOOST_PLAT_WINDOWS_DESKTOP
#endif // BOOST_DETAIL_WINAPI_SHOW_WINDOW_HPP_

View File

@@ -1,116 +1,23 @@
// srw_lock.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/srw_lock.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SRW_LOCK_HPP
#define BOOST_DETAIL_WINAPI_SRW_LOCK_HPP
#include <boost/detail/winapi/config.hpp>
#include <boost/winapi/srw_lock.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_WIN6 \
|| (defined(_MSC_VER) && _MSC_VER < 1600)
// Windows SDK 6.0A, which is used by MSVC 9, does not have TryAcquireSRWLock* neither in headers nor in .lib files,
// although the functions are present in later SDKs since Windows API version 6.
#define BOOST_WINAPI_NO_TRY_ACQUIRE_SRWLOCK
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#include <boost/detail/winapi/basic_types.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
struct _RTL_SRWLOCK;
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
InitializeSRWLock(::_RTL_SRWLOCK* SRWLock);
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
ReleaseSRWLockExclusive(::_RTL_SRWLOCK* SRWLock);
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
ReleaseSRWLockShared(::_RTL_SRWLOCK* SRWLock);
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
AcquireSRWLockExclusive(::_RTL_SRWLOCK* SRWLock);
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
AcquireSRWLockShared(::_RTL_SRWLOCK* SRWLock);
#if !defined( BOOST_WINAPI_NO_TRY_ACQUIRE_SRWLOCK )
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOLEAN_ WINAPI
TryAcquireSRWLockExclusive(::_RTL_SRWLOCK* SRWLock);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOLEAN_ WINAPI
TryAcquireSRWLockShared(::_RTL_SRWLOCK* SRWLock);
#endif
}
#endif
namespace boost {
namespace detail {
namespace winapi {
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _RTL_SRWLOCK {
PVOID_ Ptr;
} SRWLOCK_, *PSRWLOCK_;
#if defined( BOOST_USE_WINDOWS_H )
#define BOOST_DETAIL_WINAPI_SRWLOCK_INIT SRWLOCK_INIT
#else
#define BOOST_DETAIL_WINAPI_SRWLOCK_INIT {0}
#endif
BOOST_FORCEINLINE VOID_ InitializeSRWLock(PSRWLOCK_ SRWLock)
{
::InitializeSRWLock(reinterpret_cast< ::_RTL_SRWLOCK* >(SRWLock));
}
BOOST_FORCEINLINE VOID_ ReleaseSRWLockExclusive(PSRWLOCK_ SRWLock)
{
::ReleaseSRWLockExclusive(reinterpret_cast< ::_RTL_SRWLOCK* >(SRWLock));
}
BOOST_FORCEINLINE VOID_ ReleaseSRWLockShared(PSRWLOCK_ SRWLock)
{
::ReleaseSRWLockShared(reinterpret_cast< ::_RTL_SRWLOCK* >(SRWLock));
}
BOOST_FORCEINLINE VOID_ AcquireSRWLockExclusive(PSRWLOCK_ SRWLock)
{
::AcquireSRWLockExclusive(reinterpret_cast< ::_RTL_SRWLOCK* >(SRWLock));
}
BOOST_FORCEINLINE VOID_ AcquireSRWLockShared(PSRWLOCK_ SRWLock)
{
::AcquireSRWLockShared(reinterpret_cast< ::_RTL_SRWLOCK* >(SRWLock));
}
#if !defined( BOOST_WINAPI_NO_TRY_ACQUIRE_SRWLOCK )
BOOST_FORCEINLINE BOOLEAN_ TryAcquireSRWLockExclusive(PSRWLOCK_ SRWLock)
{
return ::TryAcquireSRWLockExclusive(reinterpret_cast< ::_RTL_SRWLOCK* >(SRWLock));
}
BOOST_FORCEINLINE BOOLEAN_ TryAcquireSRWLockShared(PSRWLOCK_ SRWLock)
{
return ::TryAcquireSRWLockShared(reinterpret_cast< ::_RTL_SRWLOCK* >(SRWLock));
}
#endif
}
}
}
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
// Deprecated
#define BOOST_DETAIL_WINAPI_SRWLOCK_INIT BOOST_WINAPI_SRWLOCK_INIT
#endif // BOOST_DETAIL_WINAPI_SRW_LOCK_HPP

View File

@@ -0,0 +1,20 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/stack_backtrace.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
#define BOOST_DETAIL_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
#include <boost/winapi/stack_backtrace.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_

View File

@@ -1,25 +1,17 @@
// synchronizaion.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/synchronization.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SYNCHRONIZATION_HPP
#define BOOST_DETAIL_WINAPI_SYNCHRONIZATION_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/detail/winapi/critical_section.hpp>
#include <boost/detail/winapi/wait.hpp>
#include <boost/detail/winapi/event.hpp>
#include <boost/detail/winapi/mutex.hpp>
#include <boost/detail/winapi/semaphore.hpp>
#include <boost/detail/winapi/init_once.hpp>
#include <boost/detail/winapi/srw_lock.hpp>
#include <boost/detail/winapi/condition_variable.hpp>
#include <boost/detail/winapi/apc.hpp>
#include <boost/winapi/synchronization.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once

View File

@@ -1,83 +1,20 @@
// system.hpp --------------------------------------------------------------//
// Copyright 2010 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Copyright 2015 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/system.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SYSTEM_HPP
#define BOOST_DETAIL_WINAPI_SYSTEM_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/system.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if defined(BOOST_MSVC)
#pragma warning(push)
// nonstandard extension used : nameless struct/union
#pragma warning(disable: 4201)
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
struct _SYSTEM_INFO;
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
GetSystemInfo(::_SYSTEM_INFO* lpSystemInfo);
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
GetNativeSystemInfo(::_SYSTEM_INFO* lpSystemInfo);
#endif
}
#endif
namespace boost {
namespace detail {
namespace winapi {
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SYSTEM_INFO {
union {
DWORD_ dwOemId;
struct {
WORD_ wProcessorArchitecture;
WORD_ wReserved;
} DUMMYSTRUCTNAME;
} DUMMYUNIONNAME;
DWORD_ dwPageSize;
LPVOID_ lpMinimumApplicationAddress;
LPVOID_ lpMaximumApplicationAddress;
DWORD_PTR_ dwActiveProcessorMask;
DWORD_ dwNumberOfProcessors;
DWORD_ dwProcessorType;
DWORD_ dwAllocationGranularity;
WORD_ wProcessorLevel;
WORD_ wProcessorRevision;
} SYSTEM_INFO_, *LPSYSTEM_INFO_;
BOOST_FORCEINLINE VOID_ GetSystemInfo(LPSYSTEM_INFO_ lpSystemInfo)
{
::GetSystemInfo(reinterpret_cast< ::_SYSTEM_INFO* >(lpSystemInfo));
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
BOOST_FORCEINLINE VOID_ GetNativeSystemInfo(LPSYSTEM_INFO_ lpSystemInfo)
{
::GetNativeSystemInfo(reinterpret_cast< ::_SYSTEM_INFO* >(lpSystemInfo));
}
#endif
}
}
}
#if defined(BOOST_MSVC)
#pragma warning(pop)
#endif
#endif // BOOST_DETAIL_WINAPI_SYSTEM_HPP

View File

@@ -1,42 +1,20 @@
// 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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/thread.hpp instead.
*/
#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>
#include <boost/winapi/thread.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.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

View File

@@ -1,126 +1,20 @@
// thread_pool.hpp --------------------------------------------------------------//
// Copyright 2013 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/thread_pool.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_THREAD_POOL_HPP
#define BOOST_DETAIL_WINAPI_THREAD_POOL_HPP
#include <boost/detail/winapi/config.hpp>
#include <boost/winapi/thread_pool.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN2K
#include <boost/detail/winapi/basic_types.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
typedef boost::detail::winapi::VOID_ (NTAPI *WAITORTIMERCALLBACKFUNC)
(boost::detail::winapi::PVOID_, boost::detail::winapi::BOOLEAN_);
typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK;
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
RegisterWaitForSingleObject(
boost::detail::winapi::PHANDLE_ phNewWaitObject,
boost::detail::winapi::HANDLE_ hObject,
WAITORTIMERCALLBACK Callback,
boost::detail::winapi::PVOID_ Context,
boost::detail::winapi::ULONG_ dwMilliseconds,
boost::detail::winapi::ULONG_ dwFlags);
}
#endif
// MinGW is buggy - it is missing these function declarations for Win2000
#if !defined( BOOST_USE_WINDOWS_H ) || (defined(BOOST_WINAPI_IS_MINGW) && BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_WINXP)
extern "C" {
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
UnregisterWait(boost::detail::winapi::HANDLE_ WaitHandle);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
UnregisterWaitEx(
boost::detail::winapi::HANDLE_ WaitHandle,
boost::detail::winapi::HANDLE_ CompletionEvent);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
typedef ::WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACKFUNC_;
typedef ::WAITORTIMERCALLBACK WAITORTIMERCALLBACK_;
using ::RegisterWaitForSingleObject;
using ::UnregisterWait;
using ::UnregisterWaitEx;
#if defined( BOOST_USE_WINDOWS_H )
const ULONG_ WT_EXECUTEDEFAULT_ = WT_EXECUTEDEFAULT;
const ULONG_ WT_EXECUTEINIOTHREAD_ = WT_EXECUTEINIOTHREAD;
#if defined( BOOST_WINAPI_IS_MINGW )
const ULONG_ WT_EXECUTEINUITHREAD_ = 0x00000002;
#else
const ULONG_ WT_EXECUTEINUITHREAD_ = WT_EXECUTEINUITHREAD;
#endif
const ULONG_ WT_EXECUTEINWAITTHREAD_ = WT_EXECUTEINWAITTHREAD;
const ULONG_ WT_EXECUTEONLYONCE_ = WT_EXECUTEONLYONCE;
const ULONG_ WT_EXECUTEINTIMERTHREAD_ = WT_EXECUTEINTIMERTHREAD;
const ULONG_ WT_EXECUTELONGFUNCTION_ = WT_EXECUTELONGFUNCTION;
#if defined( BOOST_WINAPI_IS_MINGW )
const ULONG_ WT_EXECUTEINPERSISTENTIOTHREAD_ = 0x00000040;
#else
const ULONG_ WT_EXECUTEINPERSISTENTIOTHREAD_ = WT_EXECUTEINPERSISTENTIOTHREAD;
#endif
const ULONG_ WT_EXECUTEINPERSISTENTTHREAD_ = WT_EXECUTEINPERSISTENTTHREAD;
const ULONG_ WT_TRANSFER_IMPERSONATION_ = WT_TRANSFER_IMPERSONATION;
inline ULONG_ wt_set_max_threadpool_threads(ULONG_ flags, ULONG_ limit)
{
return WT_SET_MAX_THREADPOOL_THREADS(flags, limit);
}
#else // defined( BOOST_USE_WINDOWS_H )
const ULONG_ WT_EXECUTEDEFAULT_ = 0x00000000;
const ULONG_ WT_EXECUTEINIOTHREAD_ = 0x00000001;
const ULONG_ WT_EXECUTEINUITHREAD_ = 0x00000002;
const ULONG_ WT_EXECUTEINWAITTHREAD_ = 0x00000004;
const ULONG_ WT_EXECUTEONLYONCE_ = 0x00000008;
const ULONG_ WT_EXECUTEINTIMERTHREAD_ = 0x00000020;
const ULONG_ WT_EXECUTELONGFUNCTION_ = 0x00000010;
const ULONG_ WT_EXECUTEINPERSISTENTIOTHREAD_ = 0x00000040;
const ULONG_ WT_EXECUTEINPERSISTENTTHREAD_ = 0x00000080;
const ULONG_ WT_TRANSFER_IMPERSONATION_ = 0x00000100;
inline ULONG_ wt_set_max_threadpool_threads(ULONG_ flags, ULONG_ limit)
{
return flags | (limit << 16);
}
#endif // defined( BOOST_USE_WINDOWS_H )
const ULONG_ wt_execute_default = WT_EXECUTEDEFAULT_;
const ULONG_ wt_execute_in_io_thread = WT_EXECUTEINIOTHREAD_;
const ULONG_ wt_execute_in_ui_thread = WT_EXECUTEINUITHREAD_;
const ULONG_ wt_execute_in_wait_thread = WT_EXECUTEINWAITTHREAD_;
const ULONG_ wt_execute_only_once = WT_EXECUTEONLYONCE_;
const ULONG_ wt_execute_in_timer_thread = WT_EXECUTEINTIMERTHREAD_;
const ULONG_ wt_execute_long_function = WT_EXECUTELONGFUNCTION_;
const ULONG_ wt_execute_in_persistent_io_thread = WT_EXECUTEINPERSISTENTIOTHREAD_;
const ULONG_ wt_execute_in_persistent_thread = WT_EXECUTEINPERSISTENTTHREAD_;
const ULONG_ wt_transfer_impersonation = WT_TRANSFER_IMPERSONATION_;
}
}
}
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN2K
#endif // BOOST_DETAIL_WINAPI_THREAD_POOL_HPP

View File

@@ -1,139 +1,20 @@
// time.hpp --------------------------------------------------------------//
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/time.hpp instead.
*/
// Copyright 2010 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Copyright 2015 Andrey Semashev
#ifndef BOOST_DETAIL_WINAPI_TIME_HPP_
#define BOOST_DETAIL_WINAPI_TIME_HPP_
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_DETAIL_WINAPI_TIME_HPP
#define BOOST_DETAIL_WINAPI_TIME_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/predef/platform.h>
#include <boost/winapi/time.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
struct _FILETIME;
struct _SYSTEMTIME;
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
GetSystemTime(::_SYSTEMTIME* lpSystemTime);
#ifdef BOOST_HAS_GETSYSTEMTIMEASFILETIME // Windows CE does not define GetSystemTimeAsFileTime
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
GetSystemTimeAsFileTime(::_FILETIME* lpSystemTimeAsFileTime);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
SystemTimeToFileTime(
const ::_SYSTEMTIME* lpSystemTime,
::_FILETIME* lpFileTime);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
FileTimeToSystemTime(
const ::_FILETIME* lpFileTime,
::_SYSTEMTIME* lpSystemTime);
#if BOOST_PLAT_WINDOWS_DESKTOP
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
FileTimeToLocalFileTime(
const ::_FILETIME* lpFileTime,
::_FILETIME* lpLocalFileTime);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
LocalFileTimeToFileTime(
const ::_FILETIME* lpLocalFileTime,
::_FILETIME* lpFileTime);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
GetTickCount(BOOST_DETAIL_WINAPI_VOID);
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_SYMBOL_IMPORT boost::detail::winapi::ULONGLONG_ WINAPI
GetTickCount64(BOOST_DETAIL_WINAPI_VOID);
#endif
}
#endif
namespace boost {
namespace detail {
namespace winapi {
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _FILETIME {
DWORD_ dwLowDateTime;
DWORD_ dwHighDateTime;
} FILETIME_, *PFILETIME_, *LPFILETIME_;
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SYSTEMTIME {
WORD_ wYear;
WORD_ wMonth;
WORD_ wDayOfWeek;
WORD_ wDay;
WORD_ wHour;
WORD_ wMinute;
WORD_ wSecond;
WORD_ wMilliseconds;
} SYSTEMTIME_, *PSYSTEMTIME_, *LPSYSTEMTIME_;
#if BOOST_PLAT_WINDOWS_DESKTOP
using ::GetTickCount;
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
using ::GetTickCount64;
#endif
BOOST_FORCEINLINE VOID_ GetSystemTime(LPSYSTEMTIME_ lpSystemTime)
{
::GetSystemTime(reinterpret_cast< ::_SYSTEMTIME* >(lpSystemTime));
}
#if defined( BOOST_HAS_GETSYSTEMTIMEASFILETIME )
BOOST_FORCEINLINE VOID_ GetSystemTimeAsFileTime(LPFILETIME_ lpSystemTimeAsFileTime)
{
::GetSystemTimeAsFileTime(reinterpret_cast< ::_FILETIME* >(lpSystemTimeAsFileTime));
}
#else
// Windows CE does not define GetSystemTimeAsFileTime
BOOST_FORCEINLINE VOID_ GetSystemTimeAsFileTime(FILETIME_* lpFileTime)
{
boost::detail::winapi::SYSTEMTIME_ st;
boost::detail::winapi::GetSystemTime(&st);
boost::detail::winapi::SystemTimeToFileTime(&st, lpFileTime);
}
#endif
BOOST_FORCEINLINE BOOL_ SystemTimeToFileTime(const SYSTEMTIME_* lpSystemTime, FILETIME_* lpFileTime)
{
return ::SystemTimeToFileTime(reinterpret_cast< const ::_SYSTEMTIME* >(lpSystemTime), reinterpret_cast< ::_FILETIME* >(lpFileTime));
}
BOOST_FORCEINLINE BOOL_ FileTimeToSystemTime(const FILETIME_* lpFileTime, SYSTEMTIME_* lpSystemTime)
{
return ::FileTimeToSystemTime(reinterpret_cast< const ::_FILETIME* >(lpFileTime), reinterpret_cast< ::_SYSTEMTIME* >(lpSystemTime));
}
#if BOOST_PLAT_WINDOWS_DESKTOP
BOOST_FORCEINLINE BOOL_ FileTimeToLocalFileTime(const FILETIME_* lpFileTime, FILETIME_* lpLocalFileTime)
{
return ::FileTimeToLocalFileTime(reinterpret_cast< const ::_FILETIME* >(lpFileTime), reinterpret_cast< ::_FILETIME* >(lpLocalFileTime));
}
BOOST_FORCEINLINE BOOL_ LocalFileTimeToFileTime(const FILETIME_* lpLocalFileTime, FILETIME_* lpFileTime)
{
return ::LocalFileTimeToFileTime(reinterpret_cast< const ::_FILETIME* >(lpLocalFileTime), reinterpret_cast< ::_FILETIME* >(lpFileTime));
}
#endif
}
}
}
#endif // BOOST_DETAIL_WINAPI_TIME_HPP
#endif // BOOST_DETAIL_WINAPI_TIME_HPP_

View File

@@ -1,48 +1,20 @@
// 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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/timers.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_TIMERS_HPP
#define BOOST_DETAIL_WINAPI_TIMERS_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/timers.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.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

View File

@@ -1,60 +1,20 @@
// tls.hpp --------------------------------------------------------------//
// Copyright 2013 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/tls.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_TLS_HPP
#define BOOST_DETAIL_WINAPI_TLS_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/tls.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( UNDER_CE )
// Windows CE define TlsAlloc and TlsFree as inline functions in kfuncs.h
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
TlsAlloc(BOOST_DETAIL_WINAPI_VOID);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
TlsFree(boost::detail::winapi::DWORD_ dwTlsIndex);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::LPVOID_ WINAPI
TlsGetValue(boost::detail::winapi::DWORD_ dwTlsIndex);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
TlsSetValue(
boost::detail::winapi::DWORD_ dwTlsIndex,
boost::detail::winapi::LPVOID_ lpTlsValue);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
using ::TlsAlloc;
using ::TlsFree;
using ::TlsGetValue;
using ::TlsSetValue;
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ TLS_OUT_OF_INDEXES_ = TLS_OUT_OF_INDEXES;
#else
const DWORD_ TLS_OUT_OF_INDEXES_ = 0xFFFFFFFF;
#endif
const DWORD_ tls_out_of_indexes = TLS_OUT_OF_INDEXES_;
}
}
}
#endif // BOOST_DETAIL_WINAPI_TLS_HPP

View File

@@ -1,84 +1,20 @@
// wait.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
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/wait.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_WAIT_HPP
#define BOOST_DETAIL_WINAPI_WAIT_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/wait.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.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
WaitForSingleObject(
boost::detail::winapi::HANDLE_ hHandle,
boost::detail::winapi::DWORD_ dwMilliseconds);
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
WaitForMultipleObjects(
boost::detail::winapi::DWORD_ nCount,
boost::detail::winapi::HANDLE_ const* lpHandles,
boost::detail::winapi::BOOL_ bWaitAll,
boost::detail::winapi::DWORD_ dwMilliseconds);
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI
SignalObjectAndWait(
boost::detail::winapi::HANDLE_ hObjectToSignal,
boost::detail::winapi::HANDLE_ hObjectToWaitOn,
boost::detail::winapi::DWORD_ dwMilliseconds,
boost::detail::winapi::BOOL_ bAlertable);
#endif
}
#endif
namespace boost {
namespace detail {
namespace winapi {
using ::WaitForMultipleObjects;
using ::WaitForSingleObject;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
using ::SignalObjectAndWait;
#endif
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ INFINITE_ = INFINITE;
const DWORD_ WAIT_ABANDONED_ = WAIT_ABANDONED;
const DWORD_ WAIT_OBJECT_0_ = WAIT_OBJECT_0;
const DWORD_ WAIT_TIMEOUT_ = WAIT_TIMEOUT;
const DWORD_ WAIT_FAILED_ = WAIT_FAILED;
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ INFINITE_ = (DWORD_)0xFFFFFFFF;
const DWORD_ WAIT_ABANDONED_ = 0x00000080L;
const DWORD_ WAIT_OBJECT_0_ = 0x00000000L;
const DWORD_ WAIT_TIMEOUT_ = 0x00000102L;
const DWORD_ WAIT_FAILED_ = (DWORD_)0xFFFFFFFF;
#endif // defined( BOOST_USE_WINDOWS_H )
const DWORD_ infinite = INFINITE_;
const DWORD_ wait_abandoned = WAIT_ABANDONED_;
const DWORD_ wait_object_0 = WAIT_OBJECT_0_;
const DWORD_ wait_timeout = WAIT_TIMEOUT_;
const DWORD_ wait_failed = WAIT_FAILED_;
const DWORD_ max_non_infinite_wait = (DWORD_)0xFFFFFFFE;
}
}
}
#endif // BOOST_DETAIL_WINAPI_WAIT_HPP

View File

@@ -1,145 +1,20 @@
// waitable_timer.hpp --------------------------------------------------------------//
// Copyright 2013 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/waitable_timer.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_WAITABLE_TIMER_HPP
#define BOOST_DETAIL_WINAPI_WAITABLE_TIMER_HPP
#include <boost/detail/winapi/basic_types.hpp>
#include <boost/winapi/waitable_timer.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
typedef boost::detail::winapi::VOID_
(WINAPI *PTIMERAPCROUTINE)(
boost::detail::winapi::LPVOID_ lpArgToCompletionRoutine,
boost::detail::winapi::DWORD_ dwTimerLowValue,
boost::detail::winapi::DWORD_ dwTimerHighValue);
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateWaitableTimerA(
::_SECURITY_ATTRIBUTES* lpTimerAttributes,
boost::detail::winapi::BOOL_ bManualReset,
boost::detail::winapi::LPCSTR_ lpTimerName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
OpenWaitableTimerA(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::LPCSTR_ lpTimerName);
#endif
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
CreateWaitableTimerW(
::_SECURITY_ATTRIBUTES* lpTimerAttributes,
boost::detail::winapi::BOOL_ bManualReset,
boost::detail::winapi::LPCWSTR_ lpTimerName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI
OpenWaitableTimerW(
boost::detail::winapi::DWORD_ dwDesiredAccess,
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::LPCWSTR_ lpTimerName);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
SetWaitableTimer(
boost::detail::winapi::HANDLE_ hTimer,
const ::_LARGE_INTEGER* lpDueTime,
boost::detail::winapi::LONG_ lPeriod,
PTIMERAPCROUTINE pfnCompletionRoutine,
boost::detail::winapi::LPVOID_ lpArgToCompletionRoutine,
boost::detail::winapi::BOOL_ fResume);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
CancelWaitableTimer(boost::detail::winapi::HANDLE_ hTimer);
}
#endif
namespace boost {
namespace detail {
namespace winapi {
typedef ::PTIMERAPCROUTINE PTIMERAPCROUTINE_;
#if !defined( BOOST_NO_ANSI_APIS )
using ::OpenWaitableTimerA;
#endif
using ::OpenWaitableTimerW;
using ::CancelWaitableTimer;
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ TIMER_ALL_ACCESS_ = TIMER_ALL_ACCESS;
const DWORD_ TIMER_MODIFY_STATE_ = TIMER_MODIFY_STATE;
const DWORD_ TIMER_QUERY_STATE_ = TIMER_QUERY_STATE;
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ TIMER_ALL_ACCESS_ = 0x001F0003;
const DWORD_ TIMER_MODIFY_STATE_ = 0x00000002;
const DWORD_ TIMER_QUERY_STATE_ = 0x00000001;
#endif // defined( BOOST_USE_WINDOWS_H )
const DWORD_ timer_all_access = TIMER_ALL_ACCESS_;
const DWORD_ timer_modify_state = TIMER_MODIFY_STATE_;
const DWORD_ timer_query_state = TIMER_QUERY_STATE_;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateWaitableTimerA(PSECURITY_ATTRIBUTES_ lpTimerAttributes, BOOL_ bManualReset, LPCSTR_ lpTimerName)
{
return ::CreateWaitableTimerA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpTimerAttributes), bManualReset, lpTimerName);
}
#endif
BOOST_FORCEINLINE HANDLE_ CreateWaitableTimerW(PSECURITY_ATTRIBUTES_ lpTimerAttributes, BOOL_ bManualReset, LPCWSTR_ lpTimerName)
{
return ::CreateWaitableTimerW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpTimerAttributes), bManualReset, lpTimerName);
}
BOOST_FORCEINLINE BOOL_ SetWaitableTimer(
HANDLE_ hTimer,
const LARGE_INTEGER_* lpDueTime,
LONG_ lPeriod,
PTIMERAPCROUTINE_ pfnCompletionRoutine,
LPVOID_ lpArgToCompletionRoutine,
BOOL_ fResume)
{
return ::SetWaitableTimer(hTimer, reinterpret_cast< const ::_LARGE_INTEGER* >(lpDueTime), lPeriod, pfnCompletionRoutine, lpArgToCompletionRoutine, fResume);
}
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ create_waitable_timer(PSECURITY_ATTRIBUTES_ lpTimerAttributes, BOOL_ bManualReset, LPCSTR_ lpTimerName)
{
return ::CreateWaitableTimerA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpTimerAttributes), bManualReset, lpTimerName);
}
#endif
BOOST_FORCEINLINE HANDLE_ create_waitable_timer(PSECURITY_ATTRIBUTES_ lpTimerAttributes, BOOL_ bManualReset, LPCWSTR_ lpTimerName)
{
return ::CreateWaitableTimerW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpTimerAttributes), bManualReset, lpTimerName);
}
BOOST_FORCEINLINE HANDLE_ create_anonymous_waitable_timer(PSECURITY_ATTRIBUTES_ lpTimerAttributes, BOOL_ bManualReset)
{
#ifdef BOOST_NO_ANSI_APIS
return ::CreateWaitableTimerW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpTimerAttributes), bManualReset, 0);
#else
return ::CreateWaitableTimerA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpTimerAttributes), bManualReset, 0);
#endif
}
}
}
}
#endif // BOOST_DETAIL_WINAPI_WAITABLE_TIMER_HPP

View File

@@ -3,270 +3,8 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef WORKAROUND_DWA2002126_HPP
# define WORKAROUND_DWA2002126_HPP
#define WORKAROUND_DWA2002126_HPP
// Compiler/library version workaround macro
//
// Usage:
//
// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
// // workaround for eVC4 and VC6
// ... // workaround code here
// #endif
//
// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the
// first argument must be undefined or expand to a numeric
// value. The above expands to:
//
// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300
//
// When used for workarounds that apply to the latest known version
// and all earlier versions of a compiler, the following convention
// should be observed:
//
// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301))
//
// The version number in this case corresponds to the last version in
// which the workaround was known to have been required. When
// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro
// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates
// the workaround for any version of the compiler. When
// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or
// error will be issued if the compiler version exceeds the argument
// to BOOST_TESTED_AT(). This can be used to locate workarounds which
// may be obsoleted by newer versions.
# ifndef BOOST_STRICT_CONFIG
#include <boost/config.hpp>
#ifndef __BORLANDC__
#define __BORLANDC___WORKAROUND_GUARD 1
#else
#define __BORLANDC___WORKAROUND_GUARD 0
#endif
#ifndef __CODEGEARC__
#define __CODEGEARC___WORKAROUND_GUARD 1
#else
#define __CODEGEARC___WORKAROUND_GUARD 0
#endif
#ifndef _MSC_VER
#define _MSC_VER_WORKAROUND_GUARD 1
#else
#define _MSC_VER_WORKAROUND_GUARD 0
#endif
#ifndef _MSC_FULL_VER
#define _MSC_FULL_VER_WORKAROUND_GUARD 1
#else
#define _MSC_FULL_VER_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_MSVC
#define BOOST_MSVC_WORKAROUND_GUARD 1
#else
#define BOOST_MSVC_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_MSVC_FULL_VER
#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1
#else
#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0
#endif
#ifndef __GNUC__
#define __GNUC___WORKAROUND_GUARD 1
#else
#define __GNUC___WORKAROUND_GUARD 0
#endif
#ifndef __GNUC_MINOR__
#define __GNUC_MINOR___WORKAROUND_GUARD 1
#else
#define __GNUC_MINOR___WORKAROUND_GUARD 0
#endif
#ifndef __GNUC_PATCHLEVEL__
#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1
#else
#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0
#endif
#ifndef BOOST_GCC
#define BOOST_GCC_WORKAROUND_GUARD 1
#else
#define BOOST_GCC_WORKAROUND_GUARD 0
#endif
#ifndef __IBMCPP__
#define __IBMCPP___WORKAROUND_GUARD 1
#else
#define __IBMCPP___WORKAROUND_GUARD 0
#endif
#ifndef __SUNPRO_CC
#define __SUNPRO_CC_WORKAROUND_GUARD 1
#else
#define __SUNPRO_CC_WORKAROUND_GUARD 0
#endif
#ifndef __DECCXX_VER
#define __DECCXX_VER_WORKAROUND_GUARD 1
#else
#define __DECCXX_VER_WORKAROUND_GUARD 0
#endif
#ifndef __MWERKS__
#define __MWERKS___WORKAROUND_GUARD 1
#else
#define __MWERKS___WORKAROUND_GUARD 0
#endif
#ifndef __EDG__
#define __EDG___WORKAROUND_GUARD 1
#else
#define __EDG___WORKAROUND_GUARD 0
#endif
#ifndef __EDG_VERSION__
#define __EDG_VERSION___WORKAROUND_GUARD 1
#else
#define __EDG_VERSION___WORKAROUND_GUARD 0
#endif
#ifndef __HP_aCC
#define __HP_aCC_WORKAROUND_GUARD 1
#else
#define __HP_aCC_WORKAROUND_GUARD 0
#endif
#ifndef __hpxstd98
#define __hpxstd98_WORKAROUND_GUARD 1
#else
#define __hpxstd98_WORKAROUND_GUARD 0
#endif
#ifndef _CRAYC
#define _CRAYC_WORKAROUND_GUARD 1
#else
#define _CRAYC_WORKAROUND_GUARD 0
#endif
#ifndef __DMC__
#define __DMC___WORKAROUND_GUARD 1
#else
#define __DMC___WORKAROUND_GUARD 0
#endif
#ifndef MPW_CPLUS
#define MPW_CPLUS_WORKAROUND_GUARD 1
#else
#define MPW_CPLUS_WORKAROUND_GUARD 0
#endif
#ifndef __COMO__
#define __COMO___WORKAROUND_GUARD 1
#else
#define __COMO___WORKAROUND_GUARD 0
#endif
#ifndef __COMO_VERSION__
#define __COMO_VERSION___WORKAROUND_GUARD 1
#else
#define __COMO_VERSION___WORKAROUND_GUARD 0
#endif
#ifndef __INTEL_COMPILER
#define __INTEL_COMPILER_WORKAROUND_GUARD 1
#else
#define __INTEL_COMPILER_WORKAROUND_GUARD 0
#endif
#ifndef __ICL
#define __ICL_WORKAROUND_GUARD 1
#else
#define __ICL_WORKAROUND_GUARD 0
#endif
#ifndef _COMPILER_VERSION
#define _COMPILER_VERSION_WORKAROUND_GUARD 1
#else
#define _COMPILER_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef _RWSTD_VER
#define _RWSTD_VER_WORKAROUND_GUARD 1
#else
#define _RWSTD_VER_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_RWSTD_VER
#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1
#else
#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0
#endif
#ifndef __GLIBCPP__
#define __GLIBCPP___WORKAROUND_GUARD 1
#else
#define __GLIBCPP___WORKAROUND_GUARD 0
#endif
#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1
#else
#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0
#endif
#ifndef __SGI_STL_PORT
#define __SGI_STL_PORT_WORKAROUND_GUARD 1
#else
#define __SGI_STL_PORT_WORKAROUND_GUARD 0
#endif
#ifndef _STLPORT_VERSION
#define _STLPORT_VERSION_WORKAROUND_GUARD 1
#else
#define _STLPORT_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef __LIBCOMO_VERSION__
#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1
#else
#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0
#endif
#ifndef _CPPLIB_VER
#define _CPPLIB_VER_WORKAROUND_GUARD 1
#else
#define _CPPLIB_VER_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_INTEL_CXX_VERSION
#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1
#else
#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_INTEL_WIN
#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1
#else
#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_DINKUMWARE_STDLIB
#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1
#else
#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_INTEL
#define BOOST_INTEL_WORKAROUND_GUARD 1
#else
#define BOOST_INTEL_WORKAROUND_GUARD 0
#endif
// Always define to zero, if it's used it'll be defined my MPL:
#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0
# define BOOST_WORKAROUND(symbol, test) \
((symbol ## _WORKAROUND_GUARD + 0 == 0) && \
(symbol != 0) && (1 % (( (symbol test) ) + 1)))
// ^ ^ ^ ^
// The extra level of parenthesis nesting above, along with the
// BOOST_OPEN_PAREN indirection below, is required to satisfy the
// broken preprocessor in MWCW 8.3 and earlier.
//
// The basic mechanism works as follows:
// (symbol test) + 1 => if (symbol test) then 2 else 1
// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0
//
// The complication with % is for cooperation with BOOST_TESTED_AT().
// When "test" is BOOST_TESTED_AT(x) and
// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined,
//
// symbol test => if (symbol <= x) then 1 else -1
// (symbol test) + 1 => if (symbol <= x) then 2 else 0
// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero
//
# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS
# define BOOST_OPEN_PAREN (
# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
# else
# define BOOST_TESTED_AT(value) != ((value)-(value))
# endif
# else
# define BOOST_WORKAROUND(symbol, test) 0
# endif
#include <boost/config/workaround.hpp>
#endif // WORKAROUND_DWA2002126_HPP