3 * Define Win32 API subset defaults.
4 * Other subsetters can fork this file, or
5 * define symbols ahead of it, or after it (with undef).
7 * Note that #if of an undefined symbols is defined as if 0,
8 * so that an implicit default here.
10 * Copyright 2018 Microsoft
11 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
14 #ifndef HAVE_API_SUPPORT_WIN32_GET_COMPUTER_NAME
15 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
16 #define HAVE_API_SUPPORT_WIN32_GET_COMPUTER_NAME 1
18 #define HAVE_API_SUPPORT_WIN32_GET_COMPUTER_NAME 0
22 #ifndef HAVE_API_SUPPORT_WIN32_GET_DRIVE_TYPE
23 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
24 #define HAVE_API_SUPPORT_WIN32_GET_DRIVE_TYPE 1
26 #define HAVE_API_SUPPORT_WIN32_GET_DRIVE_TYPE 0
30 #ifndef HAVE_API_SUPPORT_WIN32_REPLACE_FILE
31 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
32 #define HAVE_API_SUPPORT_WIN32_REPLACE_FILE 1
34 #define HAVE_API_SUPPORT_WIN32_REPLACE_FILE 0
38 #ifndef HAVE_API_SUPPORT_WIN32_COPY_FILE
39 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
40 #define HAVE_API_SUPPORT_WIN32_COPY_FILE 1
42 #define HAVE_API_SUPPORT_WIN32_COPY_FILE 0
46 #ifndef HAVE_API_SUPPORT_WIN32_COPY_FILE2 // not on Windows7
47 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
48 #define HAVE_API_SUPPORT_WIN32_COPY_FILE2 1
50 #define HAVE_API_SUPPORT_WIN32_COPY_FILE2 0
54 #ifndef HAVE_API_SUPPORT_WIN32_LOCK_FILE
55 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
56 #define HAVE_API_SUPPORT_WIN32_LOCK_FILE 1
58 #define HAVE_API_SUPPORT_WIN32_LOCK_FILE 0
62 #ifndef HAVE_API_SUPPORT_WIN32_UNLOCK_FILE
63 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
64 #define HAVE_API_SUPPORT_WIN32_UNLOCK_FILE 1
66 #define HAVE_API_SUPPORT_WIN32_UNLOCK_FILE 0
70 #ifndef HAVE_API_SUPPORT_WIN32_MOVE_FILE
71 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
72 #define HAVE_API_SUPPORT_WIN32_MOVE_FILE 1
74 #define HAVE_API_SUPPORT_WIN32_MOVE_FILE 0
78 #ifndef HAVE_API_SUPPORT_WIN32_MOVE_FILE_EX
79 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
80 #define HAVE_API_SUPPORT_WIN32_MOVE_FILE_EX 1
82 #define HAVE_API_SUPPORT_WIN32_MOVE_FILE_EX 0
86 #ifndef HAVE_API_SUPPORT_WIN32_GET_STD_HANDLE
87 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
88 #define HAVE_API_SUPPORT_WIN32_GET_STD_HANDLE 1
90 #define HAVE_API_SUPPORT_WIN32_GET_STD_HANDLE 0
94 #ifndef HAVE_API_SUPPORT_WIN32_GET_FILE_SIZE_EX
95 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
96 #define HAVE_API_SUPPORT_WIN32_GET_FILE_SIZE_EX 1
98 #define HAVE_API_SUPPORT_WIN32_GET_FILE_SIZE_EX 0
102 #ifndef HAVE_API_SUPPORT_WIN32_GET_LOGICAL_DRIVE_STRINGS
103 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
104 #define HAVE_API_SUPPORT_WIN32_GET_LOGICAL_DRIVE_STRINGS 1
106 #define HAVE_API_SUPPORT_WIN32_GET_LOGICAL_DRIVE_STRINGS 0
110 #ifndef HAVE_API_SUPPORT_WIN32_SH_GET_FOLDER_PATH
111 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
112 #define HAVE_API_SUPPORT_WIN32_SH_GET_FOLDER_PATH 1
114 #define HAVE_API_SUPPORT_WIN32_SH_GET_FOLDER_PATH 0
118 #ifndef HAVE_API_SUPPORT_WIN32_SEND_MESSAGE_TIMEOUT
119 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
120 #define HAVE_API_SUPPORT_WIN32_SEND_MESSAGE_TIMEOUT 1
122 #define HAVE_API_SUPPORT_WIN32_SEND_MESSAGE_TIMEOUT 0
126 #ifndef HAVE_API_SUPPORT_WIN32_WAIT_FOR_INPUT_IDLE
127 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
128 #define HAVE_API_SUPPORT_WIN32_WAIT_FOR_INPUT_IDLE 1
130 #define HAVE_API_SUPPORT_WIN32_WAIT_FOR_INPUT_IDLE 0
134 #ifndef HAVE_API_SUPPORT_WIN32_SIGNAL_OBJECT_AND_WAIT
135 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
136 #define HAVE_API_SUPPORT_WIN32_SIGNAL_OBJECT_AND_WAIT 1
138 #define HAVE_API_SUPPORT_WIN32_SIGNAL_OBJECT_AND_WAIT 0
142 #ifndef HAVE_API_SUPPORT_WIN32_MSG_WAIT_FOR_MULTIPLE_OBJECTS
143 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
144 #define HAVE_API_SUPPORT_WIN32_MSG_WAIT_FOR_MULTIPLE_OBJECTS 1
146 #define HAVE_API_SUPPORT_WIN32_MSG_WAIT_FOR_MULTIPLE_OBJECTS 0
150 #ifndef HAVE_API_SUPPORT_WIN32_SET_ERROR_MODE
151 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
152 #define HAVE_API_SUPPORT_WIN32_SET_ERROR_MODE 1
154 #define HAVE_API_SUPPORT_WIN32_SET_ERROR_MODE 0
158 #ifndef HAVE_API_SUPPORT_WIN32_LOAD_LIBRARY
159 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
160 #define HAVE_API_SUPPORT_WIN32_LOAD_LIBRARY 1
162 #define HAVE_API_SUPPORT_WIN32_LOAD_LIBRARY 0
166 #ifndef HAVE_API_SUPPORT_WIN32_LOAD_PACKAGED_LIBRARY
167 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
168 #define HAVE_API_SUPPORT_WIN32_LOAD_PACKAGED_LIBRARY 1
170 #define HAVE_API_SUPPORT_WIN32_LOAD_PACKAGED_LIBRARY 0
174 #ifndef HAVE_API_SUPPORT_WIN32_GET_MODULE_HANDLE
175 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
176 #define HAVE_API_SUPPORT_WIN32_GET_MODULE_HANDLE 1
178 #define HAVE_API_SUPPORT_WIN32_GET_MODULE_HANDLE 0
182 #ifndef HAVE_API_SUPPORT_WIN32_SET_THREAD_CONTEXT
183 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
184 #define HAVE_API_SUPPORT_WIN32_SET_THREAD_CONTEXT 1
186 #define HAVE_API_SUPPORT_WIN32_SET_THREAD_CONTEXT 0
190 #ifndef HAVE_API_SUPPORT_WIN32_CANCEL_SYNCHRONOUS_IO
191 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
192 #define HAVE_API_SUPPORT_WIN32_CANCEL_SYNCHRONOUS_IO 1
194 #define HAVE_API_SUPPORT_WIN32_CANCEL_SYNCHRONOUS_IO 0
198 #ifndef HAVE_API_SUPPORT_WIN32_OPEN_THREAD
199 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
200 #define HAVE_API_SUPPORT_WIN32_OPEN_THREAD 1
202 #define HAVE_API_SUPPORT_WIN32_OPEN_THREAD 0
206 #ifndef HAVE_API_SUPPORT_WIN32_IS_WOW64_PROCESS
207 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
208 #define HAVE_API_SUPPORT_WIN32_IS_WOW64_PROCESS 1
210 #define HAVE_API_SUPPORT_WIN32_IS_WOW64_PROCESS 0
214 #ifndef HAVE_SET_THREAD_DESCRIPTION
215 #define HAVE_SET_THREAD_DESCRIPTION 0
218 #ifndef HAVE_SET_THREAD_NAME
219 // https://github.com/microsoft/xbox-live-api/blob/90b38b434d9c13ce4916c116cd28a98b239e38e2/InProgressSamples/Kits/ATGTK/ThreadHelpers.h#L21
220 #if defined(_XBOX_ONE) && defined(_TITLE)
221 #define HAVE_SET_THREAD_NAME 1
223 #define HAVE_SET_THREAD_NAME 0