Attachment "1200680.patch" to
ticket [1200680fff]
added by
dgp
2005-05-14 00:11:19.
Index: generic/tclBasic.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclBasic.c,v
retrieving revision 1.151
diff -u -r1.151 tclBasic.c
--- generic/tclBasic.c 10 May 2005 18:34:06 -0000 1.151
+++ generic/tclBasic.c 13 May 2005 17:06:05 -0000
@@ -19,9 +19,7 @@
#include "tclInt.h"
#include "tclCompile.h"
#include <float.h>
-#ifndef TCL_NO_MATH
#include <math.h>
-#endif
/*
* The following structure defines the client data for a math function
@@ -271,7 +269,6 @@
} BuiltinFuncDef;
BuiltinFuncDef BuiltinFuncTable[] = {
{ "::tcl::mathfunc::abs", ExprAbsFunc, NULL },
-#ifndef TCL_NO_MATH
{ "::tcl::mathfunc::acos", ExprUnaryFunc, (ClientData) acos },
{ "::tcl::mathfunc::asin", ExprUnaryFunc, (ClientData) asin },
{ "::tcl::mathfunc::atan", ExprUnaryFunc, (ClientData) atan },
@@ -279,32 +276,23 @@
{ "::tcl::mathfunc::ceil", ExprUnaryFunc, (ClientData) ceil },
{ "::tcl::mathfunc::cos", ExprUnaryFunc, (ClientData) cos },
{ "::tcl::mathfunc::cosh", ExprUnaryFunc, (ClientData) cosh },
-#endif
{ "::tcl::mathfunc::double",ExprDoubleFunc, NULL },
-#ifndef TCL_NO_MATH
{ "::tcl::mathfunc::exp", ExprUnaryFunc, (ClientData) exp },
{ "::tcl::mathfunc::floor", ExprUnaryFunc, (ClientData) floor },
{ "::tcl::mathfunc::fmod", ExprBinaryFunc, (ClientData) fmod },
{ "::tcl::mathfunc::hypot", ExprBinaryFunc, (ClientData) hypot },
-#endif
{ "::tcl::mathfunc::int", ExprIntFunc, NULL },
-#ifndef TCL_NO_MATH
{ "::tcl::mathfunc::log", ExprUnaryFunc, (ClientData) log },
{ "::tcl::mathfunc::log10", ExprUnaryFunc, (ClientData) log10 },
{ "::tcl::mathfunc::pow", ExprBinaryFunc, (ClientData) pow },
-#endif
{ "::tcl::mathfunc::rand", ExprRandFunc, NULL },
{ "::tcl::mathfunc::round", ExprRoundFunc, NULL },
-#ifndef TCL_NO_MATH
{ "::tcl::mathfunc::sin", ExprUnaryFunc, (ClientData) sin },
{ "::tcl::mathfunc::sinh", ExprUnaryFunc, (ClientData) sinh },
{ "::tcl::mathfunc::sqrt", ExprUnaryFunc, (ClientData) sqrt },
-#endif
{ "::tcl::mathfunc::srand", ExprSrandFunc, NULL },
-#ifndef TCL_NO_MATH
{ "::tcl::mathfunc::tan", ExprUnaryFunc, (ClientData) tan },
{ "::tcl::mathfunc::tanh", ExprUnaryFunc, (ClientData) tanh },
-#endif
{ "::tcl::mathfunc::wide", ExprWideFunc, NULL },
{ NULL, NULL, NULL }
};
Index: generic/tclBinary.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclBinary.c,v
retrieving revision 1.23
diff -u -r1.23 tclBinary.c
--- generic/tclBinary.c 10 May 2005 18:54:31 -0000 1.23
+++ generic/tclBinary.c 13 May 2005 17:06:05 -0000
@@ -15,11 +15,7 @@
#include "tclInt.h"
-#ifdef TCL_NO_MATH
-#define fabs(x) (x<0 ? -x : x)
-#else
#include <math.h>
-#endif
/*
* The following constants are used by GetFormatSpec to indicate various
Index: generic/tclExecute.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclExecute.c,v
retrieving revision 1.188
diff -u -r1.188 tclExecute.c
--- generic/tclExecute.c 10 May 2005 18:34:35 -0000 1.188
+++ generic/tclExecute.c 13 May 2005 17:06:09 -0000
@@ -17,9 +17,7 @@
#include "tclInt.h"
#include "tclCompile.h"
-#ifndef TCL_NO_MATH
-# include <math.h>
-#endif
+#include <math.h>
#include <float.h>
/*
Index: unix/Makefile.in
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/Makefile.in,v
retrieving revision 1.165
diff -u -r1.165 Makefile.in
--- unix/Makefile.in 10 May 2005 18:35:25 -0000 1.165
+++ unix/Makefile.in 13 May 2005 17:06:28 -0000
@@ -105,12 +105,6 @@
PROTO_FLAGS =
#PROTO_FLAGS = -DNO_PROTOTYPE
-# Mathematical functions like sin and atan2 are enabled for expressions
-# by default. To disable them, reverse the comment characters on the
-# following pairs of lines:
-MATH_FLAGS =
-#MATH_FLAGS = -DTCL_NO_MATH
-
# If you use the setenv, putenv, or unsetenv procedures to modify
# environment variables in your application and you'd like those
# modifications to appear in the "env" Tcl variable, switch the
@@ -273,18 +267,17 @@
CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
-I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR} -DTCL_TOMMATH -I${TOMMATH_DIR} \
-${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} \
+${AC_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} \
${NO_DEPRECATED_FLAGS} ${ENV_FLAGS}
STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
-I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR} -DTCL_TOMMATH -I${TOMMATH_DIR} \
-${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${ENV_FLAGS}
+${AC_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${ENV_FLAGS}
LIBS = @TCL_LIBS@
DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \
-${AC_FLAGS} ${MATH_FLAGS} \
-${GENERIC_FLAGS} ${PROTO_FLAGS}
+${AC_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS}
TCLSH_OBJS = tclAppInit.o