[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
utimecmp: support for native Windows
From: |
Bruno Haible |
Subject: |
utimecmp: support for native Windows |
Date: |
Mon, 01 May 2017 11:59:14 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-75-generic; KDE/5.18.0; x86_64; ; ) |
This patch is tested with the utimens changes. I'm not sure it is really
necessary, but it's certainly not wrong.
2017-04-30 Bruno Haible <address@hidden>
utimecmp: Add support for native Windows.
* lib/utimecmp.c (SYSCALL_RESOLUTION): Set to 100 on native Windows.
diff --git a/lib/utimecmp.c b/lib/utimecmp.c
index cd773ae..9d8261d 100644
--- a/lib/utimecmp.c
+++ b/lib/utimecmp.c
@@ -45,6 +45,10 @@
no greater than 1 billion. */
#if HAVE_UTIMENSAT
enum { SYSCALL_RESOLUTION = 1 };
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* On native Windows, file times have 100 ns resolution. See
+ <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */
+enum { SYSCALL_RESOLUTION = 100 };
#elif ((HAVE_FUTIMESAT || HAVE_WORKING_UTIMES) \
&& (defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC \
|| defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- utimecmp: support for native Windows,
Bruno Haible <=