summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-29 04:37:13 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-29 04:37:13 (GMT)
commit91ec3d8fbeeddea7b3ddb50a6f59cc4870d15c7c (patch)
tree55dda6209fa471dac95a731918755a7a6a0f1827 /random.c
parentdf8c48a3f96131c7feb313be99b179c6f01e4de1 (diff)
VC6 error
* random.c (int_pair_to_real_inclusive): get rid of VC6 compile error C2520: conversion from unsigned __int64 to double not implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r--random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/random.c b/random.c
index 1093a10..4ffebf0 100644
--- a/random.c
+++ b/random.c
@@ -286,7 +286,7 @@ int_pair_to_real_inclusive(uint32_t a, uint32_t b)
const uint128_t m = ((uint128_t)1 << dig) | 1;
uint128_t x = ((uint128_t)a << 32) | b;
r = (double)(uint64_t)((x * m) >> 64);
-#elif defined HAVE_UINT64_T
+#elif defined HAVE_UINT64_T && !(defined _MSC_VER && _MSC_VER <= 1200)
uint64_t x = ((uint64_t)a << dig_u) +
(((uint64_t)b + (a >> dig_u)) >> dig_r64);
r = (double)x;