summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-11-06 21:47:32 (GMT)
committerhobbs <hobbs>2003-11-06 21:47:32 (GMT)
commitc5930f8386355d42d6789a95167916d37b975b72 (patch)
tree61adbb86f2d01f14f4551306fe662ff3541dedef
parent3361d6ad5280072793769743494feecf91d1c3fc (diff)
downloadtcl-c5930f8386355d42d6789a95167916d37b975b72.zip
tcl-c5930f8386355d42d6789a95167916d37b975b72.tar.gz
tcl-c5930f8386355d42d6789a95167916d37b975b72.tar.bz2
* tests/unixInit.test (unixInit-2.10): mark as knownBug
* generic/tclEncoding.c (TclFindEncodings): revert patch from 2003-11-05. It wasn't valid in the sensitive startup init phase and broke Windows from working at all.
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclEncoding.c20
-rw-r--r--tests/unixInit.test8
3 files changed, 18 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index c650222..1fe8fa3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-11-06 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * tests/unixInit.test (unixInit-2.10): mark as knownBug
+ * generic/tclEncoding.c (TclFindEncodings): revert patch from
+ 2003-11-05. It wasn't valid in the sensitive startup init phase
+ and broke Windows from working at all.
+
2003-11-07 Daniel Steffen <das@users.sourceforge.net>
* macosx/Makefile: optimized builds define NDEBUG to turn off
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 87f4669..7f27ab8 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.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: tclEncoding.c,v 1.16.2.1 2003/11/05 20:52:39 dgp Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.16.2.2 2003/11/06 21:47:33 hobbs Exp $
*/
#include "tclInt.h"
@@ -2801,7 +2801,6 @@ unilen(src)
}
return (char *) p - src;
}
-
/*
*-------------------------------------------------------------------------
@@ -2827,9 +2826,6 @@ TclFindEncodings(argv0)
CONST char *argv0; /* Name of executable from argv[0] to main()
* in native multi-byte encoding. */
{
- Tcl_Obj *pathPtr, *normPtr;
- Tcl_DString libPath, buffer;
-
if (encodingsInitialized == 0) {
/*
* Double check inside the mutex. There may be calls
@@ -2838,6 +2834,10 @@ TclFindEncodings(argv0)
TclpInitLock();
if (encodingsInitialized == 0) {
+ char *native;
+ Tcl_Obj *pathPtr;
+ Tcl_DString libPath, buffer;
+
/*
* Have to set this bit here to avoid deadlock with the
* routines below us that call into TclInitSubsystems.
@@ -2845,13 +2845,8 @@ TclFindEncodings(argv0)
encodingsInitialized = 1;
- pathPtr = Tcl_NewStringObj(TclpFindExecutable(argv0), -1);
- Tcl_IncrRefCount(pathPtr);
- normPtr = Tcl_FSGetNormalizedPath(NULL, pathPtr);
- Tcl_IncrRefCount(normPtr);
- Tcl_DecrRefCount(pathPtr);
- TclpInitLibraryPath(Tcl_GetString(normPtr));
- Tcl_DecrRefCount(normPtr);
+ native = TclpFindExecutable(argv0);
+ TclpInitLibraryPath(native);
/*
* The library path was set in the TclpInitLibraryPath routine.
@@ -2885,4 +2880,3 @@ TclFindEncodings(argv0)
TclpInitUnlock();
}
}
-
diff --git a/tests/unixInit.test b/tests/unixInit.test
index 4c1b37e..cf2b1b2 100644
--- a/tests/unixInit.test
+++ b/tests/unixInit.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: unixInit.test,v 1.30.2.1 2003/11/05 20:52:39 dgp Exp $
+# RCS: @(#) $Id: unixInit.test,v 1.30.2.2 2003/11/06 21:47:33 hobbs Exp $
package require tcltest 2
namespace import -force ::tcltest::*
@@ -268,7 +268,7 @@ test unixInit-2.9 {TclpInitLibraryPath: paths relative to executable} {unix noSp
/tmp/library /library /tcl[info patchlevel]/library]
test unixInit-2.10 {TclpInitLibraryPath: executable relative} -constraints {
- unixOnly stdio
+ unixOnly stdio knownBug
} -setup {
set tmpDir [makeDirectory tmp]
set sparklyDir [makeDirectory sparkly $tmpDir]
@@ -281,6 +281,7 @@ test unixInit-2.10 {TclpInitLibraryPath: executable relative} -constraints {
cd $libDir
} -body {
# Checking for Bug 832657
+ # The proposed patch in TclFindEncodings was not correct x-platform.
lrange [getlibpath [file join .. bin tcltest]] 2 3
} -cleanup {
cd $saveDir
@@ -337,7 +338,7 @@ test unixInit-3.2 {TclpSetInitialEncodings} {unixOnly stdio} {
}
expr {[lsearch -exact $validEncodings $enc] < 0}
} 0
-
+
test unixInit-4.1 {TclpSetVariables} {unixOnly} {
# just make sure they exist
@@ -361,4 +362,3 @@ catch {unset env(LANG)}
catch {set env(LANG) $oldlang}
::tcltest::cleanupTests
return
-