]> Savannah Git Hosting - gnulib.git/commitdiff
stat-time tests: Fix test failure on Cygwin.
authorBruno Haible <bruno@clisp.org>
Tue, 18 Sep 2018 19:27:15 +0000 (21:27 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 18 Sep 2018 19:30:55 +0000 (21:30 +0200)
* tests/nap.h (nap_get_stat): Treat Cygwin like native Windows.

ChangeLog
tests/nap.h

index ce41cca0f3953909c8b9ff482850b2d0a28716db..4b7bcfc1ca14900498ac954cc6d2f9181126de08 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-09-18  Bruno Haible  <bruno@clisp.org>
+
+       stat-time tests: Fix test failure on Cygwin.
+       * tests/nap.h (nap_get_stat): Treat Cygwin like native Windows.
+
 2018-09-18  Paul Eggert  <eggert@cs.ucla.edu>
 
        doc: OS X 10.11 lacked ns time functions
index a155af3a12b5724e458bf3b38df5551ba7f922e5..c4f45d81fec94e420fe939df44b2cd55a27af373 100644 (file)
@@ -64,8 +64,8 @@ nap_get_stat (struct stat *st, int do_write)
   if (do_write)
     {
       ASSERT (write (nap_fd, "\n", 1) == 1);
-#if defined _WIN32 && ! defined __CYGWIN__
-      /* On native Windows, the modification times are not changed until NAP_FD
+#if defined _WIN32 || defined __CYGWIN__
+      /* On Windows, the modification times are not changed until NAP_FD
          is closed. See
          https://msdn.microsoft.com/en-us/library/windows/desktop/aa365747(v=vs.85).aspx */
       close (nap_fd);