1/*
2Copyright James E. King III, 2017
3Distributed under the Boost Software License, Version 1.0.
4(See accompanying file LICENSE_1_0.txt or copy at
5http://www.boost.org/LICENSE_1_0.txt)
6*/
7
8#ifndef BOOST_PREDEF_PLAT_WINDOWS_UWP_H
9#define BOOST_PREDEF_PLAT_WINDOWS_UWP_H
10
11#include <boost/predef/make.h>
12#include <boost/predef/os/windows.h>
13#include <boost/predef/version_number.h>
14
15/* tag::reference[]
16= `BOOST_PLAT_WINDOWS_UWP`
17
18http://docs.microsoft.com/windows/uwp/[Universal Windows Platform]
19is available if the current development environment is capable of targeting
20UWP development.
21
22[options="header"]
23|===
24| {predef_symbol} | {predef_version}
25
26| `+__MINGW64_VERSION_MAJOR+` from `+_mingw.h+` | `>= 3`
27| `VER_PRODUCTBUILD` from `ntverp.h` | `>= 9200`
28|===
29*/ // end::reference[]
30
31#define BOOST_PLAT_WINDOWS_UWP BOOST_VERSION_NUMBER_NOT_AVAILABLE
32#define BOOST_PLAT_WINDOWS_SDK_VERSION BOOST_VERSION_NUMBER_NOT_AVAILABLE
33
34#if BOOST_OS_WINDOWS
35// MinGW (32-bit), WinCE, and wineg++ don't have a ntverp.h header
36#if !defined(__MINGW32__) && !defined(_WIN32_WCE) && !defined(__WINE__)
37# include <ntverp.h>
38# undef BOOST_PLAT_WINDOWS_SDK_VERSION
39# define BOOST_PLAT_WINDOWS_SDK_VERSION BOOST_VERSION_NUMBER(0, 0, VER_PRODUCTBUILD)
40#endif
41
42// 9200 is Windows SDK 8.0 from ntverp.h which introduced family support
43#if ((BOOST_PLAT_WINDOWS_SDK_VERSION >= BOOST_VERSION_NUMBER(0, 0, 9200)) || \
44 (defined(__MINGW64__) && __MINGW64_VERSION_MAJOR >= 3))
45# undef BOOST_PLAT_WINDOWS_UWP
46# define BOOST_PLAT_WINDOWS_UWP BOOST_VERSION_NUMBER_AVAILABLE
47#endif
48#endif
49
50#if BOOST_PLAT_WINDOWS_UWP
51# define BOOST_PLAT_WINDOWS_UWP_AVAILABLE
52# include <boost/predef/detail/platform_detected.h>
53# include <winapifamily.h> // Windows SDK
54#endif
55
56#define BOOST_PLAT_WINDOWS_UWP_NAME "Universal Windows Platform"
57
58#endif
59
60#include <boost/predef/detail/test.h>
61BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_UWP, BOOST_PLAT_WINDOWS_UWP_NAME)
62

source code of include/boost/predef/platform/windows_uwp.h