summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-09-17 14:29:10 +0200
committerNicholas Clark <nick@ccl4.org>2013-09-18 09:58:49 +0200
commit7ace1b5935c28f963730b93af6727132e57b0975 (patch)
tree9bd3a9e40a2dd862f79b2684e6a0ccee86c2afd3 /util.c
parente25d460c7424add881539f78a45c918bc5d5bc94 (diff)
downloadperl-7ace1b5935c28f963730b93af6727132e57b0975.tar.gz
Use U64_CONST() for the drand48 constants that are larger than 2**32.
Without this the constants are truncated to 32 bits on (at least) HP-UX with 32 bit IVs, which results in some very wrong output from rand().
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index ef464f7d4d..6227474e76 100644
--- a/util.c
+++ b/util.c
@@ -6247,9 +6247,9 @@ Perl_get_re_arg(pTHX_ SV *sv) {
#ifdef PERL_DRAND48_QUAD
-#define DRAND48_MULT 0x5deece66d
+#define DRAND48_MULT U64_CONST(0x5deece66d)
#define DRAND48_ADD 0xb
-#define DRAND48_MASK 0xffffffffffff
+#define DRAND48_MASK U64_CONST(0xffffffffffff)
#else