2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
7 #ifndef _INC_CRTDEFS_MACRO
8 #define _INC_CRTDEFS_MACRO
10 #define __STRINGIFY(x) #x
11 #define __MINGW64_STRINGIFY(x) __STRINGIFY(x)
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"
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
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 ("_")
35 #if (__USER_LABEL_PREFIX__ + 0) != 0
36 #define __MINGW_USE_UNDERSCORE_PREFIX 1
38 #define __MINGW_USE_UNDERSCORE_PREFIX 0
41 #pragma pop_macro ("_")
43 #define __MINGW_USE_UNDERSCORE_PREFIX 0
47 /* For 32-bits we have always to prefix by underscore. */
48 #undef __MINGW_USE_UNDERSCORE_PREFIX
49 #define __MINGW_USE_UNDERSCORE_PREFIX 1
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
57 #define __MINGW_IMP_SYMBOL(sym) _imp__##sym
58 #define __MINGW_USYMBOL(sym) _##sym
59 #define __MINGW_LSYMBOL(sym) sym
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
67 /* Set VC specific compiler target macros. */
68 #if defined(__x86_64) && defined(_X86_)
69 #undef _X86_ /* _X86_ is not for __x86_64 */
72 #if defined(_X86_) && !defined(_M_IX86) && !defined(_M_IA64) \
73 && !defined(_M_AMD64) && !defined(__x86_64)
76 #elif defined(__i586__)
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. */
85 #if defined(__x86_64) && !defined(_M_IX86) && !defined(_M_IA64) \
91 #if defined(__ia64__) && !defined(_M_IX86) && !defined(_M_IA64) \
92 && !defined(_M_AMD64) && !defined(_X86_) && !defined(__x86_64)
96 #ifndef __PTRDIFF_TYPE__
98 #define __PTRDIFF_TYPE__ long long int
100 #define __PTRDIFF_TYPE__ long int
104 #ifndef __SIZE_TYPE__
106 #define __SIZE_TYPE__ long long unsigned int
108 #define __SIZE_TYPE__ long unsigned int
112 #ifndef __WCHAR_TYPE__
113 #define __WCHAR_TYPE__ unsigned short
115 #ifndef __WINT_TYPE__
116 #define __WINT_TYPE__ unsigned short
119 #undef __MINGW_EXTENSION
120 #if defined(__GNUC__) || defined(__GNUG__)
121 #define __MINGW_EXTENSION __extension__
123 #define __MINGW_EXTENSION
126 /* Special case nameless struct/union. */
127 #ifndef __C89_NAMELESS
128 #define __C89_NAMELESS __MINGW_EXTENSION
130 #define __C89_NAMELESSSTRUCTNAME
131 #define __C89_NAMELESSUNIONNAME
134 #ifndef __GNU_EXTENSION
135 #define __GNU_EXTENSION __MINGW_EXTENSION
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
145 #endif /* _INC_CRTDEFS_MACRO */