Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:44

0001 /*
0002  * Copyright 2013, 2017 Andrey Semashev
0003  * Copyright 2017 James E. King, III
0004  *
0005  * Distributed under the Boost Software License, Version 1.0.
0006  * See http://www.boost.org/LICENSE_1_0.txt
0007  */
0008 
0009 #ifndef BOOST_WINAPI_CONFIG_HPP_INCLUDED_
0010 #define BOOST_WINAPI_CONFIG_HPP_INCLUDED_
0011 
0012 #include <boost/predef/version_number.h>
0013 #include <boost/predef/platform.h>
0014 #if defined(__CYGWIN__)
0015 // Cygwin 64 compiler does not define _WIN64 and instead defines it in a private header. We can't define _WIN64 ourselves because
0016 // the header defines the macro unconditionally and if the user includes both Boost.WinAPI and Cygwin WinAPI headers there will be conflict.
0017 #include <_cygwin.h>
0018 #endif
0019 #if defined(__MINGW32__)
0020 // MinGW and MinGW-w64 define __MINGW32_VERSION_MAJOR/MINOR and __MINGW64_VERSION_MAJOR/MINOR macros in a private header.
0021 #include <_mingw.h>
0022 #endif
0023 
0024 // BOOST_WINAPI_IS_MINGW indicates that the target Windows SDK is provided by MinGW (http://mingw.org/).
0025 // BOOST_WINAPI_IS_MINGW_W64 indicates that the target Windows SDK is provided by MinGW-w64 (http://mingw-w64.org).
0026 // BOOST_WINAPI_IS_CYGWIN indicates that the target Windows SDK is provided by MinGW variant from Cygwin (https://cygwin.com/).
0027 #if defined(__CYGWIN__)
0028 #define BOOST_WINAPI_IS_CYGWIN
0029 #elif BOOST_PLAT_MINGW
0030 #if defined(__MINGW64_VERSION_MAJOR)
0031 #define BOOST_WINAPI_IS_MINGW_W64
0032 #else
0033 #define BOOST_WINAPI_IS_MINGW
0034 #endif
0035 #endif
0036 
0037 // These constants reflect _WIN32_WINNT_* macros from sdkddkver.h
0038 // See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#setting_winver_or__win32_winnt
0039 #define BOOST_WINAPI_VERSION_NT4 0x0400
0040 #define BOOST_WINAPI_VERSION_WIN2K 0x0500
0041 #define BOOST_WINAPI_VERSION_WINXP 0x0501
0042 #define BOOST_WINAPI_VERSION_WS03 0x0502
0043 #define BOOST_WINAPI_VERSION_WIN6 0x0600
0044 #define BOOST_WINAPI_VERSION_VISTA 0x0600
0045 #define BOOST_WINAPI_VERSION_WS08 0x0600
0046 #define BOOST_WINAPI_VERSION_LONGHORN 0x0600
0047 #define BOOST_WINAPI_VERSION_WIN7 0x0601
0048 #define BOOST_WINAPI_VERSION_WIN8 0x0602
0049 #define BOOST_WINAPI_VERSION_WINBLUE 0x0603
0050 #define BOOST_WINAPI_VERSION_WINTHRESHOLD 0x0A00
0051 #define BOOST_WINAPI_VERSION_WIN10 0x0A00
0052 
0053 // These constants reflect NTDDI_* macros from sdkddkver.h
0054 #define BOOST_WINAPI_NTDDI_WIN2K 0x05000000
0055 #define BOOST_WINAPI_NTDDI_WIN2KSP1 0x05000100
0056 #define BOOST_WINAPI_NTDDI_WIN2KSP2 0x05000200
0057 #define BOOST_WINAPI_NTDDI_WIN2KSP3 0x05000300
0058 #define BOOST_WINAPI_NTDDI_WIN2KSP4 0x05000400
0059 
0060 #define BOOST_WINAPI_NTDDI_WINXP 0x05010000
0061 #define BOOST_WINAPI_NTDDI_WINXPSP1 0x05010100
0062 #define BOOST_WINAPI_NTDDI_WINXPSP2 0x05010200
0063 #define BOOST_WINAPI_NTDDI_WINXPSP3 0x05010300
0064 #define BOOST_WINAPI_NTDDI_WINXPSP4 0x05010400
0065 
0066 #define BOOST_WINAPI_NTDDI_WS03 0x05020000
0067 #define BOOST_WINAPI_NTDDI_WS03SP1 0x05020100
0068 #define BOOST_WINAPI_NTDDI_WS03SP2 0x05020200
0069 #define BOOST_WINAPI_NTDDI_WS03SP3 0x05020300
0070 #define BOOST_WINAPI_NTDDI_WS03SP4 0x05020400
0071 
0072 #define BOOST_WINAPI_NTDDI_WIN6 0x06000000
0073 #define BOOST_WINAPI_NTDDI_WIN6SP1 0x06000100
0074 #define BOOST_WINAPI_NTDDI_WIN6SP2 0x06000200
0075 #define BOOST_WINAPI_NTDDI_WIN6SP3 0x06000300
0076 #define BOOST_WINAPI_NTDDI_WIN6SP4 0x06000400
0077 
0078 #define BOOST_WINAPI_NTDDI_VISTA BOOST_WINAPI_NTDDI_WIN6
0079 #define BOOST_WINAPI_NTDDI_VISTASP1 BOOST_WINAPI_NTDDI_WIN6SP1
0080 #define BOOST_WINAPI_NTDDI_VISTASP2 BOOST_WINAPI_NTDDI_WIN6SP2
0081 #define BOOST_WINAPI_NTDDI_VISTASP3 BOOST_WINAPI_NTDDI_WIN6SP3
0082 #define BOOST_WINAPI_NTDDI_VISTASP4 BOOST_WINAPI_NTDDI_WIN6SP4
0083 
0084 #define BOOST_WINAPI_NTDDI_LONGHORN  BOOST_WINAPI_NTDDI_VISTA
0085 
0086 #define BOOST_WINAPI_NTDDI_WS08 BOOST_WINAPI_NTDDI_WIN6SP1
0087 #define BOOST_WINAPI_NTDDI_WS08SP2 BOOST_WINAPI_NTDDI_WIN6SP2
0088 #define BOOST_WINAPI_NTDDI_WS08SP3 BOOST_WINAPI_NTDDI_WIN6SP3
0089 #define BOOST_WINAPI_NTDDI_WS08SP4 BOOST_WINAPI_NTDDI_WIN6SP4
0090 
0091 #define BOOST_WINAPI_NTDDI_WIN7 0x06010000
0092 #define BOOST_WINAPI_NTDDI_WIN7SP1 0x06010100 // Not defined in Windows SDK
0093 #define BOOST_WINAPI_NTDDI_WIN8 0x06020000
0094 #define BOOST_WINAPI_NTDDI_WINBLUE 0x06030000
0095 #define BOOST_WINAPI_NTDDI_WINTHRESHOLD 0x0A000000
0096 #define BOOST_WINAPI_NTDDI_WIN10 0x0A000000
0097 #define BOOST_WINAPI_NTDDI_WIN10_TH2 0x0A000001
0098 #define BOOST_WINAPI_NTDDI_WIN10_RS1 0x0A000002
0099 #define BOOST_WINAPI_NTDDI_WIN10_RS2 0x0A000003
0100 #define BOOST_WINAPI_NTDDI_WIN10_RS3 0x0A000004
0101 
0102 #define BOOST_WINAPI_DETAIL_MAKE_NTDDI_VERSION2(x) x##0000
0103 #define BOOST_WINAPI_DETAIL_MAKE_NTDDI_VERSION(x) BOOST_WINAPI_DETAIL_MAKE_NTDDI_VERSION2(x)
0104 
0105 #if !defined(BOOST_USE_WINAPI_VERSION)
0106 #if defined(_WIN32_WINNT)
0107 #define BOOST_USE_WINAPI_VERSION _WIN32_WINNT
0108 #elif defined(WINVER)
0109 #define BOOST_USE_WINAPI_VERSION WINVER
0110 #else
0111 // By default use Windows 10 API on compilers that support it and latest versions on the others
0112 #if (defined(_MSC_VER) && _MSC_VER < 1500) || defined(BOOST_WINAPI_IS_MINGW)
0113 #define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINXP
0114 #elif (defined(_MSC_VER) && _MSC_VER < 1600)
0115 #define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN6
0116 #elif (defined(_MSC_VER) && _MSC_VER < 1700)
0117 #define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN7
0118 #elif (defined(_MSC_VER) && _MSC_VER < 1800)
0119 #define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN8
0120 #elif (defined(_MSC_VER) && _MSC_VER < 1900)
0121 #define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINBLUE
0122 #else
0123 #define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN10
0124 #endif
0125 #endif
0126 #endif
0127 
0128 #if !defined(BOOST_USE_NTDDI_VERSION)
0129 #if defined(NTDDI_VERSION)
0130 #define BOOST_USE_NTDDI_VERSION NTDDI_VERSION
0131 // Default to respective Windows version with the latest Service Pack
0132 #elif BOOST_USE_WINAPI_VERSION == BOOST_WINAPI_VERSION_WIN2K
0133 #define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_NTDDI_WIN2KSP4
0134 #elif BOOST_USE_WINAPI_VERSION == BOOST_WINAPI_VERSION_WINXP
0135 #define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_NTDDI_WINXPSP3
0136 #elif BOOST_USE_WINAPI_VERSION == BOOST_WINAPI_VERSION_WS03
0137 #define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_NTDDI_WS03SP2
0138 #elif BOOST_USE_WINAPI_VERSION == BOOST_WINAPI_VERSION_WIN6
0139 #define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_NTDDI_WIN6SP2
0140 #elif BOOST_USE_WINAPI_VERSION == BOOST_WINAPI_VERSION_WIN7
0141 #define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_NTDDI_WIN7SP1
0142 #elif BOOST_USE_WINAPI_VERSION == BOOST_WINAPI_VERSION_WIN10
0143 #define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_NTDDI_WIN10_RS3
0144 #else
0145 #define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_DETAIL_MAKE_NTDDI_VERSION(BOOST_USE_WINAPI_VERSION)
0146 #endif
0147 #endif
0148 
0149 // Known Windows SDK versions, taken from VER_PRODUCTBUILD macro value defined in ntverp.h.
0150 // These values can be used to compare with BOOST_PLAT_WINDOWS_SDK_VERSION from Boost.Predef.
0151 #define BOOST_WINAPI_WINDOWS_SDK_MSVC71 BOOST_VERSION_NUMBER(0, 0, 3668) // Windows SDK bundled with MSVC 7.1
0152 #define BOOST_WINAPI_WINDOWS_SDK_MSVC8 BOOST_VERSION_NUMBER(0, 0, 3790) // Windows SDK bundled with MSVC 8
0153 #define BOOST_WINAPI_WINDOWS_SDK_6_0 BOOST_VERSION_NUMBER(0, 0, 6000) // Windows SDK 6.0
0154 #define BOOST_WINAPI_WINDOWS_SDK_7_0 BOOST_VERSION_NUMBER(0, 0, 7600) // Windows SDK 7.0, 7.1
0155 #define BOOST_WINAPI_WINDOWS_SDK_8_0 BOOST_VERSION_NUMBER(0, 0, 9200) // Windows SDK 8.0
0156 #define BOOST_WINAPI_WINDOWS_SDK_8_1 BOOST_VERSION_NUMBER(0, 0, 9600) // Windows SDK 8.1
0157 #define BOOST_WINAPI_WINDOWS_SDK_10_0 BOOST_VERSION_NUMBER(0, 0, 10011) // Windows SDK 10.0
0158 // MinGW does not have the ntverp.h header but it defines VER_PRODUCTBUILD in ddk/ntifs.h.
0159 // Cygwin MinGW also defines this version.
0160 #define BOOST_WINAPI_WINDOWS_SDK_MINGW BOOST_VERSION_NUMBER(0, 0, 10000)
0161 // MinGW-w64 defines the same version as the Windows SDK bundled with MSVC 8
0162 #define BOOST_WINAPI_WINDOWS_SDK_MINGW_W64 BOOST_VERSION_NUMBER(0, 0, 3790)
0163 
0164 #if !defined(BOOST_USE_WINAPI_FAMILY)
0165 #if defined(WINAPI_FAMILY)
0166 #define BOOST_USE_WINAPI_FAMILY WINAPI_FAMILY
0167 #elif defined(WINAPI_FAMILY_DESKTOP_APP)
0168 // If none is specified, default to a desktop application which is the most
0169 // backwards compatible to previous ways of doing things, if families are even
0170 // defined.
0171 #define BOOST_USE_WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
0172 #endif
0173 #endif
0174 
0175 //
0176 // UWP Support
0177 //
0178 // On platforms without windows family partition support it is assumed one
0179 // has all APIs and access is controlled by _WIN32_WINNT or similar mechanisms.
0180 //
0181 // Leveraging Boost.Predef here
0182 //
0183 #if BOOST_PLAT_WINDOWS_UWP
0184 #define BOOST_WINAPI_PARTITION_APP           (BOOST_PLAT_WINDOWS_DESKTOP || BOOST_PLAT_WINDOWS_STORE || BOOST_WINAPI_PARTITION_PHONE)
0185 #define BOOST_WINAPI_PARTITION_PC            (BOOST_PLAT_WINDOWS_STORE)
0186 #define BOOST_WINAPI_PARTITION_PHONE         (BOOST_PLAT_WINDOWS_PHONE)
0187 #define BOOST_WINAPI_PARTITION_SYSTEM        (BOOST_PLAT_WINDOWS_SYSTEM)
0188 #define BOOST_WINAPI_PARTITION_SERVER        (BOOST_PLAT_WINDOWS_SERVER)
0189 #define BOOST_WINAPI_PARTITION_DESKTOP       (BOOST_PLAT_WINDOWS_DESKTOP)
0190 #else // BOOST_PLAT_WINDOWS_UWP
0191 #define BOOST_WINAPI_PARTITION_APP           (1)
0192 #define BOOST_WINAPI_PARTITION_PC            (1)
0193 #define BOOST_WINAPI_PARTITION_PHONE         (1)
0194 #define BOOST_WINAPI_PARTITION_SYSTEM        (1)
0195 #define BOOST_WINAPI_PARTITION_SERVER        (1)
0196 #define BOOST_WINAPI_PARTITION_DESKTOP       (1)
0197 #endif // BOOST_PLAT_WINDOWS_UWP
0198 
0199 //
0200 // Windows 8.x SDK defines some items in the DESKTOP partition and then Windows SDK 10.0 defines
0201 // the same items to be in APP or SYSTEM partitions, and APP expands to DESKTOP or PC or PHONE.
0202 // The definition of BOOST_WINAPI_PARTITION_APP_SYSTEM provides a universal way to get this
0203 // right as it is seen in a number of places in the SDK.
0204 //
0205 #define BOOST_WINAPI_PARTITION_APP_SYSTEM \
0206     ( \
0207         ((BOOST_PLAT_WINDOWS_SDK_VERSION >= BOOST_WINAPI_WINDOWS_SDK_10_0) && (BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM)) || \
0208         ((BOOST_PLAT_WINDOWS_SDK_VERSION < BOOST_WINAPI_WINDOWS_SDK_10_0) && BOOST_WINAPI_PARTITION_DESKTOP) \
0209     )
0210 
0211 // Simiarly, some other symbols were re-classified as DESKTOP or SYSTEM
0212 #define BOOST_WINAPI_PARTITION_DESKTOP_SYSTEM \
0213     ( \
0214         ((BOOST_PLAT_WINDOWS_SDK_VERSION >= BOOST_WINAPI_WINDOWS_SDK_10_0) && (BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM)) || \
0215         ((BOOST_PLAT_WINDOWS_SDK_VERSION < BOOST_WINAPI_WINDOWS_SDK_10_0) && BOOST_WINAPI_PARTITION_DESKTOP) \
0216     )
0217 
0218 #if defined(BOOST_USE_WINDOWS_H) || defined(BOOST_WINAPI_DEFINE_VERSION_MACROS)
0219 // We have to define the version macros so that windows.h provides the necessary symbols
0220 #if !defined(_WIN32_WINNT)
0221 #define _WIN32_WINNT BOOST_USE_WINAPI_VERSION
0222 #endif
0223 #if !defined(WINVER)
0224 #define WINVER BOOST_USE_WINAPI_VERSION
0225 #endif
0226 #if !defined(NTDDI_VERSION)
0227 #define NTDDI_VERSION BOOST_USE_NTDDI_VERSION
0228 #endif
0229 #if !defined(WINAPI_FAMILY) && defined(BOOST_USE_WINAPI_FAMILY)
0230 #define WINAPI_FAMILY BOOST_USE_WINAPI_FAMILY
0231 #endif
0232 #endif
0233 
0234 #if defined (WIN32_PLATFORM_PSPC)
0235 #define BOOST_WINAPI_IMPORT BOOST_SYMBOL_IMPORT
0236 #define BOOST_WINAPI_IMPORT_EXCEPT_WM
0237 #elif defined (_WIN32_WCE)
0238 #define BOOST_WINAPI_IMPORT
0239 #define BOOST_WINAPI_IMPORT_EXCEPT_WM
0240 #else
0241 #define BOOST_WINAPI_IMPORT BOOST_SYMBOL_IMPORT
0242 #define BOOST_WINAPI_IMPORT_EXCEPT_WM BOOST_SYMBOL_IMPORT
0243 #endif
0244 
0245 #include <boost/config.hpp>
0246 
0247 #ifdef BOOST_HAS_PRAGMA_ONCE
0248 #pragma once
0249 #endif
0250 
0251 #endif // BOOST_WINAPI_CONFIG_HPP_INCLUDED_