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 ***************************************************************/
167 #define _CRT_DEPRECATE_TEXT(_Text) __attribute__ ((deprecated))
168 #elif defined(_MSC_VER)
169 #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
171 #define _CRT_DEPRECATE_TEXT(_Text)
174 #ifndef __STDC_WANT_SECURE_LIB__
175 #define __STDC_WANT_SECURE_LIB__ 1
178 #ifndef _CRT_INSECURE_DEPRECATE
179 # ifdef _CRT_SECURE_NO_DEPRECATE
180 # define _CRT_INSECURE_DEPRECATE(_Replacement)
182 # define _CRT_INSECURE_DEPRECATE(_Replacement) \
183 _CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead!")
187 #ifndef _CRT_INSECURE_DEPRECATE_CORE
188 # ifdef _CRT_SECURE_NO_DEPRECATE_CORE
189 # define _CRT_INSECURE_DEPRECATE_CORE(_Replacement)
191 # define _CRT_INSECURE_DEPRECATE_CORE(_Replacement) \
192 _CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead! Enable _CRT_SECURE_NO_DEPRECATE to avoid thie warning.")
196 #ifndef _CRT_NONSTDC_DEPRECATE
197 # ifdef _CRT_NONSTDC_NO_DEPRECATE
198 # define _CRT_NONSTDC_DEPRECATE(_Replacement)
200 # define _CRT_NONSTDC_DEPRECATE(_Replacement) \
201 _CRT_DEPRECATE_TEXT("Deprecated POSIX name, Try " #_Replacement " instead!")
205 #ifndef _CRT_INSECURE_DEPRECATE_MEMORY
206 #define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)
209 #ifndef _CRT_INSECURE_DEPRECATE_GLOBALS
210 #define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
213 #ifndef _CRT_MANAGED_HEAP_DEPRECATE
214 #define _CRT_MANAGED_HEAP_DEPRECATE
217 #ifndef _CRT_OBSOLETE
218 #define _CRT_OBSOLETE(_NewItem)
221 /** Constants ****************************************************************/
226 #define _TRUNCATE ((size_t)-1)
229 #define __STDC_SECURE_LIB__ 200411L
230 #define __GOT_SECURE_LIB__ __STDC_SECURE_LIB__
231 #define _SECURECRT_FILL_BUFFER_PATTERN 0xFD
235 /** Type definitions *********************************************************/
241 #ifndef _SIZE_T_DEFINED
242 #define _SIZE_T_DEFINED
245 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
246 typedef unsigned int size_t __attribute__ ((mode (DI
)));
248 __MINGW_EXTENSION
typedef unsigned __int64
size_t;
251 typedef unsigned int size_t;
255 #ifndef _INTPTR_T_DEFINED
256 #define _INTPTR_T_DEFINED
257 #ifndef __intptr_t_defined
258 #define __intptr_t_defined
261 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
262 typedef int intptr_t __attribute__ ((mode (DI
)));
264 __MINGW_EXTENSION
typedef __int64
intptr_t;
267 typedef int intptr_t;
272 #ifndef _UINTPTR_T_DEFINED
273 #define _UINTPTR_T_DEFINED
274 #ifndef __uintptr_t_defined
275 #define __uintptr_t_defined
278 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
279 typedef unsigned int uintptr_t __attribute__ ((mode (DI
)));
281 __MINGW_EXTENSION
typedef unsigned __int64
uintptr_t;
284 typedef unsigned int uintptr_t;
289 #ifndef _PTRDIFF_T_DEFINED
290 #define _PTRDIFF_T_DEFINED
294 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
295 typedef int ptrdiff_t __attribute__ ((mode (DI
)));
297 __MINGW_EXTENSION
typedef __int64
ptrdiff_t;
300 typedef int ptrdiff_t;
305 #ifndef _WCHAR_T_DEFINED
306 #define _WCHAR_T_DEFINED
308 typedef unsigned short wchar_t;
312 #ifndef _WCTYPE_T_DEFINED
313 #define _WCTYPE_T_DEFINED
314 typedef unsigned short wint_t;
315 typedef unsigned short wctype_t;
318 #ifndef _ERRCODE_DEFINED
319 #define _ERRCODE_DEFINED
324 #ifndef _TIME32_T_DEFINED
325 #define _TIME32_T_DEFINED
326 typedef long __time32_t
;
329 #ifndef _TIME64_T_DEFINED
330 #define _TIME64_T_DEFINED
331 #if _INTEGRAL_MAX_BITS >= 64
332 __MINGW_EXTENSION
typedef __int64 __time64_t
;
336 #ifndef _TIME_T_DEFINED
337 #define _TIME_T_DEFINED
338 #ifdef _USE_32BIT_TIME_T
339 typedef __time32_t
time_t;
341 typedef __time64_t
time_t;
345 struct threadlocaleinfostruct
;
346 typedef struct threadlocaleinfostruct
*pthreadlocinfo
;
348 struct threadmbcinfostruct
;
349 typedef struct threadmbcinfostruct
*pthreadmbcinfo
;
351 struct __lc_time_data
;
353 typedef struct localeinfo_struct
{
354 pthreadlocinfo locinfo
;
355 pthreadmbcinfo mbcinfo
;
356 } _locale_tstruct
,*_locale_t
;
358 #ifndef _TAGLC_ID_DEFINED
359 #define _TAGLC_ID_DEFINED
360 typedef struct tagLC_ID
{
361 unsigned short wLanguage
;
362 unsigned short wCountry
;
363 unsigned short wCodePage
;
367 #ifndef _THREADLOCALEINFO
368 #define _THREADLOCALEINFO
369 typedef struct threadlocaleinfostruct
{
371 unsigned int lc_codepage
;
372 unsigned int lc_collate_cp
;
373 unsigned long lc_handle
[6];
383 int *lconv_intl_refcount
;
384 int *lconv_num_refcount
;
385 int *lconv_mon_refcount
;
387 int *ctype1_refcount
;
388 unsigned short *ctype1
;
389 const unsigned short *pctype
;
390 const unsigned char *pclmap
;
391 const unsigned char *pcumap
;
392 struct __lc_time_data
*lc_time_curr
;
403 #endif /* !_INC_CRTDEFS */