]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/winapi/include/boost/detail/winapi/handle_info.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / winapi / include / boost / detail / winapi / handle_info.hpp
1 // handle_info.hpp --------------------------------------------------------------//
2
3 // Copyright 2016 Klemens D. Morgenstern
4
5 // Distributed under the Boost Software License, Version 1.0.
6 // See http://www.boost.org/LICENSE_1_0.txt
7
8 #ifndef BOOST_DETAIL_HANDLE_INFO_HPP_
9 #define BOOST_DETAIL_HANDLE_INFO_HPP_
10
11 #include <boost/detail/winapi/basic_types.hpp>
12 #include <boost/predef/platform.h>
13
14 #ifdef BOOST_HAS_PRAGMA_ONCE
15 #pragma once
16 #endif
17
18 #if BOOST_PLAT_WINDOWS_DESKTOP
19
20 #if !defined( BOOST_USE_WINDOWS_H )
21 extern "C" {
22
23 BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
24 GetHandleInformation(
25 boost::detail::winapi::HANDLE_ hObject,
26 boost::detail::winapi::LPDWORD_ lpdwFlags);
27
28 BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
29 SetHandleInformation(
30 boost::detail::winapi::HANDLE_ hObject,
31 boost::detail::winapi::DWORD_ dwMask,
32 boost::detail::winapi::DWORD_ dwFlags);
33
34 } // extern "C"
35 #endif
36
37 namespace boost {
38 namespace detail {
39 namespace winapi {
40
41 using ::GetHandleInformation;
42 using ::SetHandleInformation;
43
44 #if defined( BOOST_USE_WINDOWS_H )
45
46 const DWORD_ HANDLE_FLAG_INHERIT_ = HANDLE_FLAG_INHERIT;
47 const DWORD_ HANDLE_FLAG_PROTECT_FROM_CLOSE_ = HANDLE_FLAG_PROTECT_FROM_CLOSE;
48
49 #else
50
51 const DWORD_ HANDLE_FLAG_INHERIT_ = 0x1;
52 const DWORD_ HANDLE_FLAG_PROTECT_FROM_CLOSE_ = 0x2;
53
54 #endif
55
56 }
57 }
58 }
59
60 #endif // BOOST_PLAT_WINDOWS_DESKTOP
61
62 #endif // BOOST_DETAIL_HANDLE_INFO_HPP_