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__ */
28 /** Properties ***************************************************************/
31 #define _CRT_PACKING 8
32 #pragma pack(push,_CRT_PACKING)
34 #ifndef _CRT_STRINGIZE
35 #define __CRT_STRINGIZE(_Value) #_Value
36 #define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
40 #define __CRT_WIDE(_String) L ## _String
41 #define _CRT_WIDE(_String) __CRT_WIDE(_String)
45 #if !defined(_midl) && defined(_X86_) && _MSC_VER >= 1300
54 #define _CRTIMP __declspec(dllimport)
60 //#define _CRT_ALTERNATIVE_INLINES
64 #ifdef _CRT_ALTERNATIVE_INLINES
67 #define _CRTIMP_ALT _CRTIMP
68 #define _CRT_ALTERNATIVE_IMPORTED
79 #define _CRTDATA(x) _CRTIMP x
84 #define _CRTIMP2 _CRTIMP
88 #define _CRTIMP_PURE _CRTIMP
91 #ifndef _CRTIMP_ALTERNATIVE
92 #define _CRTIMP_ALTERNATIVE _CRTIMP
93 #define _CRT_ALTERNATIVE_IMPORTED
96 #ifndef _CRTIMP_NOIA64
98 #define _CRTIMP_NOIA64
100 #define _CRTIMP_NOIA64 _CRTIMP
105 #define _MRTIMP2 _CRTIMP
109 #define _MCRTIMP _CRTIMP
120 #ifndef _CONST_RETURN
121 #define _CONST_RETURN
125 #if defined(__ia64__) || defined(__x86_64)
126 #define UNALIGNED __unaligned
133 #define _CRT_ALIGN(x) __attribute__ ((aligned(x)))
145 #define __CRTDECL __cdecl
149 #define _CRT_UNUSED(x) (void)x
152 #ifndef _CONST_RETURN
154 #define _CONST_RETURN const
155 #define _CRT_CONST_CORRECT_OVERLOADS
157 #define _CONST_RETURN
161 #define __crt_typefix(ctype)
164 /** Deprecated ***************************************************************/
166 #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated)
168 #ifndef _CRT_INSECURE_DEPRECATE
169 # ifdef _CRT_SECURE_NO_DEPRECATE
170 # define _CRT_INSECURE_DEPRECATE(_Replacement)
172 # define _CRT_INSECURE_DEPRECATE(_Replacement) \
173 _CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead!")
177 #ifndef _CRT_INSECURE_DEPRECATE_CORE
178 # ifdef _CRT_SECURE_NO_DEPRECATE_CORE
179 # define _CRT_INSECURE_DEPRECATE_CORE(_Replacement)
181 # define _CRT_INSECURE_DEPRECATE_CORE(_Replacement) \
182 _CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead! Enable _CRT_SECURE_NO_DEPRECATE to avoid thie warning.")
186 #ifndef _CRT_NONSTDC_DEPRECATE
187 # ifdef _CRT_NONSTDC_NO_DEPRECATE
188 # define _CRT_NONSTDC_DEPRECATE(_Replacement)
190 # define _CRT_NONSTDC_DEPRECATE(_Replacement) \
191 _CRT_DEPRECATE_TEXT("Deprecated POSIX name, Try " #_Replacement " instead!")
195 #ifndef _CRT_INSECURE_DEPRECATE_MEMORY
196 #define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)
199 #ifndef _CRT_INSECURE_DEPRECATE_GLOBALS
200 #define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
203 #ifndef _CRT_MANAGED_HEAP_DEPRECATE
204 #define _CRT_MANAGED_HEAP_DEPRECATE
207 #ifndef _CRT_OBSOLETE
208 #define _CRT_OBSOLETE(_NewItem)
211 /** Constants ****************************************************************/
216 #define _TRUNCATE ((size_t)-1)
219 #define __STDC_SECURE_LIB__ 200411L
220 #define __GOT_SECURE_LIB__ __STDC_SECURE_LIB__
221 #define _SECURECRT_FILL_BUFFER_PATTERN 0xFD
225 /** Type definitions *********************************************************/
231 #ifndef _SIZE_T_DEFINED
232 #define _SIZE_T_DEFINED
235 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
236 typedef unsigned int size_t __attribute__ ((mode (DI
)));
238 typedef unsigned __int64
size_t;
241 typedef unsigned int size_t;
245 #ifndef _INTPTR_T_DEFINED
246 #define _INTPTR_T_DEFINED
247 #ifndef __intptr_t_defined
248 #define __intptr_t_defined
251 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
252 typedef int intptr_t __attribute__ ((mode (DI
)));
254 typedef __int64
intptr_t;
257 typedef int intptr_t;
262 #ifndef _UINTPTR_T_DEFINED
263 #define _UINTPTR_T_DEFINED
264 #ifndef __uintptr_t_defined
265 #define __uintptr_t_defined
268 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
269 typedef unsigned int uintptr_t __attribute__ ((mode (DI
)));
271 typedef unsigned __int64
uintptr_t;
274 typedef unsigned int uintptr_t;
279 #ifndef _PTRDIFF_T_DEFINED
280 #define _PTRDIFF_T_DEFINED
284 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
285 typedef int ptrdiff_t __attribute__ ((mode (DI
)));
287 typedef __int64
ptrdiff_t;
290 typedef int ptrdiff_t;
295 #ifndef _WCHAR_T_DEFINED
296 #define _WCHAR_T_DEFINED
298 typedef unsigned short wchar_t;
302 #ifndef _WCTYPE_T_DEFINED
303 #define _WCTYPE_T_DEFINED
304 typedef unsigned short wint_t;
305 typedef unsigned short wctype_t;
308 #ifndef _ERRCODE_DEFINED
309 #define _ERRCODE_DEFINED
314 #ifndef _TIME32_T_DEFINED
315 #define _TIME32_T_DEFINED
316 typedef long __time32_t
;
319 #ifndef _TIME64_T_DEFINED
320 #define _TIME64_T_DEFINED
321 #if _INTEGRAL_MAX_BITS >= 64
322 typedef __int64 __time64_t
;
326 #ifndef _TIME_T_DEFINED
327 #define _TIME_T_DEFINED
328 #ifdef _USE_32BIT_TIME_T
329 typedef __time32_t
time_t;
331 typedef __time64_t
time_t;
335 struct threadlocaleinfostruct
;
336 typedef struct threadlocaleinfostruct
*pthreadlocinfo
;
338 struct threadmbcinfostruct
;
339 typedef struct threadmbcinfostruct
*pthreadmbcinfo
;
341 struct __lc_time_data
;
343 typedef struct localeinfo_struct
{
344 pthreadlocinfo locinfo
;
345 pthreadmbcinfo mbcinfo
;
346 } _locale_tstruct
,*_locale_t
;
348 #ifndef _TAGLC_ID_DEFINED
349 #define _TAGLC_ID_DEFINED
350 typedef struct tagLC_ID
{
351 unsigned short wLanguage
;
352 unsigned short wCountry
;
353 unsigned short wCodePage
;
357 #ifndef _THREADLOCALEINFO
358 #define _THREADLOCALEINFO
359 typedef struct threadlocaleinfostruct
{
361 unsigned int lc_codepage
;
362 unsigned int lc_collate_cp
;
363 unsigned long lc_handle
[6];
373 int *lconv_intl_refcount
;
374 int *lconv_num_refcount
;
375 int *lconv_mon_refcount
;
377 int *ctype1_refcount
;
378 unsigned short *ctype1
;
379 const unsigned short *pctype
;
380 const unsigned char *pclmap
;
381 const unsigned char *pcumap
;
382 struct __lc_time_data
*lc_time_curr
;
393 #endif /* !_INC_CRTDEFS */