Switch from time to time_new 1/2:
[reactos.git] / reactos / lib / sdk / crt / time / utime.c
1 /*
2 * COPYRIGHT: LGPL, See LGPL.txt in the top level directory
3 * PROJECT: ReactOS CRT library
4 * FILE: lib/sdk/crt/time/utime.c
5 * PURPOSE: Implementation of utime, _wutime
6 * PROGRAMERS: Timo Kreuzer
7 */
8 #include <precomp.h>
9 #include <tchar.h>
10 #include <sys/utime.h>
11 #include "bitsfixup.h"
12
13 int
14 _tutime(const _TCHAR* path, struct _utimbuf *t)
15 {
16 int fd = _topen(path, _O_WRONLY | _O_BINARY);
17
18 if (fd > 0)
19 {
20 int retVal = _futime(fd, t);
21 _close(fd);
22 return retVal;
23 }
24 return -1;
25 }