]> www.ginac.de Git - cln.git/commitdiff
Fix #if directives that test for native Windows.
authorBruno Haible <bruno@clisp.org>
Sun, 27 Oct 2019 21:20:44 +0000 (22:20 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 27 Oct 2019 21:20:44 +0000 (22:20 +0100)
src/base/random/cl_random_from.cc
tests/test_I_io.cc

index 22d48b68dc182698240bf06e8fda09a59e320245..3614cc3b820ff33bb9f63b894a3b7b66f927fc83 100644 (file)
@@ -1,7 +1,7 @@
 // random_state constructor.
 
 
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(__CYGWIN__)
 #include <windows.h> // For GetCurrentProcessId(), must be included first, sorry.
 #endif
 
@@ -61,7 +61,7 @@ inline uint32 get_seed (void)
 
 #endif
 
-#elif defined(_WIN32)
+#elif defined(_WIN32) && !defined(__CYGWIN__)
 #include <sys/time.h>
 #include <sys/timeb.h>
 
@@ -93,7 +93,7 @@ random_state::random_state ()
 #elif defined(__OpenBSD__)
        seed_lo = arc4random();
        seed_hi = arc4random();
-#elif defined(_WIN32)
+#elif defined(_WIN32) && !defined(__CYGWIN__)
        seed_lo = get_seed();
        seed_hi = (rand() << 8) ^ (uintL)(GetCurrentProcessId());
 #elif defined(__atarist)
index 9ee259d4c652b25835a061c1c6fe3a66663f4da2..4821034f78df5e81ad14c942e0270abb60c54917 100644 (file)
@@ -25,7 +25,7 @@ int test_I_io (int iterations)
                }
 
        }
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(__CYGWIN__)
        std::cerr << "[The test is known to fail on this platform, ignore it]" << std::endl;
        return 0;
 #else