- Cleanup the /lib directory, by putting more 3rd-party libs in /3rdparty, and by...
[reactos.git] / reactos / lib / sdk / crt / io / wutime.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/crt/??????
5 * PURPOSE: Unknown
6 * PROGRAMER: Unknown
7 * UPDATE HISTORY:
8 * 25/11/05: Created
9 */
10
11 #include <precomp.h>
12 #include <sys/utime.h>
13
14 /*
15 * @implemented
16 */
17 int _wutime(const wchar_t* filename, struct _utimbuf* buf)
18 {
19 int fn;
20 int ret;
21
22 fn = _wopen(filename, _O_RDWR);
23 if (fn == -1) {
24 __set_errno(EBADF);
25 return -1;
26 }
27 ret = _futime(fn, buf);
28 if (_close(fn) < 0)
29 return -1;
30 return ret;
31 }
32