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 #if defined (__midl) || defined(__WIDL__)
137 #define _CRT_ALIGN(x)
138 #elif defined(_MSC_VER)
139 #define _CRT_ALIGN(x) __declspec(align(x))
141 #define _CRT_ALIGN(x) __attribute__ ((aligned(x)))
154 #define __CRTDECL __cdecl
158 #define _CRT_UNUSED(x) (void)x
161 #ifndef _CONST_RETURN
163 #define _CONST_RETURN const
164 #define _CRT_CONST_CORRECT_OVERLOADS
166 #define _CONST_RETURN
170 #define __crt_typefix(ctype)
173 /** Deprecated ***************************************************************/
176 #define _CRT_DEPRECATE_TEXT(_Text) __attribute__ ((deprecated))
177 #elif defined(_MSC_VER)
178 #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
180 #define _CRT_DEPRECATE_TEXT(_Text)
183 #ifndef __STDC_WANT_SECURE_LIB__
184 #define __STDC_WANT_SECURE_LIB__ 1
187 #ifndef _CRT_INSECURE_DEPRECATE
188 # ifdef _CRT_SECURE_NO_DEPRECATE
189 # define _CRT_INSECURE_DEPRECATE(_Replacement)
191 # define _CRT_INSECURE_DEPRECATE(_Replacement) \
192 _CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead!")
196 #ifndef _CRT_INSECURE_DEPRECATE_CORE
197 # ifdef _CRT_SECURE_NO_DEPRECATE_CORE
198 # define _CRT_INSECURE_DEPRECATE_CORE(_Replacement)
200 # define _CRT_INSECURE_DEPRECATE_CORE(_Replacement) \
201 _CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead! Enable _CRT_SECURE_NO_DEPRECATE to avoid thie warning.")
205 #ifndef _CRT_NONSTDC_DEPRECATE
206 # ifdef _CRT_NONSTDC_NO_DEPRECATE
207 # define _CRT_NONSTDC_DEPRECATE(_Replacement)
209 # define _CRT_NONSTDC_DEPRECATE(_Replacement) \
210 _CRT_DEPRECATE_TEXT("Deprecated POSIX name, Try " #_Replacement " instead!")
214 #ifndef _CRT_INSECURE_DEPRECATE_MEMORY
215 #define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)
218 #ifndef _CRT_INSECURE_DEPRECATE_GLOBALS
219 #define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
222 #ifndef _CRT_MANAGED_HEAP_DEPRECATE
223 #define _CRT_MANAGED_HEAP_DEPRECATE
226 #ifndef _CRT_OBSOLETE
227 #define _CRT_OBSOLETE(_NewItem)
231 /** Constants ****************************************************************/
236 #define _TRUNCATE ((size_t)-1)
239 #define __STDC_SECURE_LIB__ 200411L
240 #define __GOT_SECURE_LIB__ __STDC_SECURE_LIB__
241 #define _SECURECRT_FILL_BUFFER_PATTERN 0xFD
244 /** Type definitions *********************************************************/
250 #ifndef _SIZE_T_DEFINED
251 #define _SIZE_T_DEFINED
254 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
255 typedef unsigned int size_t __attribute__ ((mode (DI
)));
257 __MINGW_EXTENSION
typedef unsigned __int64
size_t;
260 typedef unsigned int size_t;
264 #ifndef _INTPTR_T_DEFINED
265 #define _INTPTR_T_DEFINED
266 #ifndef __intptr_t_defined
267 #define __intptr_t_defined
270 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
271 typedef int intptr_t __attribute__ ((mode (DI
)));
273 __MINGW_EXTENSION
typedef __int64
intptr_t;
276 typedef int intptr_t;
281 #ifndef _UINTPTR_T_DEFINED
282 #define _UINTPTR_T_DEFINED
283 #ifndef __uintptr_t_defined
284 #define __uintptr_t_defined
287 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
288 typedef unsigned int uintptr_t __attribute__ ((mode (DI
)));
290 __MINGW_EXTENSION
typedef unsigned __int64
uintptr_t;
293 typedef unsigned int uintptr_t;
298 #ifndef _PTRDIFF_T_DEFINED
299 #define _PTRDIFF_T_DEFINED
303 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
304 typedef int ptrdiff_t __attribute__ ((mode (DI
)));
306 __MINGW_EXTENSION
typedef __int64
ptrdiff_t;
309 typedef int ptrdiff_t;
314 #ifndef _WCHAR_T_DEFINED
315 #define _WCHAR_T_DEFINED
317 typedef unsigned short wchar_t;
321 #ifndef _WCTYPE_T_DEFINED
322 #define _WCTYPE_T_DEFINED
323 typedef unsigned short wint_t;
324 typedef unsigned short wctype_t;
327 #ifndef _ERRCODE_DEFINED
328 #define _ERRCODE_DEFINED
333 #ifndef _TIME32_T_DEFINED
334 #define _TIME32_T_DEFINED
335 typedef long __time32_t
;
338 #ifndef _TIME64_T_DEFINED
339 #define _TIME64_T_DEFINED
340 #if _INTEGRAL_MAX_BITS >= 64
341 __MINGW_EXTENSION
typedef __int64 __time64_t
;
345 #ifndef _TIME_T_DEFINED
346 #define _TIME_T_DEFINED
347 #ifdef _USE_32BIT_TIME_T
348 typedef __time32_t
time_t;
350 typedef __time64_t
time_t;
354 struct threadlocaleinfostruct
;
355 typedef struct threadlocaleinfostruct
*pthreadlocinfo
;
357 struct threadmbcinfostruct
;
358 typedef struct threadmbcinfostruct
*pthreadmbcinfo
;
360 struct __lc_time_data
;
362 typedef struct localeinfo_struct
{
363 pthreadlocinfo locinfo
;
364 pthreadmbcinfo mbcinfo
;
365 } _locale_tstruct
,*_locale_t
;
367 #ifndef _TAGLC_ID_DEFINED
368 #define _TAGLC_ID_DEFINED
369 typedef struct tagLC_ID
{
370 unsigned short wLanguage
;
371 unsigned short wCountry
;
372 unsigned short wCodePage
;
376 #ifndef _THREADLOCALEINFO
377 #define _THREADLOCALEINFO
378 typedef struct threadlocaleinfostruct
{
380 unsigned int lc_codepage
;
381 unsigned int lc_collate_cp
;
382 unsigned long lc_handle
[6];
392 int *lconv_intl_refcount
;
393 int *lconv_num_refcount
;
394 int *lconv_mon_refcount
;
396 int *ctype1_refcount
;
397 unsigned short *ctype1
;
398 const unsigned short *pctype
;
399 const unsigned char *pclmap
;
400 const unsigned char *pcumap
;
401 struct __lc_time_data
*lc_time_curr
;
412 #endif /* !_INC_CRTDEFS */