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 /* Compatability definition */
23 #if _MSC_VER > 0 && __STDC__
27 /** Properties ***************************************************************/
30 #define _CRT_PACKING 8
31 #pragma pack(push,_CRT_PACKING)
33 #ifndef _CRT_STRINGIZE
34 #define __CRT_STRINGIZE(_Value) #_Value
35 #define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
39 #define __CRT_WIDE(_String) L ## _String
40 #define _CRT_WIDE(_String) __CRT_WIDE(_String)
44 #if !defined(_midl) && defined(_X86_) && _MSC_VER >= 1300
53 #define _CRTIMP __declspec(dllimport)
59 //#define _CRT_ALTERNATIVE_INLINES
63 #ifdef _CRT_ALTERNATIVE_INLINES
66 #define _CRTIMP_ALT _CRTIMP
67 #define _CRT_ALTERNATIVE_IMPORTED
78 #define _CRTDATA(x) _CRTIMP x
83 #define _CRTIMP2 _CRTIMP
87 #define _CRTIMP_PURE _CRTIMP
90 #ifndef _CRTIMP_ALTERNATIVE
91 #define _CRTIMP_ALTERNATIVE _CRTIMP
92 #define _CRT_ALTERNATIVE_IMPORTED
95 #ifndef _CRTIMP_NOIA64
97 #define _CRTIMP_NOIA64
99 #define _CRTIMP_NOIA64 _CRTIMP
104 #define _MRTIMP2 _CRTIMP
108 #define _MCRTIMP _CRTIMP
119 #ifndef _CONST_RETURN
120 #define _CONST_RETURN
124 #if defined(__ia64__) || defined(__x86_64)
125 #define UNALIGNED __unaligned
132 #define _CRT_ALIGN(x) __attribute__ ((aligned(x)))
144 #define __CRTDECL __cdecl
148 #define _CRT_UNUSED(x) (void)x
151 #ifndef _CONST_RETURN
153 #define _CONST_RETURN const
154 #define _CRT_CONST_CORRECT_OVERLOADS
156 #define _CONST_RETURN
160 #define __crt_typefix(ctype)
163 /** Deprecated ***************************************************************/
165 #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated)
167 #ifndef _CRT_INSECURE_DEPRECATE
168 # ifdef _CRT_SECURE_NO_DEPRECATE
169 # define _CRT_INSECURE_DEPRECATE(_Replacement)
171 # define _CRT_INSECURE_DEPRECATE(_Replacement) \
172 _CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead!")
176 #ifndef _CRT_INSECURE_DEPRECATE_CORE
177 # ifdef _CRT_SECURE_NO_DEPRECATE_CORE
178 # define _CRT_INSECURE_DEPRECATE_CORE(_Replacement)
180 # define _CRT_INSECURE_DEPRECATE_CORE(_Replacement) \
181 _CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead! Enable _CRT_SECURE_NO_DEPRECATE to avoid thie warning.")
185 #ifndef _CRT_NONSTDC_DEPRECATE
186 # ifdef _CRT_NONSTDC_NO_DEPRECATE
187 # define _CRT_NONSTDC_DEPRECATE(_Replacement)
189 # define _CRT_NONSTDC_DEPRECATE(_Replacement) \
190 _CRT_DEPRECATE_TEXT("Deprecated POSIX name, Try " #_Replacement " instead!")
194 #ifndef _CRT_INSECURE_DEPRECATE_MEMORY
195 #define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)
198 #ifndef _CRT_INSECURE_DEPRECATE_GLOBALS
199 #define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
202 #ifndef _CRT_MANAGED_HEAP_DEPRECATE
203 #define _CRT_MANAGED_HEAP_DEPRECATE
206 #ifndef _CRT_OBSOLETE
207 #define _CRT_OBSOLETE(_NewItem)
210 /** Constants ****************************************************************/
215 #define _TRUNCATE ((size_t)-1)
218 #define __STDC_SECURE_LIB__ 200411L
219 #define __GOT_SECURE_LIB__ __STDC_SECURE_LIB__
220 #define _SECURECRT_FILL_BUFFER_PATTERN 0xFD
224 /** Type definitions *********************************************************/
230 #ifndef _SIZE_T_DEFINED
231 #define _SIZE_T_DEFINED
234 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
235 typedef unsigned int size_t __attribute__ ((mode (DI
)));
237 typedef unsigned __int64
size_t;
240 typedef unsigned int size_t;
244 #ifndef _INTPTR_T_DEFINED
245 #define _INTPTR_T_DEFINED
246 #ifndef __intptr_t_defined
247 #define __intptr_t_defined
250 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
251 typedef int intptr_t __attribute__ ((mode (DI
)));
253 typedef __int64
intptr_t;
256 typedef int intptr_t;
261 #ifndef _UINTPTR_T_DEFINED
262 #define _UINTPTR_T_DEFINED
263 #ifndef __uintptr_t_defined
264 #define __uintptr_t_defined
267 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
268 typedef unsigned int uintptr_t __attribute__ ((mode (DI
)));
270 typedef unsigned __int64
uintptr_t;
273 typedef unsigned int uintptr_t;
278 #ifndef _PTRDIFF_T_DEFINED
279 #define _PTRDIFF_T_DEFINED
283 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
284 typedef int ptrdiff_t __attribute__ ((mode (DI
)));
286 typedef __int64
ptrdiff_t;
289 typedef int ptrdiff_t;
294 #ifndef _WCHAR_T_DEFINED
295 #define _WCHAR_T_DEFINED
297 typedef unsigned short wchar_t;
301 #ifndef _WCTYPE_T_DEFINED
302 #define _WCTYPE_T_DEFINED
303 typedef unsigned short wint_t;
304 typedef unsigned short wctype_t;
307 #ifndef _ERRCODE_DEFINED
308 #define _ERRCODE_DEFINED
313 #ifndef _TIME32_T_DEFINED
314 #define _TIME32_T_DEFINED
315 typedef long __time32_t
;
318 #ifndef _TIME64_T_DEFINED
319 #define _TIME64_T_DEFINED
320 #if _INTEGRAL_MAX_BITS >= 64
321 typedef __int64 __time64_t
;
325 #ifndef _TIME_T_DEFINED
326 #define _TIME_T_DEFINED
327 #ifdef _USE_32BIT_TIME_T
328 typedef __time32_t
time_t;
330 typedef __time64_t
time_t;
334 struct threadlocaleinfostruct
;
335 typedef struct threadlocaleinfostruct
*pthreadlocinfo
;
337 struct threadmbcinfostruct
;
338 typedef struct threadmbcinfostruct
*pthreadmbcinfo
;
340 struct __lc_time_data
;
342 typedef struct localeinfo_struct
{
343 pthreadlocinfo locinfo
;
344 pthreadmbcinfo mbcinfo
;
345 } _locale_tstruct
,*_locale_t
;
347 #ifndef _TAGLC_ID_DEFINED
348 #define _TAGLC_ID_DEFINED
349 typedef struct tagLC_ID
{
350 unsigned short wLanguage
;
351 unsigned short wCountry
;
352 unsigned short wCodePage
;
356 #ifndef _THREADLOCALEINFO
357 #define _THREADLOCALEINFO
358 typedef struct threadlocaleinfostruct
{
360 unsigned int lc_codepage
;
361 unsigned int lc_collate_cp
;
362 unsigned long lc_handle
[6];
372 int *lconv_intl_refcount
;
373 int *lconv_num_refcount
;
374 int *lconv_mon_refcount
;
376 int *ctype1_refcount
;
377 unsigned short *ctype1
;
378 const unsigned short *pctype
;
379 const unsigned char *pclmap
;
380 const unsigned char *pcumap
;
381 struct __lc_time_data
*lc_time_curr
;
392 #endif /* !_INC_CRTDEFS */