make it compile on linux too

svn path=/trunk/; revision=4025
This commit is contained in:
guido 2003-01-17 19:06:15 +00:00
parent e5057ddea7
commit d0d1b840ca

View file

@ -1,6 +1,13 @@
#include <sys/types.h>
#include <sys/stat.h>
#ifdef WIN32
#include <sys/utime.h>
#else
#include <sys/time.h>
#include <stdlib.h>
#endif
#include <fcntl.h>
#include <stdio.h>
@ -36,8 +43,10 @@ int main(int argc, char* argv[])
{
char* path;
FILE* file;
#ifdef WIN32
time_t now;
struct utimbuf fnow;
#endif
if (argc != 2)
{
@ -59,10 +68,14 @@ int main(int argc, char* argv[])
close(file);
#ifdef WIN32
now = time();
fnow.actime = now;
fnow.modtime = now;
(int) utime(path, &fnow);
#else
(int) utimes(path, NULL);
#endif
exit(0);
}