1 // config.hpp --------------------------------------------------------------//
3 // Copyright 2013 Andrey Semashev
5 // Distributed under the Boost Software License, Version 1.0.
6 // See http://www.boost.org/LICENSE_1_0.txt
9 #ifndef BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
10 #define BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
12 #if defined __MINGW32__
16 // BOOST_WINAPI_IS_MINGW indicates that the target Windows SDK is provided by MinGW (http://mingw.org/).
17 // BOOST_WINAPI_IS_MINGW_W64 indicates that the target Windows SDK is provided by MinGW-w64 (http://mingw-w64.org).
18 #if defined __MINGW32__
19 #if defined __MINGW64_VERSION_MAJOR
20 #define BOOST_WINAPI_IS_MINGW_W64
22 #define BOOST_WINAPI_IS_MINGW
26 // These constants reflect _WIN32_WINNT_* macros from sdkddkver.h
27 // See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#setting_winver_or__win32_winnt
28 #define BOOST_WINAPI_VERSION_NT4 0x0400
29 #define BOOST_WINAPI_VERSION_WIN2K 0x0500
30 #define BOOST_WINAPI_VERSION_WINXP 0x0501
31 #define BOOST_WINAPI_VERSION_WS03 0x0502
32 #define BOOST_WINAPI_VERSION_WIN6 0x0600
33 #define BOOST_WINAPI_VERSION_VISTA 0x0600
34 #define BOOST_WINAPI_VERSION_WS08 0x0600
35 #define BOOST_WINAPI_VERSION_LONGHORN 0x0600
36 #define BOOST_WINAPI_VERSION_WIN7 0x0601
37 #define BOOST_WINAPI_VERSION_WIN8 0x0602
38 #define BOOST_WINAPI_VERSION_WINBLUE 0x0603
39 #define BOOST_WINAPI_VERSION_WINTHRESHOLD 0x0A00
40 #define BOOST_WINAPI_VERSION_WIN10 0x0A00
42 #if !defined(BOOST_USE_WINAPI_VERSION)
43 #if defined(_WIN32_WINNT)
44 #define BOOST_USE_WINAPI_VERSION _WIN32_WINNT
46 #define BOOST_USE_WINAPI_VERSION WINVER
48 // By default use Windows Vista API on compilers that support it and XP on the others
49 #if (defined(_MSC_VER) && _MSC_VER < 1500) || defined(BOOST_WINAPI_IS_MINGW)
50 #define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINXP
52 #define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN6
57 #if defined(BOOST_USE_WINDOWS_H)
58 // We have to define the version macros so that windows.h provides the necessary symbols
59 #if !defined(_WIN32_WINNT)
60 #define _WIN32_WINNT BOOST_USE_WINAPI_VERSION
63 #define WINVER BOOST_USE_WINAPI_VERSION
67 #include <boost/config.hpp>
69 #ifdef BOOST_HAS_PRAGMA_ONCE
73 #endif // BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_