emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 9c2b03f: Merge from gnulib


From: Paul Eggert
Subject: [Emacs-diffs] master 9c2b03f: Merge from gnulib
Date: Tue, 2 May 2017 03:47:40 -0400 (EDT)

branch: master
commit 9c2b03fe3fc7695867d883f4918d74ba9a7c262e
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Merge from gnulib
    
    This incorporates:
    2017-05-02 utimens: port to Emacs + MS-Windows
    * lib/utimens.c: Copy from gnulib.
---
 lib/utimens.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/utimens.c b/lib/utimens.c
index 0b3b8e2..5f3a846 100644
--- a/lib/utimens.c
+++ b/lib/utimens.c
@@ -35,7 +35,13 @@
 #include "stat-time.h"
 #include "timespec.h"
 
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* On native Windows, use SetFileTime; but avoid this when compiling
+   GNU Emacs, which arranges for this in some other way and which
+   defines WIN32_LEAN_AND_MEAN itself.  */
+
+#if ((defined _WIN32 || defined __WIN32__) \
+     && ! defined __CYGWIN__ && ! defined EMACS_CONFIGURATION)
+# define USE_SETFILETIME
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
 # include "msvc-nothrow.h"
@@ -277,7 +283,7 @@ fdutimens (int fd, char const *file, struct timespec const 
timespec[2])
   lutimensat_works_really = -1;
 #endif /* HAVE_UTIMENSAT || HAVE_FUTIMENS */
 
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#ifdef USE_SETFILETIME
   /* On native Windows, use SetFileTime(). See
      <https://msdn.microsoft.com/en-us/library/ms724933.aspx>
      <https://msdn.microsoft.com/en-us/library/ms724284.aspx>  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]