1 //  config.hpp  --------------------------------------------------------------//
2 
3 //  Copyright 2013 Andrey Semashev
4 
5 //  Distributed under the Boost Software License, Version 1.0.
6 //  See http://www.boost.org/LICENSE_1_0.txt
7 
8 
9 #ifndef BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
10 #define BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
11 
12 #include <boost/config.hpp>
13 
14 #ifdef BOOST_HAS_PRAGMA_ONCE
15 #pragma once
16 #endif
17 
18 // These constants reflect _WIN32_WINNT_* macros from sdkddkver.h
19 // See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#setting_winver_or__win32_winnt
20 #define BOOST_WINAPI_VERSION_NT4 0x0400
21 #define BOOST_WINAPI_VERSION_WIN2K 0x0500
22 #define BOOST_WINAPI_VERSION_WINXP 0x0501
23 #define BOOST_WINAPI_VERSION_WS03 0x0502
24 #define BOOST_WINAPI_VERSION_WIN6 0x0600
25 #define BOOST_WINAPI_VERSION_VISTA 0x0600
26 #define BOOST_WINAPI_VERSION_WS08 0x0600
27 #define BOOST_WINAPI_VERSION_LONGHORN 0x0600
28 #define BOOST_WINAPI_VERSION_WIN7 0x0601
29 #define BOOST_WINAPI_VERSION_WIN8 0x0602
30 #define BOOST_WINAPI_VERSION_WINBLUE 0x0603
31 
32 #if !defined(BOOST_USE_WINAPI_VERSION)
33 #if defined(_WIN32_WINNT)
34 #define BOOST_USE_WINAPI_VERSION _WIN32_WINNT
35 #elif defined(WINVER)
36 #define BOOST_USE_WINAPI_VERSION WINVER
37 #else
38 // By default use Windows XP API
39 #define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINXP
40 #endif
41 #endif
42 
43 #if defined(BOOST_USE_WINDOWS_H)
44 // We have to define the version macros so that windows.h provides the necessary symbols
45 #if !defined(_WIN32_WINNT)
46 #define _WIN32_WINNT BOOST_USE_WINAPI_VERSION
47 #endif
48 #if !defined(WINVER)
49 #define WINVER BOOST_USE_WINAPI_VERSION
50 #endif
51 #endif
52 
53 #endif // BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
54