summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-07-13 10:21:55 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-07-13 10:21:55 +0000
commite15e0504801a3b394b02d0f671eceef5f0de1e8a (patch)
tree0c9575e6da43126a5c60ed8c598c9df34eb67f83
parentede7ad9de6dad8c79a4a3cd63a45f8bb92021b76 (diff)
In Perl_upg_version(), do not compare double against 10e50 on vax, for this
value can not be represented by a double (unless compiling with -mg); instead, use a lower limit value. This does not impact the behaviour since both sides of the test are supposed to produce the same result, albeit in different ways. ok millert@ espie@
-rw-r--r--gnu/usr.bin/perl/util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/usr.bin/perl/util.c b/gnu/usr.bin/perl/util.c
index 34f5fa90582..613b3eb16ae 100644
--- a/gnu/usr.bin/perl/util.c
+++ b/gnu/usr.bin/perl/util.c
@@ -4962,7 +4962,11 @@ Perl_upg_version(pTHX_ SV *ver, bool qv)
/* may get too much accuracy */
char tbuf[64];
+#ifdef __vax__
+ SV *sv = SvNVX(ver) > 10e37 ? newSV(64) : 0;
+#else
SV *sv = SvNVX(ver) > 10e50 ? newSV(64) : 0;
+#endif
char *buf;
#ifdef USE_LOCALE_NUMERIC
char *loc = savepv(setlocale(LC_NUMERIC, NULL));