On Cygwin 2.9, test-stat-time is failure: the assertion in
nap.h line 152 is reached. This fixes it.


2018-09-18  Bruno Haible  <[email protected]>

        stat-time tests: Fix test failure on Cygwin.
        * tests/nap.h (nap_get_stat): Treat Cygwin like native Windows.

diff --git a/tests/nap.h b/tests/nap.h
index a155af3..c4f45d8 100644
--- a/tests/nap.h
+++ b/tests/nap.h
@@ -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);


Reply via email to