bug-gnulib
[Top][All Lists]
Advanced

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

stat-time tests: Fix test failure on Cygwin


From: Bruno Haible
Subject: stat-time tests: Fix test failure on Cygwin
Date: Tue, 18 Sep 2018 21:29:27 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-134-generic; KDE/5.18.0; x86_64; ; )

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  <address@hidden>

        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

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