summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rwxr-xr-xgeneric/tclStrToD.c9
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 8153c0c..7f3374f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-12-07 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclStrToD.c: Correct conditional compile directives to
+ better detect the toolchain that needs extra work for proper underflow
+ treatment instead of merely detecting the mips platform. [Bug 2902010].
+
2009-12-07 Miguel Sofer <msofer@users.sf.net>
* generic/tclBasic.c: add ::tcl::unsupported::yieldTo
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index fbe4105..6412e92 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.38 2009/07/16 21:24:40 dgp Exp $
+ * RCS: @(#) $Id: tclStrToD.c,v 1.39 2009/12/07 17:15:33 dgp Exp $
*
*----------------------------------------------------------------------
*/
@@ -71,9 +71,10 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
/*
* MIPS floating-point units need special settings in control registers
- * to use gradual underflow as we expect.
+ * to use gradual underflow as we expect. This fix is for the MIPSpro
+ * compiler.
*/
-#if defined(__mips)
+#if defined(__sgi) && defined(_COMPILER_VERSION)
#include <sys/fpu.h>
#endif
/*
@@ -2174,7 +2175,7 @@ TclInitDoubleConversion(void)
} bitwhack;
#endif
-#if defined(__mips)
+#if defined(__sgi) && defined(_COMPILER_VERSION)
union fpc_csr mipsCR;
mipsCR.fc_word = get_fpc_csr();