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 within this package.
12 #define MINGW64_VERSION 1.0
13 #define MINGW64_VERSION_MAJOR 1
14 #define MINGW64_VERSION_MINOR 0
15 #define MINGW64_VERSION_STATE "alpha"
19 # ifndef __MINGW_IMPORT
20 # define __MINGW_IMPORT __declspec(dllimport)
23 # define _CRTIMP __declspec(dllimport)
25 # define __DECLSPEC_SUPPORTED
26 # define __attribute__(x) /* nothing */
29 # ifndef __MINGW_IMPORT
30 /* Note the extern. This is needed to work around GCC's
31 limitations in handling dllimport attribute. */
32 # define __MINGW_IMPORT extern __attribute__ ((__dllimport__))
36 # define _CRTIMP __attribute__ ((dllimport))
41 # define __DECLSPEC_SUPPORTED
42 # else /* __declspec */
43 # undef __DECLSPEC_SUPPORTED
44 # undef __MINGW_IMPORT
48 # endif /* __declspec */
50 # define __cdecl __attribute__ ((__cdecl__))
53 # define __stdcall __attribute__ ((__stdcall__))
56 #if defined (__GNUC__) && defined (__GNUC_MINOR__)
57 #define __MINGW_GNUC_PREREQ(major, minor) \
59 || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
61 #define __MINGW_GNUC_PREREQ(major, minor) 0
64 #define USE___UUIDOF 0
67 # define __CRT_INLINE inline
69 # if ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L)
70 # define __CRT_INLINE extern inline __attribute__((__gnu_inline__))
72 # define __CRT_INLINE extern __inline__
77 # define __UNUSED_PARAM(x)
80 # define __UNUSED_PARAM(x) x __attribute__ ((__unused__))
82 # define __UNUSED_PARAM(x) x
87 #define __MINGW_ATTRIB_NORETURN __attribute__ ((__noreturn__))
88 #define __MINGW_ATTRIB_CONST __attribute__ ((__const__))
90 #define __MINGW_ATTRIB_NORETURN
91 #define __MINGW_ATTRIB_CONST
94 #if __MINGW_GNUC_PREREQ (3, 0)
95 #define __MINGW_ATTRIB_MALLOC __attribute__ ((__malloc__))
96 #define __MINGW_ATTRIB_PURE __attribute__ ((__pure__))
98 #define __MINGW_ATTRIB_MALLOC
99 #define __MINGW_ATTRIB_PURE
102 /* Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
103 variadiac macro facility, because variadic macros cause syntax
104 errors with --traditional-cpp. */
105 #if __MINGW_GNUC_PREREQ (3, 3)
106 #define __MINGW_ATTRIB_NONNULL(arg) __attribute__ ((__nonnull__ (arg)))
108 #define __MINGW_ATTRIB_NONNULL(arg)
109 #endif /* GNUC >= 3.3 */
111 #if __MINGW_GNUC_PREREQ (3, 1)
112 #define __MINGW_ATTRIB_DEPRECATED __attribute__ ((__deprecated__))
114 #define __MINGW_ATTRIB_DEPRECATED
115 #endif /* GNUC >= 3.1 */
117 #if __MINGW_GNUC_PREREQ (3, 3)
118 #define __MINGW_NOTHROW __attribute__ ((__nothrow__))
120 #define __MINGW_NOTHROW
121 #endif /* GNUC >= 3.3 */
123 #ifndef __MSVCRT_VERSION__
124 /* High byte is the major version, low byte is the minor. */
125 # define __MSVCRT_VERSION__ 0x0700
130 //#define WINVER 0x0502
134 #define _WIN32_WINNT 0x502
137 #ifndef _INT128_DEFINED
138 #define _INT128_DEFINED
141 #define __int16 short
143 #define __int64 long long
146 typedef int __int128
__attribute__ ((mode (TI
)));
152 #define __unaligned __attribute ((packed))
153 #define __forceinline extern __inline
158 #error Only Win32 target is supported!
161 #if defined (__i386__)
164 #define _ATTRIBUTES shared
169 #define __nothrow __declspec(nothrow)
178 #define _CRT_PACKING 8
181 #undef USE_MINGW_SETJMP_TWO_ARGS
182 #define USE_MINGW_SETJMP_TWO_ARGS
185 #pragma pack(push,_CRT_PACKING)
193 #ifndef _CRT_STRINGIZE
194 #define __CRT_STRINGIZE(_Value) #_Value
195 #define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
199 #define __CRT_WIDE(_String) L ## _String
200 #define _CRT_WIDE(_String) __CRT_WIDE(_String)
207 #ifndef _CRTIMP_NOIA64
209 #define _CRTIMP_NOIA64
211 #define _CRTIMP_NOIA64 _CRTIMP
216 #define _CRTIMP2 _CRTIMP
219 #ifndef _CRTIMP_ALTERNATIVE
220 #define _CRTIMP_ALTERNATIVE _CRTIMP
221 #define _CRT_ALTERNATIVE_IMPORTED
225 #define _MRTIMP2 _CRTIMP
237 #define _MCRTIMP _CRTIMP
241 #define _CRTIMP_PURE _CRTIMP
252 #define __STDC_SECURE_LIB__ 200411L
253 #define __GOT_SECURE_LIB__ __STDC_SECURE_LIB__
254 #define _SECURECRT_FILL_BUFFER_PATTERN 0xFD
255 #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated)
257 #ifndef _CRT_INSECURE_DEPRECATE_MEMORY
258 #define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)
260 #ifndef _CRT_INSECURE_DEPRECATE_GLOBALS
261 #define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
263 #ifndef _CRT_MANAGED_HEAP_DEPRECATE
264 #define _CRT_MANAGED_HEAP_DEPRECATE
267 #ifndef _CRT_OBSOLETE
268 #define _CRT_OBSOLETE(_NewItem)
271 #ifndef _SIZE_T_DEFINED
272 #define _SIZE_T_DEFINED
275 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
276 typedef unsigned int size_t __attribute__ ((mode (DI
)));
278 typedef unsigned __int64
size_t;
281 typedef unsigned int size_t;
285 #ifndef _SSIZE_T_DEFINED
286 #define _SSIZE_T_DEFINED
289 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
290 typedef int ssize_t
__attribute__ ((mode (DI
)));
292 typedef __int64 ssize_t
;
299 #ifndef _INTPTR_T_DEFINED
300 #define _INTPTR_T_DEFINED
301 #ifndef __intptr_t_defined
302 #define __intptr_t_defined
305 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
306 typedef int intptr_t __attribute__ ((mode (DI
)));
308 typedef __int64
intptr_t;
311 typedef int intptr_t;
316 #ifndef _UINTPTR_T_DEFINED
317 #define _UINTPTR_T_DEFINED
318 #ifndef __uintptr_t_defined
319 #define __uintptr_t_defined
322 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
323 typedef unsigned int uintptr_t __attribute__ ((mode (DI
)));
325 typedef unsigned __int64
uintptr_t;
328 typedef unsigned int uintptr_t;
333 #ifndef _PTRDIFF_T_DEFINED
334 #define _PTRDIFF_T_DEFINED
338 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
339 typedef int ptrdiff_t __attribute__ ((mode (DI
)));
341 typedef __int64
ptrdiff_t;
344 typedef int ptrdiff_t;
349 #ifndef _WCHAR_T_DEFINED
350 #define _WCHAR_T_DEFINED
352 typedef unsigned short wchar_t;
356 #ifndef _WCTYPE_T_DEFINED
357 #define _WCTYPE_T_DEFINED
358 typedef unsigned short wint_t;
359 typedef unsigned short wctype_t;
362 #ifndef __GNUC_VA_LIST
363 #define __GNUC_VA_LIST
364 typedef __builtin_va_list __gnuc_va_list
;
367 #ifndef _VA_LIST_DEFINED
368 #define _VA_LIST_DEFINED
369 typedef __gnuc_va_list
va_list;
372 #ifdef _USE_32BIT_TIME_T
374 #error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64
375 #undef _USE_32BIT_TIME_T
378 #if _INTEGRAL_MAX_BITS < 64
379 #define _USE_32BIT_TIME_T
383 #ifndef _ERRCODE_DEFINED
384 #define _ERRCODE_DEFINED
389 #ifndef _TIME32_T_DEFINED
390 #define _TIME32_T_DEFINED
391 typedef long __time32_t
;
394 #ifndef _TIME64_T_DEFINED
395 #define _TIME64_T_DEFINED
396 typedef __int64 __time64_t
;
399 #ifndef _TIME_T_DEFINED
400 #define _TIME_T_DEFINED
401 #ifdef _USE_32BIT_TIME_T
402 typedef __time32_t
time_t;
404 typedef __time64_t
time_t;
408 #ifndef _CONST_RETURN
409 #define _CONST_RETURN
412 #ifndef __CRT_UNALIGNED
413 #define __CRT_UNALIGNED
417 #if defined(__ia64__) || defined(__x86_64)
418 #define UNALIGNED __CRT_UNALIGNED
425 #define _CRT_ALIGN(x) __attribute__ ((aligned(x)))
437 #define __CRTDECL __cdecl
443 #define _TRUNCATE ((size_t)-1)
445 struct threadlocaleinfostruct
;
446 struct threadmbcinfostruct
;
447 typedef struct threadlocaleinfostruct
*pthreadlocinfo
;
448 typedef struct threadmbcinfostruct
*pthreadmbcinfo
;
449 struct __lc_time_data
;
451 typedef struct localeinfo_struct
{
452 pthreadlocinfo locinfo
;
453 pthreadmbcinfo mbcinfo
;
454 } _locale_tstruct
,*_locale_t
;
456 #ifndef _TAGLC_ID_DEFINED
457 #define _TAGLC_ID_DEFINED
458 typedef struct tagLC_ID
{
459 unsigned short wLanguage
;
460 unsigned short wCountry
;
461 unsigned short wCodePage
;
465 #ifndef _THREADLOCALEINFO
466 #define _THREADLOCALEINFO
467 typedef struct threadlocaleinfostruct
{
469 unsigned int lc_codepage
;
470 unsigned int lc_collate_cp
;
471 unsigned long lc_handle
[6];
481 int *lconv_intl_refcount
;
482 int *lconv_num_refcount
;
483 int *lconv_mon_refcount
;
485 int *ctype1_refcount
;
486 unsigned short *ctype1
;
487 const unsigned short *pctype
;
488 const unsigned char *pclmap
;
489 const unsigned char *pcumap
;
490 struct __lc_time_data
*lc_time_curr
;
498 #define __crt_typefix(ctype)
501 #define _CRT_UNUSED(x) (void)x