]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/predef/test/platform_windows.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / predef / test / platform_windows.cpp
CommitLineData
b32b8144
FG
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#include <boost/predef/platform.h>
9
10//
11// This file is used to verify the BOOST_PLAT_WINDOWS_* logic.
12//
13// To exercise all of the combinations the CI build needs many
14// jobs where it defines all the different possible WINAPI_FAMILY
15// values on all supported platforms.
16//
17
18//
19// UWP is available on Windows SDK 8.0 or later, or on MinGW-w64 major release 3 or later
20//
21#if (defined(__MINGW64__) && (__MINGW64_VERSION_MAJOR >= 3)) || (BOOST_PLAT_WINDOWS_SDK_VERSION >= 9200)
22#if !BOOST_PLAT_WINDOWS_UWP
23#error "BOOST_PLAT_WINDOWS_UWP should be available"
24#endif
25#else
26#if BOOST_PLAT_WINDOWS_UWP
27#error "BOOST_PLAT_WINDOWS_UWP should not be available"
28#endif
29#endif
30
31#if !BOOST_PLAT_WINDOWS_UWP
32
33//
34// If BOOST_PLAT_WINDOWS_UWP is not available, none of the other BOOST_PLAT_WINDOWS_* are either
35// except for BOOST_PLAT_WINDOWS_DESKTOP which is available for backwards compatibility.
36//
37
38#if BOOST_OS_WINDOWS && !BOOST_PLAT_WINDOWS_DESKTOP
39#error "BOOST_PLAT_WINDOWS_DESKTOP should be available"
40#endif
41#if BOOST_PLAT_WINDOWS_PHONE
42#error "BOOST_PLAT_WINDOWS_PHONE should not be available"
43#endif
44#if BOOST_PLAT_WINDOWS_RUNTIME /* deprecated */
45#error "BOOST_PLAT_WINDOWS_RUNTIME should not be available"
46#endif
47#if BOOST_PLAT_WINDOWS_SERVER
48#error "BOOST_PLAT_WINDOWS_SERVER should not be available"
49#endif
50#if BOOST_PLAT_WINDOWS_STORE
51#error "BOOST_PLAT_WINDOWS_STORE should not be available"
52#endif
53#if BOOST_PLAT_WINDOWS_SYSTEM
54#error "BOOST_PLAT_WINDOWS_SYSTEM should not be available"
55#endif
56
57#else // !BOOST_PLAT_WINDOWS_UWP
58
59//
60// If BOOST_PLAT_WINDOWS_UWP is available, and the SDK supports a particular family,
61// and if WINAPI_FAMILY is set to it, then it and only it should be available.
62//
63
64#if !defined(WINAPI_FAMILY)
65#error "windows_uwp.h should have included <winapifamily.h> which should have defined supported families"
66#endif
67
68#if WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
69#if !BOOST_PLAT_WINDOWS_DESKTOP
70#error "BOOST_PLAT_WINDOWS_DESKTOP should be available"
71#endif
72#if BOOST_PLAT_WINDOWS_PHONE
73#error "BOOST_PLAT_WINDOWS_PHONE should not be available"
74#endif
75#if BOOST_PLAT_WINDOWS_RUNTIME /* deprecated */
76#error "BOOST_PLAT_WINDOWS_RUNTIME should not be available"
77#endif
78#if BOOST_PLAT_WINDOWS_SERVER
79#error "BOOST_PLAT_WINDOWS_SERVER should not be available"
80#endif
81#if BOOST_PLAT_WINDOWS_STORE
82#error "BOOST_PLAT_WINDOWS_STORE should not be available"
83#endif
84#if BOOST_PLAT_WINDOWS_SYSTEM
85#error "BOOST_PLAT_WINDOWS_SYSTEM should not be available"
86#endif
87#endif
88
89#if defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
90#if BOOST_PLAT_WINDOWS_DESKTOP
91#error "BOOST_PLAT_WINDOWS_DESKTOP should not be available"
92#endif
93#if !BOOST_PLAT_WINDOWS_PHONE
94#error "BOOST_PLAT_WINDOWS_PHONE should be available"
95#endif
96#if !BOOST_PLAT_WINDOWS_RUNTIME /* deprecated */
97#error "BOOST_PLAT_WINDOWS_RUNTIME should be available"
98#endif
99#if BOOST_PLAT_WINDOWS_SERVER
100#error "BOOST_PLAT_WINDOWS_SERVER should not be available"
101#endif
102#if BOOST_PLAT_WINDOWS_STORE
103#error "BOOST_PLAT_WINDOWS_STORE should not be available"
104#endif
105#if BOOST_PLAT_WINDOWS_SYSTEM
106#error "BOOST_PLAT_WINDOWS_SYSTEM should not be available"
107#endif
108#endif
109
110#if defined(WINAPI_FAMILY_SERVER_APP) && WINAPI_FAMILY == WINAPI_FAMILY_SERVER_APP
111#if BOOST_PLAT_WINDOWS_DESKTOP
112#error "BOOST_PLAT_WINDOWS_DESKTOP should not be available"
113#endif
114#if BOOST_PLAT_WINDOWS_PHONE
115#error "BOOST_PLAT_WINDOWS_PHONE should not be available"
116#endif
117#if BOOST_PLAT_WINDOWS_RUNTIME /* deprecated */
118#error "BOOST_PLAT_WINDOWS_RUNTIME should not be available"
119#endif
120#if !BOOST_PLAT_WINDOWS_SERVER
121#error "BOOST_PLAT_WINDOWS_SERVER should be available"
122#endif
123#if BOOST_PLAT_WINDOWS_STORE
124#error "BOOST_PLAT_WINDOWS_STORE should not be available"
125#endif
126#if BOOST_PLAT_WINDOWS_SYSTEM
127#error "BOOST_PLAT_WINDOWS_SYSTEM should not be available"
128#endif
129#endif
130
131// Store is WINAPI_FAMILY_APP in MinGW-w64 and in Windows SDK 8.0
132// then in Windows SDK 8.1 it was deprecated in favor of WINAPI_FAMILY_PC_APP
133
134#if ((defined(WINAPI_FAMILY_PC_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) || \
135 (defined(WINAPI_FAMILY_APP) && WINAPI_FAMILY == WINAPI_FAMILY_APP))
136#if BOOST_PLAT_WINDOWS_DESKTOP
137#error "BOOST_PLAT_WINDOWS_DESKTOP should not be available"
138#endif
139#if BOOST_PLAT_WINDOWS_PHONE
140#error "BOOST_PLAT_WINDOWS_PHONE should not be available"
141#endif
142#if !BOOST_PLAT_WINDOWS_RUNTIME /* deprecated */
143#error "BOOST_PLAT_WINDOWS_RUNTIME should be available"
144#endif
145#if BOOST_PLAT_WINDOWS_SERVER
146#error "BOOST_PLAT_WINDOWS_SERVER should not be available"
147#endif
148#if !BOOST_PLAT_WINDOWS_STORE
149#error "BOOST_PLAT_WINDOWS_STORE should be available"
150#endif
151#if BOOST_PLAT_WINDOWS_SYSTEM
152#error "BOOST_PLAT_WINDOWS_SYSTEM should not be available"
153#endif
154#endif
155
156#if defined(WINAPI_FAMILY_SYSTEM_APP) && WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM_APP
157#if BOOST_PLAT_WINDOWS_DESKTOP
158#error "BOOST_PLAT_WINDOWS_DESKTOP should not be available"
159#endif
160#if BOOST_PLAT_WINDOWS_PHONE
161#error "BOOST_PLAT_WINDOWS_PHONE should not be available"
162#endif
163#if BOOST_PLAT_WINDOWS_RUNTIME /* deprecated */
164#error "BOOST_PLAT_WINDOWS_RUNTIME should not be available"
165#endif
166#if BOOST_PLAT_WINDOWS_SERVER
167#error "BOOST_PLAT_WINDOWS_SERVER should not be available"
168#endif
169#if BOOST_PLAT_WINDOWS_STORE
170#error "BOOST_PLAT_WINDOWS_STORE should not be available"
171#endif
172#if !BOOST_PLAT_WINDOWS_SYSTEM
173#error "BOOST_PLAT_WINDOWS_SYSTEM should be available"
174#endif
175#endif
176
177#endif // !BOOST_PLAT_WINDOWS_UWP