[debugger] Ports from dotnet/runtime to maintain compatibility (#21653)
[mono-project.git] / winconfig.h
blobfd3f6f6e5124b6abd809c033d3411a86ca96ee00
1 #pragma once
3 #ifdef _MSC_VER
5 /* Building Mono runtime under MSVC uses this template for it's config.h since autogen.sh can't */
6 /* generate a config.h that is suitable for MSVC builds. The below template will still get */
7 /* some dynamic configuration from autogen.sh config.h, if one exists. */
8 #include <msvc/msvc-win32-support.h>
9 #include <msvc/msvc-disabled-warnings.h>
11 #ifdef HAVE_BOEHM_GC
12 /* Only used when building using Boehm GC and only supported on x86 builds */
13 #define DEFAULT_GC_NAME "Included Boehm (with typed GC)"
14 #endif
16 /* Some VES is available at runtime */
17 #define ENABLE_ILGEN 1
19 /* Start configure ENABLE_DEFINES picked up from cygconfig.h or other external source, if available */
20 /* @ENABLE_DEFINES@ */
21 /* End configure ENABLE_DEFINES picked up from cygconfig.h or other external source, if available */
23 /* Windows MSVC builds defaults to preemptive suspend. Disable ENABLE_HYBRID_SUSPEND defines. */
24 #undef ENABLE_HYBRID_SUSPEND
26 /* No ENABLE_DEFINES below this point */
29 /* Disable runtime state dumping */
30 #define DISABLE_CRASH_REPORTING 1
32 /* String of disabled features */
33 #define DISABLED_FEATURES "none"
35 /* Disables the IO portability layer */
36 #define DISABLE_PORTABILITY 1
38 /* Start configure DISABLE_DEFINES picked up from cygconfig.h or other external source, if available */
39 /* @DISABLE_DEFINES@ */
40 /* End configure DISABLE_DEFINES picked up from cygconfig.h or other external source, if available */
42 /* No DISABLE_DEFINES below this point */
44 /* Have access */
45 #define HAVE_ACCESS 1
47 /* Define to 1 if you have the `system' function. */
48 #if HAVE_WINAPI_FAMILY_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
49 #define HAVE_SYSTEM 1
50 #endif
52 /* Define to 1 if you have the <complex.h> header file. */
53 #define HAVE_COMPLEX_H 1
55 #if defined(HAVE_SGEN_GC) && !defined(HAVE_CONC_GC_AS_DEFAULT)
56 /* Defaults to concurrent GC */
57 #define HAVE_CONC_GC_AS_DEFAULT 1
58 #endif
60 /* Have /dev/random */
61 #define HAVE_CRYPT_RNG 1
63 /* Define to 1 if you have the `getaddrinfo' function. */
64 #define HAVE_GETADDRINFO 1
66 /* Define to 1 if you have the `getnameinfo' function. */
67 #define HAVE_GETNAMEINFO 1
69 /* Define to 1 if you have the `getprotobyname' function. */
70 #define HAVE_GETPROTOBYNAME 1
72 /* Have inet_ntop */
73 #define HAVE_INET_NTOP 1
75 /* Define to 1 if you have the `inet_pton' function. */
76 #define HAVE_INET_PTON 1
78 /* Define to 1 if you have the <inttypes.h> header file. */
79 #define HAVE_INTTYPES_H 1
81 /* Define to 1 if you have the <memory.h> header file. */
82 #define HAVE_MEMORY_H 1
84 #if defined(HAVE_SGEN_GC) && !defined(HAVE_MOVING_COLLECTOR)
85 /* Moving collector */
86 #define HAVE_MOVING_COLLECTOR 1
87 #endif
89 /* Define to 1 if you have the `signal' function. */
90 #define HAVE_SIGNAL 1
92 /* Define to 1 if you have the <signal.h> header file. */
93 #define HAVE_SIGNAL_H 1
95 /* Define to 1 if you have the <stdint.h> header file. */
96 #define HAVE_STDINT_H 1
98 /* Define to 1 if you have the <stdlib.h> header file. */
99 #define HAVE_STDLIB_H 1
101 /* Define to 1 if you have the <strings.h> header file. */
102 #define HAVE_STRINGS_H 1
104 /* Define to 1 if you have the <string.h> header file. */
105 #define HAVE_STRING_H 1
107 /* Define to 1 if you have the `strtok_r' function. */
108 #define HAVE_STRTOK_R 1
110 /* Have struct ip_mreq */
111 #define HAVE_STRUCT_IP_MREQ 1
113 /* Define to 1 if the system has the type `struct sockaddr_in6'. */
114 #define HAVE_STRUCT_SOCKADDR_IN6 1
116 /* Define to 1 if you have the <sys/stat.h> header file. */
117 #define HAVE_SYS_STAT_H 1
119 /* Define to 1 if you have the <sys/types.h> header file. */
120 #define HAVE_SYS_TYPES_H 1
122 /* Define to 1 if you have the <sys/utime.h> header file. */
123 #define HAVE_SYS_UTIME_H 1
125 /* Define to 1 if you have the <wchar.h> header file. */
126 #define HAVE_WCHAR_H 1
128 /* Define to 1 if you have the <winternl.h> header file. */
129 #define HAVE_WINTERNL_H 1
131 #if defined(HAVE_SGEN_GC) && !defined(HAVE_WRITE_BARRIERS)
132 #define HAVE_WRITE_BARRIERS
133 #endif
135 /* Start configure HAVE_DEFINES picked up from cygconfig.h or other external source, if available */
136 /* @HAVE_DEFINES@ */
137 /* End configure HAVE_DEFINES picked up from cygconfig.h or other external source, if available */
139 /* No HAVE_DEFINES below this point */
141 /* This platform does not support symlinks */
142 #define HOST_NO_SYMLINKS 1
144 /* Host Platform is Win32 */
145 #define HOST_WIN32 1
147 /* The architecture this is running on */
148 #if defined(_M_IA64)
149 #define MONO_ARCHITECTURE "ia64"
150 #elif defined(_M_AMD64)
151 #define MONO_ARCHITECTURE "amd64"
152 #elif defined(_M_IX86)
153 #define MONO_ARCHITECTURE "x86"
154 #else
155 #error Unknown architecture
156 #endif
158 /* Version of the corlib-runtime interface */
159 #define MONO_CORLIB_VERSION "#MONO_CORLIB_VERSION#"
161 /* Have __thread keyword */
162 #define MONO_KEYWORD_THREAD __declspec (thread)
164 /* Length of zero length arrays */
165 #define MONO_ZERO_LEN_ARRAY 1
167 /* Name of /dev/random */
168 #define NAME_DEV_RANDOM ""
170 /* Name of package */
171 #define PACKAGE "mono"
173 /* Define to the address where bug reports for this package should be sent. */
174 #define PACKAGE_BUGREPORT "https://github.com/mono/mono/issues/new"
176 /* Define to the full name of this package. */
177 #define PACKAGE_NAME "mono"
179 /* Define to the full name and version of this package. */
180 #define PACKAGE_STRING "mono #MONO_VERSION#"
182 /* Define to the one symbol short name of this package. */
183 #define PACKAGE_TARNAME "mono"
185 /* Define to the home page for this package. */
186 #define PACKAGE_URL ""
188 /* Define to the version of this package. */
189 #define PACKAGE_VERSION "#MONO_VERSION#"
191 /* The size of `int', as computed by sizeof. */
192 #define SIZEOF_INT 4
194 /* The size of `long', as computed by sizeof. */
195 #define SIZEOF_LONG 4
197 /* The size of `long long', as computed by sizeof. */
198 #define SIZEOF_LONG_LONG 8
200 /* size of target machine integer registers */
201 #ifdef _WIN64
202 #define SIZEOF_REGISTER 8
203 #else
204 #define SIZEOF_REGISTER 4
205 #endif
207 /* The size of `void *', as computed by sizeof. */
208 #ifdef _WIN64
209 #define SIZEOF_VOID_P 8
210 #else
211 #define SIZEOF_VOID_P 4
212 #endif
214 /* Define to 1 if you have the ANSI C header files. */
215 #define STDC_HEADERS 1
217 #ifdef _WIN64
218 #define TARGET_AMD64 1
219 #define HOST_AMD64 1
220 #else
221 #define TARGET_X86 1
222 #define HOST_X86 1
223 #endif
225 /* byte order of target */
226 #define TARGET_BYTE_ORDER G_BYTE_ORDER
228 /* wordsize of target */
229 #define TARGET_SIZEOF_VOID_P SIZEOF_VOID_P
231 /* Platform is Win32 */
232 #define TARGET_WIN32 1
234 /* Version number of package */
235 #define VERSION "#MONO_VERSION#"
237 #else
239 /* Not building under MSVC, use autogen.sh generated config.h */
240 #include "cygconfig.h"
242 #endif
244 #if defined(ENABLE_LLVM) && defined(HOST_WIN32) && defined(TARGET_WIN32) && (!defined(TARGET_AMD64) || !defined(_MSC_VER))
245 #error LLVM for host=Windows and target=Windows is only supported on x64 MSVC build.
246 #endif