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.
10 #error Only Win32 target is supported!
15 #pragma pack(push,_CRT_PACKING)
22 #define _CRTIMP __declspec(dllimport)
25 #ifndef _WCHAR_T_DEFINED
26 typedef unsigned short wchar_t;
27 #define _WCHAR_T_DEFINED
30 #ifdef _USE_32BIT_TIME_T
32 #undef _USE_32BIT_TIME_T
35 #if _INTEGRAL_MAX_BITS < 64
36 #define _USE_32BIT_TIME_T
40 #ifndef _TIME32_T_DEFINED
41 #define _TIME32_T_DEFINED
42 typedef long __time32_t
;
45 #ifndef _TIME64_T_DEFINED
46 #define _TIME64_T_DEFINED
47 #if _INTEGRAL_MAX_BITS >= 64
48 typedef __int64 __time64_t
;
52 #ifndef _TIME_T_DEFINED
53 #define _TIME_T_DEFINED
54 #ifdef _USE_32BIT_TIME_T
55 typedef __time32_t
time_t;
57 typedef __time64_t
time_t;
61 #ifndef _UTIMBUF_DEFINED
62 #define _UTIMBUF_DEFINED
74 #if _INTEGRAL_MAX_BITS >= 64
94 _CRTIMP
int __cdecl
_utime(const char *_Filename
,struct _utimbuf
*_Utimbuf
);
95 _CRTIMP
int __cdecl
_utime32(const char *_Filename
,struct __utimbuf32
*_Time
);
96 _CRTIMP
int __cdecl
_futime(int _Desc
,struct _utimbuf
*_Utimbuf
);
97 _CRTIMP
int __cdecl
_futime32(int _FileDes
,struct __utimbuf32
*_Time
);
98 _CRTIMP
int __cdecl
_wutime(const wchar_t *_Filename
,struct _utimbuf
*_Utimbuf
);
99 _CRTIMP
int __cdecl
_wutime32(const wchar_t *_Filename
,struct __utimbuf32
*_Time
);
100 #if _INTEGRAL_MAX_BITS >= 64
101 _CRTIMP
int __cdecl
_utime64(const char *_Filename
,struct __utimbuf64
*_Time
);
102 _CRTIMP
int __cdecl
_futime64(int _FileDes
,struct __utimbuf64
*_Time
);
103 _CRTIMP
int __cdecl
_wutime64(const wchar_t *_Filename
,struct __utimbuf64
*_Time
);
106 // Do it like this to keep compatibility to MSVC while using msvcrt.dll
108 #ifdef _USE_32BIT_TIME_T
109 __CRT_INLINE
int __cdecl
_utime32(const char *_Filename
,struct __utimbuf32
*_Utimbuf
) {
110 return _utime(_Filename
,(struct __timbuf
*)_Utimbuf
);
112 __CRT_INLINE
int __cdecl
_futime32(int _Desc
,struct __utimbuf32
*_Utimbuf
) {
113 return _futime(_Desc
,(struct _utimbuf
*)_Utimbuf
);
115 __CRT_INLINE
int __cdecl
_wutime32(const wchar_t *_Filename
,struct __utimbuf32
*_Utimbuf
) {
116 return _wutime(_Filename
,(struct _utimbuf
*)_Utimbuf
);
118 #else // !_USE_32BIT_TIME_T
120 __CRT_INLINE
int __cdecl
_utime(const char *_Filename
,struct _utimbuf
*_Utimbuf
) {
121 return _utime64(_Filename
,(struct __utimbuf64
*)_Utimbuf
);
123 __CRT_INLINE
int __cdecl
_futime(int _Desc
,struct _utimbuf
*_Utimbuf
) {
124 return _futime64(_Desc
,(struct __utimbuf64
*)_Utimbuf
);
126 __CRT_INLINE
int __cdecl
_wutime(const wchar_t *_Filename
,struct _utimbuf
*_Utimbuf
) {
127 return _wutime64(_Filename
,(struct __utimbuf64
*)_Utimbuf
);
130 #endif // _USE_32BIT_TIME_T
134 __CRT_INLINE
int __cdecl
utime(const char *_Filename
,struct utimbuf
*_Utimbuf
) {
135 return _utime(_Filename
,(struct _utimbuf
*)_Utimbuf
);