summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util.c2
-rw-r--r--util.h7
2 files changed, 7 insertions, 2 deletions
diff --git a/util.c b/util.c
index 28cc7064ed..79e4000df5 100644
--- a/util.c
+++ b/util.c
@@ -6287,6 +6287,7 @@ Perl_drand48_r(perl_drand48_t *random_state)
return ldexp(*random_state, -48);
#else
+ {
U32 accu;
U16 temp[2];
@@ -6308,6 +6309,7 @@ Perl_drand48_r(perl_drand48_t *random_state)
return ldexp((double) random_state->seed[0], -48) +
ldexp((double) random_state->seed[1], -32) +
ldexp((double) random_state->seed[2], -16);
+ }
#endif
}
diff --git a/util.h b/util.h
index 4e5b97d88b..38c8d2f3ed 100644
--- a/util.h
+++ b/util.h
@@ -54,8 +54,11 @@ This is a synonym for (! foldEQ_locale())
/* perl.h undefs HAS_QUAD if IV isn't 64-bit */
#ifdef U64TYPE
-/* use a faster implementation when quads are available */
-#define PERL_DRAND48_QUAD
+# if !defined(_MSC_VER) || _MSC_VER >= 1300
+/* use a faster implementation when quads are available,
+ * but not with VC6 on Windows */
+# define PERL_DRAND48_QUAD
+# endif
#endif
#ifdef PERL_DRAND48_QUAD