summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2013-11-19 09:50:25 +1100
committerTony Cook <tony@develop-help.com>2013-11-19 09:50:25 +1100
commit0f24672021c6c5d7f398a81ee24305ae45c32779 (patch)
treea89e7e52f8a122d4d237d20cf7e4a04333327631 /util.c
parentf2756cbb47e4bb872c6b9acc9ee0f67b30167864 (diff)
downloadperl-0f24672021c6c5d7f398a81ee24305ae45c32779.tar.gz
[perl #120543] work around a C++ library bug in VC 2003
VC 2003 makes overloaded versions of ldexp() available when including <math.h> which should only be visible when including <cmath>. The cast ensures the ldexp(double, int) signature is used.
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index c68bb9035f..68893c420f 100644
--- a/util.c
+++ b/util.c
@@ -6252,7 +6252,7 @@ Perl_drand48_r(perl_drand48_t *random_state)
*random_state = (*random_state * DRAND48_MULT + DRAND48_ADD)
& DRAND48_MASK;
- return ldexp(*random_state, -48);
+ return ldexp((double)*random_state, -48);
#else
{
U32 accu;