mlib update: new isnan()/isnanf() implementation
[tangerine.git] / compiler / clib / utime.c
blob621503b21ba4da3a30bc1cf085a19582aff09f64
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <errno.h>
7 #include <sys/time.h>
9 #include <utime.h>
11 int utime(const char *filename, struct utimbuf *buf)
13 struct timeval ts[2];
15 if( buf == NULL )
17 time_t tt = time( NULL );
19 ts[0].tv_sec = tt;
20 ts[1].tv_sec = tt;
22 else
24 ts[0].tv_sec = buf->actime;
25 ts[1].tv_sec = buf->modtime;
28 ts[0].tv_usec = 0;
29 ts[1].tv_usec = 0;
31 return utimes(filename, ts);