Artifacts Associated With Ticket 219309
Ticket change [2f5da41e47] (rid 93051) by nobody on 2000-10-26 05:10:29:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 3401 RFE Version: 8.2.1 SubmitDate: '1999-11-05' LastModified: '2000-02-05' Severity: LOW Status: UnAssn Submitter: techsupp ChangedBy: hobbs OS: Other FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Yu Zhang CVS: last update: 4:30pm, 10/21/99 RCS: @(#) $Id: tclUnixInit.c,v 1.17 1999/07/22 21:50:56 redman Exp DesiredBehavior: For our product, in different configurations, Tcl library path will be different. So it's desirable that TCL_LIBRARY becomes standard Unix path list, i.e. multiple directories split with ":" to support these configurations. Patch: --- tclUnixInit.c Thu Oct 21 16:17:08 1999 *************** *** 238,252 **** str = Tcl_DStringValue(&buffer); if ((str != NULL) && (str[0] != '\0')) { ! /* ! * If TCL_LIBRARY is set, search there. */ ! ! objPtr = Tcl_NewStringObj(str, -1); ! Tcl_ListObjAppendElement(NULL, pathPtr, objPtr); ! Tcl_SplitPath(str, &pathc, &pathv); ! if ((pathc > 0) && (strcasecmp(installLib + 4, pathv[pathc-1]) != 0)) { /* * If TCL_LIBRARY is set but refers to a different tcl * installation than the current version, try fiddling with the --- 238,256 ---- str = Tcl_DStringValue(&buffer); if ((str != NULL) && (str[0] != '\0')) { ! /* ! * If TCL_LIBRARY is set, add every path in TCL_LIBRARY into ! * path list */ ! char *tmp_str, *last; ! tmp_str = strtok_r(str, ":", &last); ! while (tmp_str) { ! objPtr = Tcl_NewStringObj(tmp_str, -1); ! Tcl_ListObjAppendElement(NULL, pathPtr, objPtr); ! ! Tcl_SplitPath(tmp_str, &pathc, &pathv); ! if ((pathc > 0) && (strcasecmp(installLib + 4, pathv[pathc-1]) != 0)) { /* * If TCL_LIBRARY is set but refers to a different tcl * installation than the current version, try fiddling with the *************** *** 255,267 **** * version string. */ ! pathv[pathc - 1] = installLib + 4; ! str = Tcl_JoinPath(pathc, pathv, &ds); ! objPtr = Tcl_NewStringObj(str, Tcl_DStringLength(&ds)); ! Tcl_ListObjAppendElement(NULL, pathPtr, objPtr); ! Tcl_DStringFree(&ds); ! } ! ckfree((char *) pathv); } /* --- 259,274 ---- * version string. */ ! pathv[pathc - 1] = installLib + 4; ! tmp_str = Tcl_JoinPath(pathc, pathv, &ds); ! objPtr = Tcl_NewStringObj(tmp_str, Tcl_DStringLength(&ds)); ! Tcl_ListObjAppendElement(NULL, pathPtr, objPtr); ! Tcl_DStringFree(&ds); ! } ! ckfree((char *) pathv); ! ! tmp_str = strtok_r(NULL, ":", &last); ! } } /* PatchFiles: tclUnixInit.c - foundin initialized to: "obsolete: 8.2.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "61. (unused)"
- title initialized to: "TCL_LIBRARY can not be a standard Unix path list"
- type initialized to: "RFE"
Ticket change [6957dde8d8] (rid 103233) by dgp on 2001-02-08 12:40:29:
- assignee changed to: "dgp"
- subsystem changed to: "38. Init - Library - Autoload"
Ticket change [00be56f256] (rid 119370) by dgp on 2001-04-04 04:51:08:
- subsystem changed to: "38. Init - Library - Autoload"
Ticket change [f96884ebfb] (rid 91705) by dgp on 2001-08-27 08:22:40:
- closedate changed to: "2001-08-27T01:22:40"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 The default Tcl_Init() behavior Tcl is to look for the init.tcl file first in the directory stored in the TCL_LIBRARY environment variable, if any. The purpose is to allow the final end user an opportunity to direct a program that calls Tcl_Init() exactly where to find an appropriate init.tcl file. This is really meant to be used as a last resort, enabling an end user to work around a broken installation of Tcl beyond his power to repair. It's not meant to provide a general-purpose search path facility, like UNIX's PATH variable. If you have a product that needs different values of TCL_LIBRARY for different configurations, then write a shell script wrapper around each configuration, setting TCL_LIBRARY to the appropriate variable. I don't see how having a multi-directory search path in TCL_LIBRARY would help manage the multiple configuration problem, because each configuration would still have the same value of $TCL_LIBRARY, and each would find the first init.tcl file available on that path.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Rejected"
- status changed to: "Closed"
- username: "dgp"