path: root/compat/mingw.h
diff options
authorJohannes Sixt <>2007-09-07 11:05:00 (GMT)
committerJohannes Sixt <>2008-06-26 06:45:11 (GMT)
commit7c0ffa1cb753f9b909dfb3bc7a5d5417b8de39c2 (patch)
treef073f742b0e75361c365f0ddd6979f5c766809d6 /compat/mingw.h
parent5411bdc4e4b170a57a61b2d486ab344896c41500 (diff)
Windows: Add a custom implementation for utime().
This is a necessary pendant to our lstat implementation: MSVCRT's implementations of lstat and utime do some adjustments if daylight saving time is in effect, but our lstat implementation doesn't do these adjustments and report the correct UTC time. With this implementation we omit the adjustments in utime() as well and always write UTC. Signed-off-by: Johannes Sixt <>
Diffstat (limited to 'compat/mingw.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index 69b1dde..92e9273 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -168,6 +168,9 @@ int mingw_fstat(int fd, struct stat *buf);
#define lstat mingw_lstat
#define stat(x,y) mingw_lstat(x,y)
+int mingw_utime(const char *file_name, const struct utimbuf *times);
+#define utime mingw_utime
pid_t mingw_spawnvpe(const char *cmd, const char **argv, char **env);
void mingw_execvp(const char *cmd, char *const *argv);
#define execvp mingw_execvp