From: Bruno Haible Date: Sun, 27 Oct 2019 21:20:44 +0000 (+0100) Subject: Fix #if directives that test for native Windows. X-Git-Tag: cln_1-3-5~11 X-Git-Url: https://www.ginac.de/CLN/cln.git//cln.git?a=commitdiff_plain;h=1c72f86167c3dc547ba704bed3a65149a9024db1;p=cln.git Fix #if directives that test for native Windows. --- diff --git a/src/base/random/cl_random_from.cc b/src/base/random/cl_random_from.cc index 22d48b6..3614cc3 100644 --- a/src/base/random/cl_random_from.cc +++ b/src/base/random/cl_random_from.cc @@ -1,7 +1,7 @@ // random_state constructor. -#if defined(_WIN32) +#if defined(_WIN32) && !defined(__CYGWIN__) #include // 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 #include @@ -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) diff --git a/tests/test_I_io.cc b/tests/test_I_io.cc index 9ee259d..4821034 100644 --- a/tests/test_I_io.cc +++ b/tests/test_I_io.cc @@ -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