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.
12 #error Only Win32 target is supported!
15 #pragma pack(push,_CRT_PACKING)
21 #ifndef _TIME32_T_DEFINED
22 #define _TIME32_T_DEFINED
23 typedef long __time32_t
;
26 #ifndef _TIME64_T_DEFINED
27 #define _TIME64_T_DEFINED
28 #if _INTEGRAL_MAX_BITS >= 64
29 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
30 typedef int _time64_t
__attribute__ ((mode (DI
)));
32 typedef __int64 __time64_t
;
37 #ifndef _TIME_T_DEFINED
38 #define _TIME_T_DEFINED
39 #ifdef _USE_32BIT_TIME_T
40 typedef __time32_t
time_t;
42 typedef __time64_t
time_t;
46 #ifndef _CLOCK_T_DEFINED
47 #define _CLOCK_T_DEFINED
51 #ifndef _SIZE_T_DEFINED
52 #define _SIZE_T_DEFINED
55 #if defined(__GNUC__) && defined(__STRICT_ANSI__)
56 typedef unsigned int size_t __attribute__ ((mode (DI
)));
58 typedef unsigned __int64
size_t;
61 typedef unsigned int size_t;
69 #define NULL ((void *)0)
74 #ifdef _USE_32BIT_TIME_T
75 #define _localtime32 localtime
76 #define _difftime32 difftime
77 #define _ctime32 ctime
78 #define _gmtime32 gmtime
79 #define _mktime32 mktime
99 #define CLOCKS_PER_SEC 1000
101 _CRTDATA(extern int _daylight
);
102 _CRTDATA(extern long _dstbias
);
103 _CRTDATA(extern long _timezone
);
104 _CRTDATA(extern char * _tzname
[2]);
106 _CRTIMP errno_t __cdecl
_get_daylight(int *_Daylight
);
107 _CRTIMP errno_t __cdecl
_get_dstbias(long *_Daylight_savings_bias
);
108 _CRTIMP errno_t __cdecl
_get_timezone(long *_Timezone
);
109 _CRTIMP errno_t __cdecl
_get_tzname(size_t *_ReturnValue
,char *_Buffer
,size_t _SizeInBytes
,int _Index
);
110 char *__cdecl
asctime(const struct tm
*_Tm
);
111 _CRTIMP
char *__cdecl
_ctime32(const __time32_t
*_Time
);
112 clock_t __cdecl
clock(void);
113 _CRTIMP
double __cdecl
_difftime32(__time32_t _Time1
,__time32_t _Time2
);
114 _CRTIMP
struct tm
*__cdecl
_gmtime32(const __time32_t
*_Time
);
115 _CRTIMP
struct tm
*__cdecl
_localtime32(const __time32_t
*_Time
);
116 size_t __cdecl
strftime(char *_Buf
,size_t _SizeInBytes
,const char *_Format
,const struct tm
*_Tm
);
117 _CRTIMP
size_t __cdecl
_strftime_l(char *_Buf
,size_t _Max_size
,const char *_Format
,const struct tm
*_Tm
,_locale_t _Locale
);
118 _CRTIMP
char *__cdecl
_strdate(char *_Buffer
);
119 _CRTIMP
char *__cdecl
_strtime(char *_Buffer
);
120 _CRTIMP __time32_t __cdecl
_time32(__time32_t
*_Time
);
121 _CRTIMP __time32_t __cdecl
_mktime32(struct tm
*_Tm
);
122 _CRTIMP __time32_t __cdecl
_mkgmtime32(struct tm
*_Tm
);
123 #if defined (_POSIX_) || defined(__GNUC__)
124 void __cdecl
tzset(void);
126 _CRTIMP
void __cdecl
_tzset(void);
128 #if _INTEGRAL_MAX_BITS >= 64
129 double __cdecl
_difftime64(__time64_t _Time1
,__time64_t _Time2
);
130 _CRTIMP
char *__cdecl
_ctime64(const __time64_t
*_Time
);
131 _CRTIMP
struct tm
*__cdecl
_gmtime64(const __time64_t
*_Time
);
132 _CRTIMP
struct tm
*__cdecl
_localtime64(const __time64_t
*_Time
);
133 _CRTIMP __time64_t __cdecl
_mktime64(struct tm
*_Tm
);
134 _CRTIMP __time64_t __cdecl
_mkgmtime64(struct tm
*_Tm
);
135 _CRTIMP __time64_t __cdecl
_time64(__time64_t
*_Time
);
137 unsigned __cdecl
_getsystime(struct tm
*_Tm
);
138 unsigned __cdecl
_setsystime(struct tm
*_Tm
,unsigned _MilliSec
);
140 #ifndef _WTIME_DEFINED
141 _CRTIMP
wchar_t *__cdecl
_wasctime(const struct tm
*_Tm
);
142 _CRTIMP
wchar_t *__cdecl
_wctime32(const __time32_t
*_Time
);
143 size_t __cdecl
wcsftime(wchar_t *_Buf
,size_t _SizeInWords
,const wchar_t *_Format
,const struct tm
*_Tm
);
144 _CRTIMP
size_t __cdecl
_wcsftime_l(wchar_t *_Buf
,size_t _SizeInWords
,const wchar_t *_Format
,const struct tm
*_Tm
,_locale_t _Locale
);
145 _CRTIMP
wchar_t *__cdecl
_wstrdate(wchar_t *_Buffer
);
146 _CRTIMP
wchar_t *__cdecl
_wstrtime(wchar_t *_Buffer
);
147 #if _INTEGRAL_MAX_BITS >= 64
148 _CRTIMP
wchar_t *__cdecl
_wctime64(const __time64_t
*_Time
);
151 #if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
152 #define _INC_WTIME_INL
153 #ifdef _USE_32BIT_TIME_T
154 __CRT_INLINE
wchar_t *__cdecl
_wctime(const time_t *_Time
) { return _wctime32(_Time
); }
156 __CRT_INLINE
wchar_t *__cdecl
_wctime(const time_t *_Time
) { return _wctime64(_Time
); }
160 #define _WTIME_DEFINED
161 #endif /* !_WTIME_DEFINED */
164 double __cdecl
difftime(time_t _Time1
,time_t _Time2
);
165 char *__cdecl
ctime(const time_t *_Time
);
166 struct tm
*__cdecl
gmtime(const time_t *_Time
);
167 struct tm
*__cdecl
localtime(const time_t *_Time
);
168 struct tm
*__cdecl
localtime_r(const time_t *_Time
,struct tm
*);
170 _CRTIMP
time_t __cdecl
mktime(struct tm
*_Tm
);
171 _CRTIMP
time_t __cdecl
_mkgmtime(struct tm
*_Tm
);
172 _CRTIMP
time_t __cdecl
time(time_t *_Time
);
174 #ifdef _USE_32BIT_TIME_T
176 __CRT_INLINE
double __cdecl
difftime(time_t _Time1
,time_t _Time2
) { return _difftime32(_Time1
,_Time2
); }
177 __CRT_INLINE
char *__cdecl
ctime(const time_t *_Time
) { return _ctime32(_Time
); }
178 __CRT_INLINE
struct tm
*__cdecl
gmtime(const time_t *_Time
) { return _gmtime32(_Time
); }
179 __CRT_INLINE
struct tm
*__cdecl
localtime(const time_t *_Time
) { return _localtime32(_Time
); }
180 __CRT_INLINE
time_t __cdecl
mktime(struct tm
*_Tm
) { return _mktime32(_Tm
); }
181 __CRT_INLINE
time_t __cdecl
_mkgmtime(struct tm
*_Tm
) { return _mkgmtime32(_Tm
); }
182 __CRT_INLINE
time_t __cdecl
time(time_t *_Time
) { return _time32(_Time
); }
185 __CRT_INLINE
double __cdecl
difftime(time_t _Time1
,time_t _Time2
) { return _difftime64(_Time1
,_Time2
); }
186 __CRT_INLINE
char *__cdecl
ctime(const time_t *_Time
) { return _ctime64(_Time
); }
187 __CRT_INLINE
struct tm
*__cdecl
gmtime(const time_t *_Time
) { return _gmtime64(_Time
); }
188 __CRT_INLINE
struct tm
*__cdecl
localtime(const time_t *_Time
) { return _localtime64(_Time
); }
189 __CRT_INLINE
time_t __cdecl
mktime(struct tm
*_Tm
) { return _mktime64(_Tm
); }
190 __CRT_INLINE
time_t __cdecl
_mkgmtime(struct tm
*_Tm
) { return _mkgmtime64(_Tm
); }
191 __CRT_INLINE
time_t __cdecl
time(time_t *_Time
) { return _time64(_Time
); }
195 #if !defined(NO_OLDNAMES) || defined(_POSIX)
196 #define CLK_TCK CLOCKS_PER_SEC
198 _CRTIMP
extern int daylight
;
199 _CRTIMP
extern long timezone
;
200 _CRTIMP
extern char *tzname
[2];
201 void __cdecl
tzset(void);
210 #include <sec_api/time_s.h>
212 #endif /* End _TIME_H_ */