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.
11 #ifdef _USE_32BIT_TIME_T
13 #error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64
14 #undef _USE_32BIT_TIME_T
17 #if _INTEGRAL_MAX_BITS < 64
18 #define _USE_32BIT_TIME_T
22 /* Disable non-ANSI C definitions if compiling with __STDC__ */
29 /** Properties ***************************************************************/
32 #define _CRT_PACKING 8
33 #pragma pack(push,_CRT_PACKING)
35 #ifndef _CRT_STRINGIZE
36 #define __CRT_STRINGIZE(_Value) #_Value
37 #define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
41 #define __CRT_WIDE(_String) L ## _String
42 #define _CRT_WIDE(_String) __CRT_WIDE(_String)
46 #if !defined(_midl) && defined(_X86_) && _MSC_VER >= 1300
54 #ifdef CRTDLL /* Defined for ntdll, crtdll, msvcrt, etc */
55 #define _CRTIMP __declspec(dllexport)
57 #define _CRTIMP __declspec(dllimport)
58 #else /* !CRTDLL && !_DLL */
60 #endif /* CRTDLL || _DLL */
63 //#define _CRT_ALTERNATIVE_INLINES
67 #ifdef _CRT_ALTERNATIVE_INLINES
70 #define _CRTIMP_ALT _CRTIMP
71 #define _CRT_ALTERNATIVE_IMPORTED
82 #define _CRTDATA(x) _CRTIMP x
87 #define _CRTIMP2 _CRTIMP
91 #define _CRTIMP_PURE _CRTIMP
94 #ifndef _CRTIMP_ALTERNATIVE
95 #define _CRTIMP_ALTERNATIVE _CRTIMP
96 #define _CRT_ALTERNATIVE_IMPORTED
99 #ifndef _CRTIMP_NOIA64
101 #define _CRTIMP_NOIA64
103 #define _CRTIMP_NOIA64 _CRTIMP
108 #define _MRTIMP2 _CRTIMP
112 #define _MCRTIMP _CRTIMP
123 #ifndef _CONST_RETURN
124 #define _CONST_RETURN
128 #if defined(__ia64__) || defined(__x86_64)
129 #define UNALIGNED __unaligned
136 #define _CRT_ALIGN(x) __attribute__ ((aligned(x)))
148 #define __CRTDECL __cdecl
152 #define _CRT_UNUSED(x) (void)x
155 #ifndef _CONST_RETURN
157 #define _CONST_RETURN const
158 #define _CRT_CONST_CORRECT_OVERLOADS
160 #define _CONST_RETURN
164 #define __crt_typefix(ctype)
167 /** Deprecated ***************************************************************/
170 #define _CRT_DEPRECATE_TEXT(_Text) __attribute__ ((deprecated))
171 #elif defined(_MSC_VER)
172 #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
174 #define _CRT_DEPRECATE_TEXT(_Text)
177 #ifndef __STDC_WANT_SECURE_LIB__
178 #define __STDC_WANT_SECURE_LIB__ 1
181 #ifndef _CRT_INSECURE_DEPRECATE
182 # ifdef _CRT_SECURE_NO_DEPRECATE
183 # define _CRT_INSECURE_DEPRECATE(_Replacement)
185 # define _CRT_INSECURE_DEPRECATE(_Replacement) \
186 _CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead!")
190 #ifndef _CRT_INSECURE_DEPRECATE_CORE
191 # ifdef _CRT_SECURE_NO_DEPRECATE_CORE
192 # define _CRT_INSECURE_DEPRECATE_CORE(_Replacement)
194 # define _CRT_INSECURE_DEPRECATE_CORE(_Replacement) \
195 _CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead! Enable _CRT_SECURE_NO_DEPRECATE to avoid thie warning.")
199 #ifndef _CRT_NONSTDC_DEPRECATE
200 # ifdef _CRT_NONSTDC_NO_DEPRECATE
201 # define _CRT_NONSTDC_DEPRECATE(_Replacement)
203 # define _CRT_NONSTDC_DEPRECATE(_Replacement) \
204 _CRT_DEPRECATE_TEXT("Deprecated POSIX name, Try " #_Replacement " instead!")
208 #ifndef _CRT_INSECURE_DEPRECATE_MEMORY
209 #define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)
212 #ifndef _CRT_INSECURE_DEPRECATE_GLOBALS
213 #define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
216 #ifndef _CRT_MANAGED_HEAP_DEPRECATE
217 #define _CRT_MANAGED_HEAP_DEPRECATE
220 #ifndef _CRT_OBSOLETE
221 #define _CRT_OBSOLETE(_NewItem)
225 /** Constants ****************************************************************/
230 #define _TRUNCATE ((size_t)-1)
233 #define __STDC_SECURE_LIB__ 200411L
234 #define __GOT_SECURE_LIB__ __STDC_SECURE_LIB__
235 #define _SECURECRT_FILL_BUFFER_PATTERN 0xFD
238 /** Type definitions *********************************************************/
244 #ifndef _SIZE_T_DEFINED
245 #define _SIZE_T_DEFINED
248 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
249 typedef unsigned int size_t __attribute__ ((mode (DI
)));
251 __MINGW_EXTENSION
typedef unsigned __int64
size_t;
254 typedef unsigned int size_t;
258 #ifndef _INTPTR_T_DEFINED
259 #define _INTPTR_T_DEFINED
260 #ifndef __intptr_t_defined
261 #define __intptr_t_defined
264 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
265 typedef int intptr_t __attribute__ ((mode (DI
)));
267 __MINGW_EXTENSION
typedef __int64
intptr_t;
270 typedef int intptr_t;
275 #ifndef _UINTPTR_T_DEFINED
276 #define _UINTPTR_T_DEFINED
277 #ifndef __uintptr_t_defined
278 #define __uintptr_t_defined
281 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
282 typedef unsigned int uintptr_t __attribute__ ((mode (DI
)));
284 __MINGW_EXTENSION
typedef unsigned __int64
uintptr_t;
287 typedef unsigned int uintptr_t;
292 #ifndef _PTRDIFF_T_DEFINED
293 #define _PTRDIFF_T_DEFINED
297 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
298 typedef int ptrdiff_t __attribute__ ((mode (DI
)));
300 __MINGW_EXTENSION
typedef __int64
ptrdiff_t;
303 typedef int ptrdiff_t;
308 #ifndef _WCHAR_T_DEFINED
309 #define _WCHAR_T_DEFINED
311 typedef unsigned short wchar_t;
315 #ifndef _WCTYPE_T_DEFINED
316 #define _WCTYPE_T_DEFINED
317 typedef unsigned short wint_t;
318 typedef unsigned short wctype_t;
321 #ifndef _ERRCODE_DEFINED
322 #define _ERRCODE_DEFINED
327 #ifndef _TIME32_T_DEFINED
328 #define _TIME32_T_DEFINED
329 typedef long __time32_t
;
332 #ifndef _TIME64_T_DEFINED
333 #define _TIME64_T_DEFINED
334 #if _INTEGRAL_MAX_BITS >= 64
335 __MINGW_EXTENSION
typedef __int64 __time64_t
;
339 #ifndef _TIME_T_DEFINED
340 #define _TIME_T_DEFINED
341 #ifdef _USE_32BIT_TIME_T
342 typedef __time32_t
time_t;
344 typedef __time64_t
time_t;
348 struct threadlocaleinfostruct
;
349 typedef struct threadlocaleinfostruct
*pthreadlocinfo
;
351 struct threadmbcinfostruct
;
352 typedef struct threadmbcinfostruct
*pthreadmbcinfo
;
354 struct __lc_time_data
;
356 typedef struct localeinfo_struct
{
357 pthreadlocinfo locinfo
;
358 pthreadmbcinfo mbcinfo
;
359 } _locale_tstruct
,*_locale_t
;
361 #ifndef _TAGLC_ID_DEFINED
362 #define _TAGLC_ID_DEFINED
363 typedef struct tagLC_ID
{
364 unsigned short wLanguage
;
365 unsigned short wCountry
;
366 unsigned short wCodePage
;
370 #ifndef _THREADLOCALEINFO
371 #define _THREADLOCALEINFO
372 typedef struct threadlocaleinfostruct
{
374 unsigned int lc_codepage
;
375 unsigned int lc_collate_cp
;
376 unsigned long lc_handle
[6];
386 int *lconv_intl_refcount
;
387 int *lconv_num_refcount
;
388 int *lconv_mon_refcount
;
390 int *ctype1_refcount
;
391 unsigned short *ctype1
;
392 const unsigned short *pctype
;
393 const unsigned char *pclmap
;
394 const unsigned char *pcumap
;
395 struct __lc_time_data
*lc_time_curr
;
406 #endif /* !_INC_CRTDEFS */