summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tkObj.c8
-rw-r--r--generic/tkTrig.c8
-rw-r--r--win/rules.vc12
4 files changed, 17 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f62abf..c0ceef7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-31 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * win/rules.vc: Use -fp:strict with msvc8 as -fp:precise fails on
+ * generic/tkObj.c: amd64 builds. Fix the two places in Tk that generate
+ * generic/tkTrig.c: errors with msvc8 when using this flag.
+
2007-10-30 Jeff Hobbs <jeffh@ActiveState.com>
* library/choosedir.tcl: only enable OK button when valid in
diff --git a/generic/tkObj.c b/generic/tkObj.c
index 7186d4d..5997a2f 100644
--- a/generic/tkObj.c
+++ b/generic/tkObj.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkObj.c,v 1.17 2007/10/15 07:24:49 das Exp $
+ * RCS: @(#) $Id: tkObj.c,v 1.18 2007/10/31 00:05:53 patthoyts Exp $
*/
#include "tkInt.h"
@@ -154,7 +154,7 @@ Tk_GetPixelsFromObj(
double d;
PixelRep *pixelPtr;
static double bias[] = {
- 1.0, 10.0, 25.4, 25.4 / 72.0
+ 1.0, 10.0, 25.4, 0.35278 /*25.4 / 72.0*/
};
if (objPtr->typePtr != &pixelObjType) {
@@ -390,7 +390,7 @@ Tk_GetMMFromObj(
double d;
MMRep *mmPtr;
static double bias[] = {
- 10.0, 25.4, 1.0, 25.4 / 72.0
+ 10.0, 25.4, 1.0, 0.35278 /*25.4 / 72.0*/
};
if (objPtr->typePtr != &mmObjType) {
@@ -513,7 +513,7 @@ UpdateStringOfMM(
}
Tcl_PrintDouble(NULL, mmPtr->value, buffer);
- len = strlen(buffer);
+ len = (int)strlen(buffer);
objPtr->bytes = (char *) ckalloc((unsigned) len + 1);
strcpy(objPtr->bytes, buffer);
diff --git a/generic/tkTrig.c b/generic/tkTrig.c
index 9c8d077..f9bdfe5 100644
--- a/generic/tkTrig.c
+++ b/generic/tkTrig.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTrig.c,v 1.8 2007/09/07 00:34:54 dgp Exp $
+ * RCS: @(#) $Id: tkTrig.c,v 1.9 2007/10/31 00:05:53 patthoyts Exp $
*/
#include <stdio.h>
@@ -1599,7 +1599,11 @@ TkGetMiterPoints(
double deltaX, deltaY; /* X and y offsets cooresponding to dist
* (fudge factors for bounding box). */
double p1x, p1y, p2x, p2y, p3x, p3y;
- static double elevenDegrees = (11.0*2.0*PI)/360.0;
+#ifndef _MSC_VER
+ static const double elevenDegrees = (11.0*2.0*PI)/360.0;
+#else /* msvc8 with -fp:strict requires it this way */
+ static const double elevenDegrees = 0.19198621771937624;
+#endif
/*
* Round the coordinates to integers to mimic what happens when the line
diff --git a/win/rules.vc b/win/rules.vc
index f010169..836aaff 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -11,7 +11,7 @@
# Copyright (c) 2003-2007 Patrick Thoyts
#
#------------------------------------------------------------------------------
-# RCS: @(#) $Id: rules.vc,v 1.18 2007/10/12 18:56:33 patthoyts Exp $
+# RCS: @(#) $Id: rules.vc,v 1.19 2007/10/31 00:05:53 patthoyts Exp $
#------------------------------------------------------------------------------
!ifndef _RULES_VC
@@ -106,19 +106,9 @@ OPTIMIZATIONS = $(OPTIMIZATIONS) -Oi
OPTIMIZATIONS = $(OPTIMIZATIONS) -Op
!endif
-# Tk doesnt seem to be able to use -fp:strict.
-!if "$(PROJECT)" != "tk"
!if [nmakehlp -c -fp:strict]
OPTIMIZATIONS = $(OPTIMIZATIONS) -fp:strict
!endif
-!else
-!if [nmakehlp -c -fp:precise]
-OPTIMIZATIONS = $(OPTIMIZATIONS) -fp:precise
-!endif
-!if [nmakehlp -c -fp:except]
-OPTIMIZATIONS = $(OPTIMIZATIONS) -fp:except
-!endif
-!endif
!if [nmakehlp -c -Gs]
OPTIMIZATIONS = $(OPTIMIZATIONS) -Gs