+2017-03-15 NightStrike <nightstrike@gmail.com>
+ Janne Blomqvist <jb@gcc.gnu.org>
+
+ * intrinsics/random.c (getosrandom): Remove check for __CYGWIN__
+ preprocessor flag.
+ * intrinsics/system_clock.c: Likewise.
+ (system_clock_4): Likewise.
+ (system_clock_8): Likewise.
+ * intrinsics/time_1.h: Don't include windows.h if __CYGWIN__ is
+ defined.
+
2017-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/79956
getosrandom (void *buf, size_t buflen)
{
/* rand_s is available in MinGW-w64 but not plain MinGW. */
-#if defined(__MINGW64_VERSION_MAJOR) && !defined(__CYGWIN__)
+#if defined(__MINGW64_VERSION_MAJOR)
unsigned int* b = buf;
for (unsigned i = 0; i < buflen / sizeof (unsigned int); i++)
rand_s (&b[i]);
#include "time_1.h"
-#if !defined(__MINGW32__) && !defined(__CYGWIN__)
+#if !defined(__MINGW32__)
/* POSIX states that CLOCK_REALTIME must be present if clock_gettime
is available, others are optional. */
#endif
}
-#endif /* !__MINGW32 && !__CYGWIN__ */
+#endif /* !__MINGW32__ */
extern void
system_clock_4 (GFC_INTEGER_4 *count, GFC_INTEGER_4 *count_rate,
system_clock_4 (GFC_INTEGER_4 *count, GFC_INTEGER_4 *count_rate,
GFC_INTEGER_4 *count_max)
{
-#if defined(__MINGW32__) || defined(__CYGWIN__)
+#if defined(__MINGW32__)
if (count)
{
/* Use GetTickCount here as the resolution and range is
system_clock_8 (GFC_INTEGER_8 *count, GFC_INTEGER_8 *count_rate,
GFC_INTEGER_8 *count_max)
{
-#if defined(__MINGW32__) || defined(__CYGWIN__)
+#if defined(__MINGW32__)
LARGE_INTEGER cnt;
LARGE_INTEGER freq;
bool fail = false;
CPU_TIME intrinsics. Returns 0 for success or -1 if no
CPU time could be computed. */
-#if defined(__MINGW32__) || defined(__CYGWIN__)
+#if defined(__MINGW32__)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>