From: Jarkko Hietaniemi Date: Wed, 6 Feb 2002 23:38:10 +0000 (+0000) Subject: OS/390 gcvt() seems buggy: with -W 0,float(ieee) it X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eecdb66e2703f1b4556c3b52acafae55c7e4d968;p=p5sagit%2Fp5-mst-13.2.git OS/390 gcvt() seems buggy: with -W 0,float(ieee) it mangles 0.1 to "10". sprintf() seems more well-behaved. p4raw-id: //depot/perl@14579 --- diff --git a/hints/os390.sh b/hints/os390.sh index bb41e67..8766f0b 100644 --- a/hints/os390.sh +++ b/hints/os390.sh @@ -203,6 +203,14 @@ EOWARN fi fi +# Most of the time gcvt() seems to work fine but +# sometimes values like 0.1, 0.2, come out as "10", "20", +# a trivial Perl demonstration snippet is 'print 0.1'. +# Yes, a flagrant bug, but unfortunately not trivial to +# reproduce in C using gcvt(). +# sprintf() seems to get things right(er). +d_Gconvert='sprintf((b),"%.*g",(n),(x))' + cat >config.arch<<'__CONFIG_ARCH__' # The '-W 0,float(ieee)' cannot be used during Configure as ldflags.