Reduce TLS accesses. (#11487)
[mono-project.git] / mono / metadata / w32subset.h
blobf4ccd471734ce221b74f5adb9ce1eb66713854fe
1 /**
2 * \file
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
17 #endif
18 #endif
20 #ifndef HAVE_API_SUPPORT_WIN32_GET_DRIVE_TYPE
21 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
22 #define HAVE_API_SUPPORT_WIN32_GET_DRIVE_TYPE 1
23 #endif
24 #endif
26 #ifndef HAVE_API_SUPPORT_WIN32_REPLACE_FILE
27 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
28 #define HAVE_API_SUPPORT_WIN32_REPLACE_FILE 1
29 #endif
30 #endif
32 #ifndef HAVE_API_SUPPORT_WIN32_COPY_FILE
33 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
34 #define HAVE_API_SUPPORT_WIN32_COPY_FILE 1
35 #endif
36 #endif
38 #ifndef HAVE_API_SUPPORT_WIN32_COPY_FILE2 // not on Windows7
39 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
40 #define HAVE_API_SUPPORT_WIN32_COPY_FILE2 1
41 #endif
42 #endif
44 #ifndef HAVE_API_SUPPORT_WIN32_LOCK_FILE
45 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
46 #define HAVE_API_SUPPORT_WIN32_LOCK_FILE 1
47 #endif
48 #endif
50 #ifndef HAVE_API_SUPPORT_WIN32_UNLOCK_FILE
51 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
52 #define HAVE_API_SUPPORT_WIN32_UNLOCK_FILE 1
53 #endif
54 #endif
56 #ifndef HAVE_API_SUPPORT_WIN32_MOVE_FILE
57 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
58 #define HAVE_API_SUPPORT_WIN32_MOVE_FILE 0
59 #elif G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
60 #define HAVE_API_SUPPORT_WIN32_MOVE_FILE 1
61 #endif
62 #endif
64 #ifndef HAVE_API_SUPPORT_WIN32_MOVE_FILE_EX
65 #if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) || G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
66 #define HAVE_API_SUPPORT_WIN32_MOVE_FILE_EX 1
67 #endif
68 #endif
70 #ifndef HAVE_API_SUPPORT_WIN32_GET_STD_HANDLE
71 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
72 #define HAVE_API_SUPPORT_WIN32_GET_STD_HANDLE 0
73 #elif G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
74 #define HAVE_API_SUPPORT_WIN32_GET_STD_HANDLE 1
75 #endif
76 #endif
78 #ifndef HAVE_API_SUPPORT_WIN32_GET_LOGICAL_DRIVE_STRINGS
79 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
80 #define HAVE_API_SUPPORT_WIN32_GET_LOGICAL_DRIVE_STRINGS 0
81 #elif G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
82 #define HAVE_API_SUPPORT_WIN32_GET_LOGICAL_DRIVE_STRINGS 1
83 #endif
84 #endif
86 #ifndef HAVE_API_SUPPORT_WIN32_SH_GET_FOLDER_PATH
87 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
88 #define HAVE_API_SUPPORT_WIN32_SH_GET_FOLDER_PATH 0
89 #elif G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
90 #define HAVE_API_SUPPORT_WIN32_SH_GET_FOLDER_PATH 1
91 #endif
92 #endif
94 #ifndef HAVE_API_SUPPORT_WIN32_SEND_MESSAGE_TIMEOUT
95 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
96 #define HAVE_API_SUPPORT_WIN32_SEND_MESSAGE_TIMEOUT 0
97 #elif G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
98 #define HAVE_API_SUPPORT_WIN32_SEND_MESSAGE_TIMEOUT 1
99 #endif
100 #endif
102 #ifndef HAVE_API_SUPPORT_WIN32_WAIT_FOR_INPUT_IDLE
103 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
104 #define HAVE_API_SUPPORT_WIN32_WAIT_FOR_INPUT_IDLE 0
105 #elif G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
106 #define HAVE_API_SUPPORT_WIN32_WAIT_FOR_INPUT_IDLE 1
107 #endif
108 #endif