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.
7 #include <specstrings.h>
12 #ifdef _USE_32BIT_TIME_T
14 #error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64
15 #undef _USE_32BIT_TIME_T
18 #if _INTEGRAL_MAX_BITS < 64
19 #define _USE_32BIT_TIME_T
23 /* Disable non-ANSI C definitions if compiling with __STDC__ */
30 /** Properties ***************************************************************/
33 #define _CRT_PACKING 8
34 #pragma pack(push,_CRT_PACKING)
36 #ifndef _CRT_STRINGIZE
37 #define __CRT_STRINGIZE(_Value) #_Value
38 #define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
42 #define __CRT_WIDE(_String) L ## _String
43 #define _CRT_WIDE(_String) __CRT_WIDE(_String)
47 #if !defined(_midl) && defined(_X86_) && _MSC_VER >= 1300
55 #ifdef CRTDLL /* Defined for ntdll, crtdll, msvcrt, etc */
58 #define _CRTIMP __declspec(dllimport)
59 #else /* !CRTDLL && !_DLL */
61 #endif /* CRTDLL || _DLL */
64 //#define _CRT_ALTERNATIVE_INLINES
68 #ifdef _CRT_ALTERNATIVE_INLINES
71 #define _CRTIMP_ALT _CRTIMP
72 #define _CRT_ALTERNATIVE_IMPORTED
83 #define _CRTDATA(x) _CRTIMP x
88 #define _CRTIMP2 _CRTIMP
92 #define _CRTIMP_PURE _CRTIMP
95 #ifndef _CRTIMP_ALTERNATIVE
96 #define _CRTIMP_ALTERNATIVE _CRTIMP
97 #define _CRT_ALTERNATIVE_IMPORTED
100 #ifndef _CRTIMP_NOIA64
102 #define _CRTIMP_NOIA64
104 #define _CRTIMP_NOIA64 _CRTIMP
109 #define _MRTIMP2 _CRTIMP
113 #define _MCRTIMP _CRTIMP
124 #ifndef _CONST_RETURN
125 #define _CONST_RETURN
129 #if defined(__ia64__) || defined(__x86_64)
130 #define UNALIGNED __unaligned
137 #if defined (__midl) || defined(__WIDL__)
138 #define _CRT_ALIGN(x)
139 #elif defined(_MSC_VER)
140 #define _CRT_ALIGN(x) __declspec(align(x))
142 #define _CRT_ALIGN(x) __attribute__ ((aligned(x)))
155 #define __CRTDECL __cdecl
159 #define _CRT_UNUSED(x) (void)x
162 #ifndef _CONST_RETURN
164 #define _CONST_RETURN const
165 #define _CRT_CONST_CORRECT_OVERLOADS
167 #define _CONST_RETURN
171 #define __crt_typefix(ctype)
174 /** Deprecated ***************************************************************/
177 #define _CRT_DEPRECATE_TEXT(_Text) __attribute__ ((deprecated))
178 #elif defined(_MSC_VER)
179 #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
181 #define _CRT_DEPRECATE_TEXT(_Text)
184 #ifndef __STDC_WANT_SECURE_LIB__
185 #define __STDC_WANT_SECURE_LIB__ 1
188 #ifndef _CRT_INSECURE_DEPRECATE
189 # ifdef _CRT_SECURE_NO_DEPRECATE
190 # define _CRT_INSECURE_DEPRECATE(_Replacement)
192 # define _CRT_INSECURE_DEPRECATE(_Replacement) \
193 _CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead!")
197 #ifndef _CRT_INSECURE_DEPRECATE_CORE
198 # ifdef _CRT_SECURE_NO_DEPRECATE_CORE
199 # define _CRT_INSECURE_DEPRECATE_CORE(_Replacement)
201 # define _CRT_INSECURE_DEPRECATE_CORE(_Replacement) \
202 _CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead! Enable _CRT_SECURE_NO_DEPRECATE to avoid thie warning.")
206 #ifndef _CRT_NONSTDC_DEPRECATE
207 # ifdef _CRT_NONSTDC_NO_DEPRECATE
208 # define _CRT_NONSTDC_DEPRECATE(_Replacement)
210 # define _CRT_NONSTDC_DEPRECATE(_Replacement) \
211 _CRT_DEPRECATE_TEXT("Deprecated POSIX name, Try " #_Replacement " instead!")
215 #ifndef _CRT_INSECURE_DEPRECATE_MEMORY
216 #define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)
219 #ifndef _CRT_INSECURE_DEPRECATE_GLOBALS
220 #define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
223 #ifndef _CRT_MANAGED_HEAP_DEPRECATE
224 #define _CRT_MANAGED_HEAP_DEPRECATE
227 #ifndef _CRT_OBSOLETE
228 #define _CRT_OBSOLETE(_NewItem)
232 /** Constants ****************************************************************/
237 #define _TRUNCATE ((size_t)-1)
240 #define __STDC_SECURE_LIB__ 200411L
241 #define __GOT_SECURE_LIB__ __STDC_SECURE_LIB__
242 #define _SECURECRT_FILL_BUFFER_PATTERN 0xFD
245 /** Type definitions *********************************************************/
251 #ifndef _SIZE_T_DEFINED
252 #define _SIZE_T_DEFINED
255 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
256 typedef unsigned int size_t __attribute__ ((mode (DI
)));
258 __MINGW_EXTENSION
typedef unsigned __int64
size_t;
261 typedef unsigned int size_t;
265 #ifndef _INTPTR_T_DEFINED
266 #define _INTPTR_T_DEFINED
267 #ifndef __intptr_t_defined
268 #define __intptr_t_defined
271 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
272 typedef int intptr_t __attribute__ ((mode (DI
)));
274 __MINGW_EXTENSION
typedef __int64
intptr_t;
277 typedef int intptr_t;
282 #ifndef _UINTPTR_T_DEFINED
283 #define _UINTPTR_T_DEFINED
284 #ifndef __uintptr_t_defined
285 #define __uintptr_t_defined
288 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
289 typedef unsigned int uintptr_t __attribute__ ((mode (DI
)));
291 __MINGW_EXTENSION
typedef unsigned __int64
uintptr_t;
294 typedef unsigned int uintptr_t;
299 #ifndef _PTRDIFF_T_DEFINED
300 #define _PTRDIFF_T_DEFINED
304 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
305 typedef int ptrdiff_t __attribute__ ((mode (DI
)));
307 __MINGW_EXTENSION
typedef __int64
ptrdiff_t;
310 typedef int ptrdiff_t;
315 #ifndef _WCHAR_T_DEFINED
316 #define _WCHAR_T_DEFINED
318 typedef unsigned short wchar_t;
322 #ifndef _WCTYPE_T_DEFINED
323 #define _WCTYPE_T_DEFINED
324 typedef unsigned short wint_t;
325 typedef unsigned short wctype_t;
328 #ifndef _ERRCODE_DEFINED
329 #define _ERRCODE_DEFINED
334 #ifndef _TIME32_T_DEFINED
335 #define _TIME32_T_DEFINED
336 typedef long __time32_t
;
339 #ifndef _TIME64_T_DEFINED
340 #define _TIME64_T_DEFINED
341 #if _INTEGRAL_MAX_BITS >= 64
342 __MINGW_EXTENSION
typedef __int64 __time64_t
;
346 #ifndef _TIME_T_DEFINED
347 #define _TIME_T_DEFINED
348 #ifdef _USE_32BIT_TIME_T
349 typedef __time32_t
time_t;
351 typedef __time64_t
time_t;
355 typedef struct threadmbcinfostruct
{
360 unsigned short mbulinfo
[6];
363 } threadmbcinfo
, *pthreadmbcinfo
;
366 #ifndef _TAGLC_ID_DEFINED
367 #define _TAGLC_ID_DEFINED
368 typedef struct tagLC_ID
{
369 unsigned short wLanguage
;
370 unsigned short wCountry
;
371 unsigned short wCodePage
;
375 #ifndef _THREADLOCALEINFO
376 #define _THREADLOCALEINFO
377 typedef struct threadlocaleinfostruct
{
379 unsigned int lc_codepage
;
380 unsigned int lc_collate_cp
;
381 unsigned long lc_handle
[6];
391 int *lconv_intl_refcount
;
392 int *lconv_num_refcount
;
393 int *lconv_mon_refcount
;
395 int *ctype1_refcount
;
396 unsigned short *ctype1
;
397 const unsigned short *pctype
;
398 const unsigned char *pclmap
;
399 const unsigned char *pcumap
;
400 struct __lc_time_data
*lc_time_curr
;
401 } threadlocinfo
, *pthreadlocinfo
;
404 struct __lc_time_data
;
406 typedef struct localeinfo_struct
{
407 pthreadlocinfo locinfo
;
408 pthreadmbcinfo mbcinfo
;
409 }_locale_tstruct
,*_locale_t
;
417 #endif /* !_INC_CRTDEFS */