On Sun, Mar 12, 2017 at 1:26 PM, NightStrike <nightstr...@gmail.com> wrote: > On Mon, Feb 27, 2017 at 6:15 AM, Janne Blomqvist > <blomqvist.ja...@gmail.com> wrote: >> Don't try to use rand_s on CYGWIN >> >> CYGWIN seems to include _mingw.h and thus __MINGW64_VERSION_MAJOR is >> defined even though rand_s is not available. Thus add an extra check >> for __CYGWIN__. >> >> Thanks to Tim Prince and Nightstrike for bringing this issue to my attention. >> >> Committed as r245755. >> >> 2017-02-27 Janne Blomqvist <j...@gcc.gnu.org> >> >> * intrinsics/random.c (getosrandom): Don't try to use rand_s on >> CYGWIN. > > 1) There was no patch attached to the email. > > 2) As mentioned on IRC, I don't think this is the right fix. The real > problem is that time_1.h includes windows.h on CYGWIN, which it > shouldn't be doing. This then pollutes the translation unit with all > sorts of MINGW-isms that aren't exactly appropriate for cygwin. > Removing the include in time_1.h and then adjusting a few ifdefs in > system_clock.c that also had the same bug fixes the problem. The > testsuite is running right now on this.
Testsuite run completed with no change in results: === gfortran Summary === # of expected passes 44633 # of unexpected failures 55 # of unexpected successes 6 # of expected failures 85 # of unsupported tests 187 /tmp/build/gcc/testsuite/gfortran/../../gfortran version 7.0.1 20170312 (experimental) (GCC) make[1]: Leaving directory '/tmp/build/gcc' Those 55 unexpected failures are unrelated to this change, and occur before and after.