diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rwxr-xr-x | generic/tclStrToD.c | 14 |
2 files changed, 9 insertions, 6 deletions
@@ -12,6 +12,7 @@ * win/tclWinConsole.c signed<->unsigned mismatch. Backported from * win/tclWinDde.c trunk. * win/tclWinNotify.c + * generic/tclStrToD.c: [Bug #3005233] fix for build on OpenBSD vax 2010-05-19 Alexandre Ferrieux <ferrieux@users.sourceforge.net> diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index eda53ac..4484705 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.33.2.3 2009/12/07 17:14:28 dgp Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.33.2.4 2010/05/21 12:51:26 nijtmans Exp $ * *---------------------------------------------------------------------- */ @@ -948,13 +948,14 @@ TclParseNumber( case sINFIN: case sINFINI: case sINFINIT: +#ifdef IEEE_FLOATING_POINT case sN: case sNA: case sNANPAREN: case sNANHEX: Tcl_Panic("TclParseNumber: bad acceptState %d parsing '%s'", acceptState, bytes); - +#endif case BINARY: shift = numTrailZeros; if (!significandOverflow && significandWide != 0 && @@ -1135,12 +1136,13 @@ TclParseNumber( objPtr->typePtr = &tclDoubleType; break; +#ifdef IEEE_FLOATING_POINT case sNAN: case sNANFINISH: objPtr->internalRep.doubleValue = MakeNaN(signum, significandWide); objPtr->typePtr = &tclDoubleType; break; - +#endif case INITIAL: /* This case only to silence compiler warning */ Tcl_Panic("TclParseNumber: state INITIAL can't happen here"); @@ -1232,7 +1234,7 @@ AccumulateDecimalDigit( * number to a bignum and fall through into the bignum case. */ - TclBNInitBignumFromWideUInt (bignumRepPtr, w); + TclBNInitBignumFromWideUInt(bignumRepPtr, w); } else { /* * Wide multiplication. @@ -1342,7 +1344,7 @@ MakeLowPrecisionDouble( * without special handling. */ - retval = (double)(Tcl_WideInt)significand * pow10vals[ exponent ]; + retval = (double)(Tcl_WideInt)significand * pow10vals[exponent]; goto returnValue; } else { int diff = DBL_DIG - numSigDigs; @@ -1953,7 +1955,7 @@ TclDoubleDigits( if (highOK) { tc2 = (tc2 >= 0); } else { - tc2= (tc2 > 0); + tc2 = (tc2 > 0); } if (!tc1) { if (!tc2) { |