# | Line 11 | Line 11 | static const char RCSid[] = "$Id$"; | |
---|---|---|
11 | ||
12 | #include <sys/types.h> | |
13 | #include <sys/stat.h> | |
14 | + | #ifdef _WIN32 |
15 | + | #include <sys/utime.h> |
16 | + | #else |
17 | + | #include <utime.h> |
18 | + | #endif |
19 | ||
20 | ||
21 | time_t | |
# | Line 31 | Line 36 | setfdate(fname, ftim) /* set file date */ | |
36 | char *fname; | |
37 | long ftim; | |
38 | { | |
39 | + | struct utimbuf utb; |
40 | + | |
41 | + | utb.actime = utb.modtime = ftim; |
42 | + | return(utime(fname, &utb)); |
43 | + | |
44 | + | #ifdef NOTHING /* XXX does this work anywhere? */ |
45 | time_t ftm[2]; | |
46 | ||
47 | ftm[0] = ftm[1] = ftim; | |
37 | – | |
48 | return(utime(fname, ftm)); | |
49 | + | #endif |
50 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |