aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/utimens.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/utimens.c b/lib/utimens.c
index 0b3b8e2f3af..5f3a846ea2f 100644
--- a/lib/utimens.c
+++ b/lib/utimens.c
@@ -35,7 +35,13 @@
35#include "stat-time.h" 35#include "stat-time.h"
36#include "timespec.h" 36#include "timespec.h"
37 37
38#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ 38/* On native Windows, use SetFileTime; but avoid this when compiling
39 GNU Emacs, which arranges for this in some other way and which
40 defines WIN32_LEAN_AND_MEAN itself. */
41
42#if ((defined _WIN32 || defined __WIN32__) \
43 && ! defined __CYGWIN__ && ! defined EMACS_CONFIGURATION)
44# define USE_SETFILETIME
39# define WIN32_LEAN_AND_MEAN 45# define WIN32_LEAN_AND_MEAN
40# include <windows.h> 46# include <windows.h>
41# include "msvc-nothrow.h" 47# include "msvc-nothrow.h"
@@ -277,7 +283,7 @@ fdutimens (int fd, char const *file, struct timespec const timespec[2])
277 lutimensat_works_really = -1; 283 lutimensat_works_really = -1;
278#endif /* HAVE_UTIMENSAT || HAVE_FUTIMENS */ 284#endif /* HAVE_UTIMENSAT || HAVE_FUTIMENS */
279 285
280#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ 286#ifdef USE_SETFILETIME
281 /* On native Windows, use SetFileTime(). See 287 /* On native Windows, use SetFileTime(). See
282 <https://msdn.microsoft.com/en-us/library/ms724933.aspx> 288 <https://msdn.microsoft.com/en-us/library/ms724933.aspx>
283 <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */ 289 <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */