ReactOS 0.4.15-dev-7953-g1f49173
_mingw_mac.h
Go to the documentation of this file.
1
7#ifndef _INC_CRTDEFS_MACRO
8#define _INC_CRTDEFS_MACRO
9
10#define __STRINGIFY(x) #x
11#define __MINGW64_STRINGIFY(x) __STRINGIFY(x)
12
13#define __MINGW64_VERSION_MAJOR 1
14#define __MINGW64_VERSION_MINOR 1
15#define __MINGW64_VERSION_STR __MINGW64_STRINGIFY(__MINGW64_VERSION_MAJOR) "." __MINGW64_STRINGIFY(__MINGW64_VERSION_MINOR)
16#define __MINGW64_VERSION_STATE "alpha"
17
18/* mingw.org's version macros: these make gcc to define
19 MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global
20 and the __mingwthr_key_dtor() function from the MinGW
21 CRT in its private gthr-win32.h header. */
22#define __MINGW32_MAJOR_VERSION 3
23#define __MINGW32_MINOR_VERSION 11
24
25#ifndef _M_IX86
26/* MS does not prefix symbols by underscores for anything other than x86. */
27#ifndef __MINGW_USE_UNDERSCORE_PREFIX
28/* As we have to support older gcc version, which are using underscores
29 as symbol prefix for x64, we have to check here for the user label
30 prefix defined by gcc. */
31#ifdef __USER_LABEL_PREFIX__
32#pragma push_macro ("_")
33#undef _
34#define _ 1
35#if (__USER_LABEL_PREFIX__ + 0) != 0
36#define __MINGW_USE_UNDERSCORE_PREFIX 1
37#else
38#define __MINGW_USE_UNDERSCORE_PREFIX 0
39#endif
40#undef _
41#pragma pop_macro ("_")
42#else
43#define __MINGW_USE_UNDERSCORE_PREFIX 0
44#endif
45#endif
46#else
47/* For 32-bits we have always to prefix by underscore. */
48#undef __MINGW_USE_UNDERSCORE_PREFIX
49#define __MINGW_USE_UNDERSCORE_PREFIX 1
50#endif
51
52#if __MINGW_USE_UNDERSCORE_PREFIX == 0
53#define __MINGW_IMP_SYMBOL(sym) __imp_##sym
54#define __MINGW_USYMBOL(sym) sym
55#define __MINGW_LSYMBOL(sym) _##sym
56#else
57#define __MINGW_IMP_SYMBOL(sym) _imp__##sym
58#define __MINGW_USYMBOL(sym) _##sym
59#define __MINGW_LSYMBOL(sym) sym
60#endif
61
62/* Use alias for msvcr80 export of get/set_output_format. */
63#ifndef __USE_MINGW_OUTPUT_FORMAT_EMU
64#define __USE_MINGW_OUTPUT_FORMAT_EMU 1
65#endif
66
67/* Set VC specific compiler target macros. */
68#if defined(__x86_64) && defined(_X86_)
69#undef _X86_ /* _X86_ is not for __x86_64 */
70#endif
71
72#if defined(_X86_) && !defined(_M_IX86) && !defined(_M_IA64) \
73 && !defined(_M_AMD64) && !defined(__x86_64)
74#if defined(__i486__)
75#define _M_IX86 400
76#elif defined(__i586__)
77#define _M_IX86 500
78#else
79/* This gives wrong (600 instead of 300) value if -march=i386 is specified
80 but we cannot check for__i386__ as it is defined for all 32-bit CPUs. */
81#define _M_IX86 600
82#endif
83#endif
84
85#if defined(__x86_64) && !defined(_M_IX86) && !defined(_M_IA64) \
86 && !defined(_M_AMD64)
87#define _M_AMD64 100
88#define _M_X64 100
89#endif
90
91#if defined(__ia64__) && !defined(_M_IX86) && !defined(_M_IA64) \
92 && !defined(_M_AMD64) && !defined(_X86_) && !defined(__x86_64)
93#define _M_IA64 100
94#endif
95
96#ifndef __PTRDIFF_TYPE__
97#ifdef _WIN64
98#define __PTRDIFF_TYPE__ long long int
99#else
100#define __PTRDIFF_TYPE__ long int
101#endif
102#endif
103
104#ifndef __SIZE_TYPE__
105#ifdef _WIN64
106#define __SIZE_TYPE__ long long unsigned int
107#else
108#define __SIZE_TYPE__ long unsigned int
109#endif
110#endif
111
112#ifndef __WCHAR_TYPE__
113#define __WCHAR_TYPE__ unsigned short
114#endif
115#ifndef __WINT_TYPE__
116#define __WINT_TYPE__ unsigned short
117#endif
118
119#undef __MINGW_EXTENSION
120#if defined(__GNUC__) || defined(__GNUG__)
121#define __MINGW_EXTENSION __extension__
122#else
123#define __MINGW_EXTENSION
124#endif
125
126/* Special case nameless struct/union. */
127#ifndef __C89_NAMELESS
128#define __C89_NAMELESS __MINGW_EXTENSION
129
130#define __C89_NAMELESSSTRUCTNAME
131#define __C89_NAMELESSUNIONNAME
132#endif
133
134#ifndef __GNU_EXTENSION
135#define __GNU_EXTENSION __MINGW_EXTENSION
136#endif
137
138/* MinGW-w64 has some additional C99 printf/scanf feature support.
139 So we add some helper macros to ease recognition of them. */
140#define __MINGW_HAVE_ANSI_C99_PRINTF 1
141#define __MINGW_HAVE_WIDE_C99_PRINTF 1
142#define __MINGW_HAVE_ANSI_C99_SCANF 1
143#define __MINGW_HAVE_WIDE_C99_SCANF 1
144
145#endif /* _INC_CRTDEFS_MACRO */
146