MessagePack for C
Loading...
Searching...
No Matches
windows_uwp.h
Go to the documentation of this file.
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 MSGPACK_PREDEF_PLAT_WINDOWS_UWP_H
9#define MSGPACK_PREDEF_PLAT_WINDOWS_UWP_H
10
11#include <msgpack/predef/make.h>
14
15/*`
16[heading `MSGPACK_PLAT_WINDOWS_UWP`]
17
18[@http://docs.microsoft.com/windows/uwp/ Universal Windows Platform]
19is available if the current development environment is capable of targeting
20UWP development.
21
22[table
23 [[__predef_symbol__] [__predef_version__]]
24
25 [[`__MINGW64_VERSION_MAJOR` from `_mingw.h`] [`>= 3`]]
26 [[`VER_PRODUCTBUILD` from `ntverp.h`] [`>= 9200`]]
27]
28*/
29
30#define MSGPACK_PLAT_WINDOWS_UWP MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
31#define MSGPACK_PLAT_WINDOWS_SDK_VERSION MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
32
33#if MSGPACK_OS_WINDOWS
34// MinGW (32-bit) has no ntverp.h header
35#if !defined(__MINGW32__)
36# include <ntverp.h>
37# undef MSGPACK_PLAT_WINDOWS_SDK_VERSION
38# define MSGPACK_PLAT_WINDOWS_SDK_VERSION MSGPACK_VERSION_NUMBER(0, 0, VER_PRODUCTBUILD)
39#endif
40
41// 9200 is Windows SDK 8.0 from ntverp.h which introduced family support
42#if ((MSGPACK_PLAT_WINDOWS_SDK_VERSION >= MSGPACK_VERSION_NUMBER(0, 0, 9200)) || \
43 (defined(__MINGW64__) && __MINGW64_VERSION_MAJOR >= 3))
44# undef MSGPACK_PLAT_WINDOWS_UWP
45# define MSGPACK_PLAT_WINDOWS_UWP MSGPACK_VERSION_NUMBER_AVAILABLE
46#endif
47#endif
48
49#if MSGPACK_PLAT_WINDOWS_UWP
50# define MSGPACK_PLAT_WINDOWS_UWP_AVAILABLE
52# include <winapifamily.h> // Windows SDK
53#endif
54
55#define MSGPACK_PLAT_WINDOWS_UWP_NAME "Universal Windows Platform"
56
57#endif
58
#define MSGPACK_PREDEF_DECLARE_TEST(x, s)
Definition test.h:13
#define MSGPACK_PLAT_WINDOWS_UWP
Definition windows_uwp.h:30
#define MSGPACK_PLAT_WINDOWS_UWP_NAME
Definition windows_uwp.h:55