--- utils - Copy.c 2011-08-11 08:17:39.000000000 -0400 +++ utils.c 2011-08-24 00:42:03.840000000 -0400 @@ -483,7 +483,18 @@ /* "Touch" FILE, i.e. make its mtime ("modified time") equal the time specified with TM. The atime ("access time") is set to the current time. */ - +#ifdef WINDOWS +void +touch (const char *file, time_t tm) +{ + struct utimbuf times; + + times.modtime = tm; + times.actime = time (NULL); + if (utime (file, ×) == -1) + logprintf (LOG_NOTQUIET, "utime(%s): %s\n", file, strerror (errno)); +} +#else void touch (const char *file, time_t tm) { @@ -507,6 +518,8 @@ close (fd); } +#endif + /* Checks if FILE is a symbolic link, and removes it if it is. Does nothing under MS-Windows. */