Index: compat/fixstrtod.c
===================================================================
RCS file: compat/fixstrtod.c
diff -N compat/fixstrtod.c
--- compat/fixstrtod.c	14 Sep 1998 18:39:44 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,38 +0,0 @@
-/* 
- * fixstrtod.c --
- *
- *	Source code for the "fixstrtod" procedure.  This procedure is
- *	used in place of strtod under Solaris 2.4, in order to fix
- *	a bug where the "end" pointer gets set incorrectly.
- *
- * Copyright (c) 1995 Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * RCS: @(#) $Id: fixstrtod.c,v 1.2 1998/09/14 18:39:44 stanton Exp $
- */
-
-#include <stdio.h>
-
-#undef strtod
-
-/*
- * Declare strtod explicitly rather than including stdlib.h, since in
- * somes systems (e.g. SunOS 4.1.4) stdlib.h doesn't declare strtod.
- */
-
-extern double strtod();
-
-double
-fixstrtod(string, endPtr)
-    char *string;
-    char **endPtr;
-{
-    double d;
-    d = strtod(string, endPtr);
-    if ((endPtr != NULL) && (*endPtr != string) && ((*endPtr)[-1] == 0)) {
-	*endPtr -= 1;
-    }
-    return d;
-}
Index: compat/stdlib.h
===================================================================
RCS file: /cvsroot/tcl/tcl/compat/stdlib.h,v
retrieving revision 1.3
diff -u -r1.3 stdlib.h
--- compat/stdlib.h	16 Apr 1999 00:46:30 -0000	1.3
+++ compat/stdlib.h	7 Apr 2005 19:28:24 -0000
@@ -6,7 +6,7 @@
  *	sense;  it only declares things that are needed by Tcl.
  *	This file is needed even on many systems with their own
  *	stdlib.h (e.g. SunOS) because not all stdlib.h files
- *	declare all the procedures needed here (such as strtod).
+ *	declare all the procedures needed here.
  *
  * Copyright (c) 1991 The Regents of the University of California.
  * Copyright (c) 1994-1998 Sun Microsystems, Inc.
@@ -23,9 +23,7 @@
 #include <tcl.h>
 
 extern void		abort _ANSI_ARGS_((void));
-extern double		atof _ANSI_ARGS_((CONST char *string));
 extern int		atoi _ANSI_ARGS_((CONST char *string));
-extern long		atol _ANSI_ARGS_((CONST char *string));
 extern char *		calloc _ANSI_ARGS_((unsigned int numElements,
 			    unsigned int size));
 extern void		exit _ANSI_ARGS_((int status));
@@ -36,7 +34,6 @@
 			    int (*compar)(CONST VOID *element1, CONST VOID
 			    *element2)));
 extern char *		realloc _ANSI_ARGS_((char *ptr, unsigned int numBytes));
-extern double		strtod _ANSI_ARGS_((CONST char *string, char **endPtr));
 extern long		strtol _ANSI_ARGS_((CONST char *string, char **endPtr,
 			    int base));
 extern unsigned long	strtoul _ANSI_ARGS_((CONST char *string,
Index: compat/strtod.c
===================================================================
RCS file: compat/strtod.c
diff -N compat/strtod.c
--- compat/strtod.c	6 Apr 2004 22:25:48 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,257 +0,0 @@
-/* 
- * strtod.c --
- *
- *	Source code for the "strtod" library procedure.
- *
- * Copyright (c) 1988-1993 The Regents of the University of California.
- * Copyright (c) 1994 Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * RCS: @(#) $Id: strtod.c,v 1.7 2004/04/06 22:25:48 dgp Exp $
- */
-
-#include "tclInt.h"
-#include <ctype.h>
-
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-#ifndef NULL
-#define NULL 0
-#endif
-
-static int maxExponent = 511;	/* Largest possible base 10 exponent.  Any
-				 * exponent larger than this will already
-				 * produce underflow or overflow, so there's
-				 * no need to worry about additional digits.
-				 */
-static double powersOf10[] = {	/* Table giving binary powers of 10.  Entry */
-    10.,			/* is 10^2^i.  Used to convert decimal */
-    100.,			/* exponents into floating-point numbers. */
-    1.0e4,
-    1.0e8,
-    1.0e16,
-    1.0e32,
-    1.0e64,
-    1.0e128,
-    1.0e256
-};
-
-/*
- *----------------------------------------------------------------------
- *
- * strtod --
- *
- *	This procedure converts a floating-point number from an ASCII
- *	decimal representation to internal double-precision format.
- *
- * Results:
- *	The return value is the double-precision floating-point
- *	representation of the characters in string.  If endPtr isn't
- *	NULL, then *endPtr is filled in with the address of the
- *	next character after the last one that was part of the
- *	floating-point number.
- *
- * Side effects:
- *	None.
- *
- *----------------------------------------------------------------------
- */
-
-double
-strtod(string, endPtr)
-    CONST char *string;		/* A decimal ASCII floating-point number,
-				 * optionally preceded by white space.
-				 * Must have form "-I.FE-X", where I is the
-				 * integer part of the mantissa, F is the
-				 * fractional part of the mantissa, and X
-				 * is the exponent.  Either of the signs
-				 * may be "+", "-", or omitted.  Either I
-				 * or F may be omitted, or both.  The decimal
-				 * point isn't necessary unless F is present.
-				 * The "E" may actually be an "e".  E and X
-				 * may both be omitted (but not just one).
-				 */
-    char **endPtr;		/* If non-NULL, store terminating character's
-				 * address here. */
-{
-    int sign, expSign = FALSE;
-    double fraction, dblExp, *d;
-    register CONST char *p;
-    register int c;
-    int exp = 0;		/* Exponent read from "EX" field. */
-    int fracExp = 0;		/* Exponent that derives from the fractional
-				 * part.  Under normal circumstatnces, it is
-				 * the negative of the number of digits in F.
-				 * However, if I is very long, the last digits
-				 * of I get dropped (otherwise a long I with a
-				 * large negative exponent could cause an
-				 * unnecessary overflow on I alone).  In this
-				 * case, fracExp is incremented one for each
-				 * dropped digit. */
-    int mantSize;		/* Number of digits in mantissa. */
-    int decPt;			/* Number of mantissa digits BEFORE decimal
-				 * point. */
-    CONST char *pExp;		/* Temporarily holds location of exponent
-				 * in string. */
-
-    /*
-     * Strip off leading blanks and check for a sign.
-     */
-
-    p = string;
-    while (isspace(UCHAR(*p))) {
-	p += 1;
-    }
-    if (*p == '-') {
-	sign = TRUE;
-	p += 1;
-    } else {
-	if (*p == '+') {
-	    p += 1;
-	}
-	sign = FALSE;
-    }
-
-    /*
-     * Count the number of digits in the mantissa (including the decimal
-     * point), and also locate the decimal point.
-     */
-
-    decPt = -1;
-    for (mantSize = 0; ; mantSize += 1)
-    {
-	c = *p;
-	if (!isdigit(c)) {
-	    if ((c != '.') || (decPt >= 0)) {
-		break;
-	    }
-	    decPt = mantSize;
-	}
-	p += 1;
-    }
-
-    /*
-     * Now suck up the digits in the mantissa.  Use two integers to
-     * collect 9 digits each (this is faster than using floating-point).
-     * If the mantissa has more than 18 digits, ignore the extras, since
-     * they can't affect the value anyway.
-     */
-    
-    pExp  = p;
-    p -= mantSize;
-    if (decPt < 0) {
-	decPt = mantSize;
-    } else {
-	mantSize -= 1;			/* One of the digits was the point. */
-    }
-    if (mantSize > 18) {
-	fracExp = decPt - 18;
-	mantSize = 18;
-    } else {
-	fracExp = decPt - mantSize;
-    }
-    if (mantSize == 0) {
-	fraction = 0.0;
-	p = string;
-	goto done;
-    } else {
-	int frac1, frac2;
-	frac1 = 0;
-	for ( ; mantSize > 9; mantSize -= 1)
-	{
-	    c = *p;
-	    p += 1;
-	    if (c == '.') {
-		c = *p;
-		p += 1;
-	    }
-	    frac1 = 10*frac1 + (c - '0');
-	}
-	frac2 = 0;
-	for (; mantSize > 0; mantSize -= 1)
-	{
-	    c = *p;
-	    p += 1;
-	    if (c == '.') {
-		c = *p;
-		p += 1;
-	    }
-	    frac2 = 10*frac2 + (c - '0');
-	}
-	fraction = (1.0e9 * frac1) + frac2;
-    }
-
-    /*
-     * Skim off the exponent.
-     */
-
-    p = pExp;
-    if ((*p == 'E') || (*p == 'e')) {
-	p += 1;
-	if (*p == '-') {
-	    expSign = TRUE;
-	    p += 1;
-	} else {
-	    if (*p == '+') {
-		p += 1;
-	    }
-	    expSign = FALSE;
-	}
-	if (!isdigit(UCHAR(*p))) {
-	    p = pExp;
-	    goto done;
-	}
-	while (isdigit(UCHAR(*p))) {
-	    exp = exp * 10 + (*p - '0');
-	    p += 1;
-	}
-    }
-    if (expSign) {
-	exp = fracExp - exp;
-    } else {
-	exp = fracExp + exp;
-    }
-
-    /*
-     * Generate a floating-point number that represents the exponent.
-     * Do this by processing the exponent one bit at a time to combine
-     * many powers of 2 of 10. Then combine the exponent with the
-     * fraction.
-     */
-    
-    if (exp < 0) {
-	expSign = TRUE;
-	exp = -exp;
-    } else {
-	expSign = FALSE;
-    }
-    if (exp > maxExponent) {
-	exp = maxExponent;
-	errno = ERANGE;
-    }
-    dblExp = 1.0;
-    for (d = powersOf10; exp != 0; exp >>= 1, d += 1) {
-	if (exp & 01) {
-	    dblExp *= *d;
-	}
-    }
-    if (expSign) {
-	fraction /= dblExp;
-    } else {
-	fraction *= dblExp;
-    }
-
-done:
-    if (endPtr != NULL) {
-	*endPtr = (char *) p;
-    }
-
-    if (sign) {
-	return -fraction;
-    }
-    return fraction;
-}
Index: generic/tclExecute.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclExecute.c,v
retrieving revision 1.167.2.9
diff -u -r1.167.2.9 tclExecute.c
--- generic/tclExecute.c	15 Mar 2005 20:23:42 -0000	1.167.2.9
+++ generic/tclExecute.c	7 Apr 2005 19:28:24 -0000
@@ -5183,22 +5183,6 @@
 
 	s = Tcl_GetStringFromObj(opndPtr, &length);
 	p = s;
-	/*
-	 * strtod() isn't at all consistent about detecting Inf and
-	 * NaN between platforms.
-	 */
-	if (length == 3) {
-	    if ((s[0]=='n' || s[0]=='N') && (s[1]=='a' || s[1]=='A') &&
-		    (s[2]=='n' || s[2]=='N')) {
-		msg = "non-numeric floating-point value";
-		goto makeErrorMessage;
-	    }
-	    if ((s[0]=='i' || s[0]=='I') && (s[1]=='n' || s[1]=='N') &&
-		    (s[2]=='f' || s[2]=='F')) {
-		msg = "infinite floating-point value";
-		goto makeErrorMessage;
-	    }
-	}
 
 	/*
 	 * We cannot use TclLooksLikeInt here because it passes strings
@@ -5268,10 +5252,15 @@
 	    double d;
 
 	    if (Tcl_GetDouble((Tcl_Interp *) NULL, s, &d) == TCL_OK) {
-		msg = "floating-point value";
+		if (IS_NAN(d)) {
+		    msg = "non-numeric floating-point value";
+		} else if (IS_INF(d)) {
+		    msg = "infinite floating-point value";
+		} else {
+		    msg = "floating-point value";
+		}
 	    }
 	}
-      makeErrorMessage:
 	Tcl_AppendResult(interp, "can't use ", msg, " as operand of \"",
 		operator, "\"", (char *) NULL);
     }
Index: generic/tclGet.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclGet.c,v
retrieving revision 1.9.2.2
diff -u -r1.9.2.2 tclGet.c
--- generic/tclGet.c	4 Mar 2005 20:43:46 -0000	1.9.2.2
+++ generic/tclGet.c	7 Apr 2005 19:28:24 -0000
@@ -217,7 +217,7 @@
 Tcl_GetDouble(interp, string, doublePtr)
     Tcl_Interp *interp;		/* Interpreter used for error reporting. */
     CONST char *string;		/* String containing a floating-point number
-				 * in a form acceptable to strtod. */
+				 * in a form acceptable to TclStrToD. */
     double *doublePtr;		/* Place to store converted result. */
 {
     CONST char *end;
Index: generic/tclParseExpr.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclParseExpr.c,v
retrieving revision 1.23.2.6
diff -u -r1.23.2.6 tclParseExpr.c
--- generic/tclParseExpr.c	15 Mar 2005 19:41:45 -0000	1.23.2.6
+++ generic/tclParseExpr.c	7 Apr 2005 19:28:25 -0000
@@ -2034,11 +2034,10 @@
  *	of a double.  Only character identity is used, no actual
  *	parsing is done.
  *
- *	The legal bytes are '0' - '9', 'A' - 'F', 'a' - 'f', 
- *	'.', '+', '-', 'i', 'I', 'n', 'N', 'p', 'P', 'x',  and 'X'.
- *	This covers the values "Inf" and "Nan" as well as the
- *	decimal and hexadecimal representations recognized by a
- *	C99-compliant strtod().
+ *	The legal bytes are '0' - '9', 'E', 'e', '.', '+', '-',
+ *	'i', 'I', 'n', 'N', 'f', 'F', 't', 'T',	'y', 'Y', 'a', 'A'.
+ *	This covers the values "Infnity" and "Nan" as well as the
+ *	decimal representations recognized by TclStrToD().
  *
  * Side effects:
  *	None.
@@ -2056,11 +2055,10 @@
     while (p < end) {
 	switch (*p) {
 	    case '0': case '1': case '2': case '3': case '4': case '5':
-	    case '6': case '7': case '8': case '9': case 'A': case 'B':
-	    case 'C': case 'D': case 'E': case 'F': case 'I': case 'N':
-	    case 'P': case 'X': case 'a': case 'b': case 'c': case 'd':
-	    case 'e': case 'f': case 'i': case 'n': case 'p': case 'x':
-	    case '.': case '+': case '-': case '(': case ' ': case ')':
+	    case '6': case '7': case '8': case '9': case 'A': case 'E':
+	    case 'F': case 'I': case 'N': case 'T': case 'Y': case 'a':
+	    case 'e': case 'f': case 'i': case 'n': case 't': case 'y':
+	    case '.': case '+': case '-':
 		p++;
 		break;
 	    default:
Index: unix/configure
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/configure,v
retrieving revision 1.130.2.7
diff -u -r1.130.2.7 configure
--- unix/configure	15 Mar 2005 20:23:55 -0000	1.130.2.7
+++ unix/configure	7 Apr 2005 19:28:28 -0000
@@ -2344,8 +2344,8 @@
 
 #--------------------------------------------------------------------
 # Supply substitutes for missing POSIX header files.  Special notes:
-#	- stdlib.h doesn't define strtol, strtoul, or
-#	  strtod insome versions of SunOS
+#	- stdlib.h doesn't define strtol or strtoul
+#	  in some versions of SunOS
 #	- some versions of string.h don't declare procedures such
 #	  as strstr
 # Do this early, otherwise an autoconf bug throws errors on configure
@@ -12189,7 +12189,7 @@
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-(exit $ac_status )
+( exit $ac_status )
 tcl_cv_strstr_unbroken=broken
 fi
 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -12357,7 +12357,7 @@
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-(exit $ac_status )
+( exit $ac_status )
 tcl_cv_strtoul_unbroken=broken
 fi
 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -12385,362 +12385,6 @@
     fi
 
 #--------------------------------------------------------------------
-#	Check for the strtod function.  This is tricky because in some
-#	versions of Linux strtod mis-parses strings starting with "+".
-#--------------------------------------------------------------------
-
-
-    echo "$as_me:$LINENO: checking for strtod" >&5
-echo $ECHO_N "checking for strtod... $ECHO_C" >&6
-if test "${ac_cv_func_strtod+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define strtod to an innocuous variant, in case <limits.h> declares strtod.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define strtod innocuous_strtod
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef strtod
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char strtod ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-char (*f) () = strtod;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != strtod;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_strtod=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_strtod=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
-echo "${ECHO_T}$ac_cv_func_strtod" >&6
-if test $ac_cv_func_strtod = yes; then
-  tcl_ok=1
-else
-  tcl_ok=0
-fi
-
-    if test "$tcl_ok" = 1; then
-	echo "$as_me:$LINENO: checking proper strtod implementation" >&5
-echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6
-	if test "${tcl_cv_strtod_unbroken+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  tcl_cv_strtod_unbroken=unknown
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-int main() {
-    extern double strtod();
-    char *term, *string = " +69";
-    exit(strtod(string,&term) != 69 || term != string+4);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  tcl_cv_strtod_unbroken=ok
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-(exit $ac_status )
-tcl_cv_strtod_unbroken=broken
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-
-	echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5
-echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6
-	if test "$tcl_cv_strtod_unbroken" = "ok"; then
-	    tcl_ok=1
-	else
-	    tcl_ok=0
-	fi
-    fi
-    if test "$tcl_ok" = 0; then
-	case $LIBOBJS in
-    "strtod.$ac_objext"   | \
-  *" strtod.$ac_objext"   | \
-    "strtod.$ac_objext "* | \
-  *" strtod.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;;
-esac
-
-	USE_COMPAT=1
-    fi
-
-#--------------------------------------------------------------------
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" that corrects the error.
-#--------------------------------------------------------------------
-
-
-    echo "$as_me:$LINENO: checking for strtod" >&5
-echo $ECHO_N "checking for strtod... $ECHO_C" >&6
-if test "${ac_cv_func_strtod+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define strtod to an innocuous variant, in case <limits.h> declares strtod.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define strtod innocuous_strtod
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef strtod
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char strtod ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_strtod) || defined (__stub___strtod)
-choke me
-#else
-char (*f) () = strtod;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != strtod;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_strtod=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_strtod=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
-echo "${ECHO_T}$ac_cv_func_strtod" >&6
-if test $ac_cv_func_strtod = yes; then
-  tcl_strtod=1
-else
-  tcl_strtod=0
-fi
-
-    if test "$tcl_strtod" = 1; then
-	echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5
-echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6
-	if test "${tcl_cv_strtod_buggy+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-	    if test "$cross_compiling" = yes; then
-  tcl_cv_strtod_buggy=0
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-		extern double strtod();
-		int main() {
-		    char *infString="Inf", *nanString="NaN", *spaceString=" ";
-		    char *term;
-		    double value;
-		    value = strtod(infString, &term);
-		    if ((term != infString) && (term[-1] == 0)) {
-			exit(1);
-		    }
-		    value = strtod(nanString, &term);
-		    if ((term != nanString) && (term[-1] == 0)) {
-			exit(1);
-		    }
-		    value = strtod(spaceString, &term);
-		    if (term == (spaceString+1)) {
-			exit(1);
-		    }
-		    exit(0);
-		}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  tcl_cv_strtod_buggy=1
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-tcl_cv_strtod_buggy=0
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-
-	if test "$tcl_cv_strtod_buggy" = 1; then
-	    echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6
-	else
-	    echo "$as_me:$LINENO: result: buggy" >&5
-echo "${ECHO_T}buggy" >&6
-	    case $LIBOBJS in
-    "fixstrtod.$ac_objext"   | \
-  *" fixstrtod.$ac_objext"   | \
-    "fixstrtod.$ac_objext "* | \
-  *" fixstrtod.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;;
-esac
-
-	    USE_COMPAT=1
-
-cat >>confdefs.h <<\_ACEOF
-#define strtod fixstrtod
-_ACEOF
-
-	fi
-    fi
-
-
-#--------------------------------------------------------------------
 #	Check for various typedefs and provide substitutes if
 #	they don't exist.
 #--------------------------------------------------------------------
@@ -13899,7 +13543,7 @@
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-(exit $ac_status )
+( exit $ac_status )
 tcl_cv_putenv_copy=yes
 fi
 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Index: unix/configure.in
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/configure.in,v
retrieving revision 1.123.2.4
diff -u -r1.123.2.4 configure.in
--- unix/configure.in	2 Feb 2005 15:53:59 -0000	1.123.2.4
+++ unix/configure.in	7 Apr 2005 19:28:28 -0000
@@ -49,8 +49,8 @@
 
 #--------------------------------------------------------------------
 # Supply substitutes for missing POSIX header files.  Special notes:
-#	- stdlib.h doesn't define strtol, strtoul, or
-#	  strtod insome versions of SunOS
+#	- stdlib.h doesn't define strtol or strtoul
+#	  in some versions of SunOS
 #	- some versions of string.h don't declare procedures such
 #	  as strstr
 # Do this early, otherwise an autoconf bug throws errors on configure
@@ -230,26 +230,6 @@
 ])
 
 #--------------------------------------------------------------------
-#	Check for the strtod function.  This is tricky because in some
-#	versions of Linux strtod mis-parses strings starting with "+".
-#--------------------------------------------------------------------
-
-SC_TCL_CHECK_BROKEN_FUNC(strtod, [
-    extern double strtod();
-    char *term, *string = " +69";
-    exit(strtod(string,&term) != 69 || term != string+4);
-])
-
-#--------------------------------------------------------------------
-#	Under Solaris 2.4, strtod returns the wrong value for the
-#	terminating character under some conditions.  Check for this
-#	and if the problem exists use a substitute procedure
-#	"fixstrtod" that corrects the error.
-#--------------------------------------------------------------------
-
-SC_BUGGY_STRTOD
-
-#--------------------------------------------------------------------
 #	Check for various typedefs and provide substitutes if
 #	they don't exist.
 #--------------------------------------------------------------------
Index: unix/tclUnixInit.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixInit.c,v
retrieving revision 1.53.2.1
diff -u -r1.53.2.1 tclUnixInit.c
--- unix/tclUnixInit.c	8 Dec 2004 18:24:37 -0000	1.53.2.1
+++ unix/tclUnixInit.c	7 Apr 2005 19:28:29 -0000
@@ -426,15 +426,6 @@
      */
 
     setlocale(LC_CTYPE, "");
-
-    /*
-     * In case the initial locale is not "C", ensure that the numeric
-     * processing is done in "C" locale regardless.  This is needed because
-     * Tcl relies on routines like strtod, but should not have locale
-     * dependent behavior.
-     */
-
-    setlocale(LC_NUMERIC, "C");
 }
 
 /*
Index: unix/tclUnixPort.h
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixPort.h,v
retrieving revision 1.39.2.1
diff -u -r1.39.2.1 tclUnixPort.h
--- unix/tclUnixPort.h	20 Jan 2005 14:53:41 -0000	1.39.2.1
+++ unix/tclUnixPort.h	7 Apr 2005 19:28:29 -0000
@@ -484,18 +484,6 @@
 extern char **environ;
 
 /*
- * At present (12/91) not all stdlib.h implementations declare strtod.
- * The declaration below is here to ensure that it's declared, so that
- * the compiler won't take the default approach of assuming it returns
- * an int.  There's no ANSI prototype for it because there would end
- * up being too many conflicts with slightly-different prototypes.
- */
-
-#ifdef NO_STDLIB_H
-extern double strtod();
-#endif
-
-/*
  * There is no platform-specific panic routine for Unix in the Tcl internals.
  */
 
