xref: /reactos/sdk/include/crt/sys/utime.h (revision c2c66aff)
1 /**
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.
5  */
6 #ifndef _INC_UTIME
7 #define _INC_UTIME
8 
9 #ifndef _WIN32
10 #error Only Win32 target is supported!
11 #endif
12 
13 #include <crtdefs.h>
14 
15 #pragma pack(push,_CRT_PACKING)
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #ifndef _UTIMBUF_DEFINED
22 #define _UTIMBUF_DEFINED
23 
24   struct _utimbuf {
25     time_t actime;
26     time_t modtime;
27   };
28 
29   struct __utimbuf32 {
30     __time32_t actime;
31     __time32_t modtime;
32   };
33 
34 #if _INTEGRAL_MAX_BITS >= 64
35   struct __utimbuf64 {
36     __time64_t actime;
37     __time64_t modtime;
38   };
39 #endif
40 
41 #ifndef NO_OLDNAMES
42   struct utimbuf {
43     time_t actime;
44     time_t modtime;
45   };
46 
47   struct utimbuf32 {
48     __time32_t actime;
49     __time32_t modtime;
50   };
51 #endif
52 
53 #endif /* !_UTIMBUF_DEFINED */
54 
55   _CRTIMP
56   int
57   __cdecl
58   _utime(
59     _In_z_ const char *_Filename,
60     _In_opt_ struct _utimbuf *_Time);
61 
62   _CRTIMP
63   int
64   __cdecl
65   _utime32(
66     _In_z_ const char *_Filename,
67     _In_opt_ struct __utimbuf32 *_Time);
68 
69   _CRTIMP
70   int
71   __cdecl
72   _futime(
73     _In_ int _FileDes,
74     _In_opt_ struct _utimbuf *_Time);
75 
76   _CRTIMP
77   int
78   __cdecl
79   _futime32(
80     _In_ int _FileDes,
81     _In_opt_ struct __utimbuf32 *_Time);
82 
83   _CRTIMP
84   int
85   __cdecl
86   _wutime(
87     _In_z_ const wchar_t *_Filename,
88     _In_opt_ struct _utimbuf *_Time);
89 
90   _CRTIMP
91   int
92   __cdecl
93   _wutime32(
94     _In_z_ const wchar_t *_Filename,
95     _In_opt_ struct __utimbuf32 *_Time);
96 
97 #if _INTEGRAL_MAX_BITS >= 64
98 
99   _CRTIMP
100   int
101   __cdecl
102   _utime64(
103     _In_z_ const char *_Filename,
104     _In_opt_ struct __utimbuf64 *_Time);
105 
106   _CRTIMP
107   int
108   __cdecl
109   _futime64(
110     _In_ int _FileDes,
111     _In_opt_ struct __utimbuf64 *_Time);
112 
113   _CRTIMP
114   int
115   __cdecl
116   _wutime64(
117     _In_z_ const wchar_t *_Filename,
118     _In_opt_ struct __utimbuf64 *_Time);
119 
120 #endif /* _INTEGRAL_MAX_BITS >= 64 */
121 
122 #ifndef RC_INVOKED
123 #ifdef _USE_32BIT_TIME_T
_utime32(const char * _Filename,struct __utimbuf32 * _Utimbuf)124 __CRT_INLINE int __cdecl _utime32(const char *_Filename,struct __utimbuf32 *_Utimbuf) {
125   return _utime(_Filename,(struct _utimbuf *)_Utimbuf);
126 }
_futime32(int _Desc,struct __utimbuf32 * _Utimbuf)127 __CRT_INLINE int __cdecl _futime32(int _Desc,struct __utimbuf32 *_Utimbuf) {
128   return _futime(_Desc,(struct _utimbuf *)_Utimbuf);
129 }
_wutime32(const wchar_t * _Filename,struct __utimbuf32 * _Utimbuf)130 __CRT_INLINE int __cdecl _wutime32(const wchar_t *_Filename,struct __utimbuf32 *_Utimbuf) {
131   return _wutime(_Filename,(struct _utimbuf *)_Utimbuf);
132 }
133 #endif
134 
135 #ifndef NO_OLDNAMES
utime(const char * _Filename,struct utimbuf * _Utimbuf)136 __CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) {
137   return _utime(_Filename,(struct _utimbuf *)_Utimbuf);
138 }
139 #endif
140 #endif
141 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #pragma pack(pop)
147 #endif
148