add a missing section header table index conversion
[tangerine.git] / compiler / clib / utimes.c
blob8ebce11ed9624c83594df43145684054da31b5dc
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <dos/dos.h>
7 #include <proto/dos.h>
9 #include <sys/time.h>
11 int utimes(const char *file, struct timeval tvp[2])
13 struct DateStamp ds;
14 ULONG t = (ULONG)tvp[1].tv_sec;
16 ds.ds_Days = t / (60*60*24);
17 ds.ds_Minute = (t / 60) % (60*24);
18 ds.ds_Tick = (t % 60) * TICKS_PER_SECOND;
20 if (SetFileDate(file, &ds))
21 return 0;
23 return -1;