From: Jarkko Hietaniemi Date: Thu, 31 Aug 2000 18:09:20 +0000 (+0000) Subject: Forget about NV_MAX (#6951). Various floating point tweaks, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=59155cc063cf4bfd6a5bac9ec4e936509becfd87;p=p5sagit%2Fp5-mst-13.2.git Forget about NV_MAX (#6951). Various floating point tweaks, ideas from Eric Fifer, Yitzchak, Alan, and Spider. p4raw-id: //depot/perl@6953 --- diff --git a/Configure b/Configure index e6a6cdf..428241e 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Thu Aug 31 17:56:37 EET DST 2000 [metaconfig 3.0 PL70] +# Generated on Thu Aug 31 21:06:17 EET DST 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >/tmp/c1$$ <&4 + echo "This architecture is naturally 64-bit, not changing architecture name." >&4 ;; *) case "$use64bitint" in @@ -7847,17 +7847,21 @@ int main() Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf); checkit("-100000", buf); + Gconvert((DOUBLETYPE)123.456, 8, 0, buf); + checkit("123.456", buf); + exit(0); } EOP case "$d_Gconvert" in gconvert*) xxx_list='gconvert gcvt sprintf' ;; gcvt*) xxx_list='gcvt gconvert sprintf' ;; -*) xxx_list='sprintf gconvert gcvt' ;; +*) xxx_list='gconvert gcvt sprintf' ;; esac case "$d_longdbl$uselongdouble$d_PRIgldbl" in "$define$define$define") + # for long doubles prefer sprintf xxx_list="`echo $xxx_list|sed s/sprintf//`" xxx_list="sprintf $xxx_list" case "$d_qgcvt" in @@ -10431,7 +10435,6 @@ EOP esac - : check for off64_t echo " " echo "Checking to see if you have off64_t..." >&4 diff --git a/sv.c b/sv.c index 0fdae01..827bd96 100644 --- a/sv.c +++ b/sv.c @@ -2212,7 +2212,8 @@ Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp) * --jhi Sep 1999 */ if (SvTYPE(sv) < SVt_PVNV) sv_upgrade(sv, SVt_PVNV); - SvGROW(sv, NV_DIG + 10); /* sign, decimal separator, e+NNNNN, nul */ + /* The +20 is pure guesswork. Configure test needed. --jhi */ + SvGROW(sv, NV_DIG + 20); s = SvPVX(sv); olderrno = errno; /* some Xenix systems wipe out errno here */ #ifdef apollo