From: SourceForge.net <no...@so...> - 2008-03-18 17:44:27
|
Bugs item #1914604, was opened at 2008-03-14 15:50 Message generated for change (Comment added) made by andreas_kupries You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1914604&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 38. Package Manager Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Julian Noble (juliannoble) Assigned to: Andreas Kupries (andreas_kupries) Summary: tm.tcl TCLX.y_TM_PATH not portable Initial Comment: Apache allows only letters numbers and the underscore in the names of environment variables. (see http://httpd.apache.org/docs/2.2/env.html) This means TCL8.5_TM_PATH is converted to TCL8_5_TM_PATH in an apache cgi situation for example, and so tcl::tm::list isn't adjusted accordingly. The Apache docs claim this is for 'portability reasons' so perhaps it crops up elsewhere. I got around the issue by adjusting tcl::tm::Defaults in lib/tcl8.5/tm.tcl to check for TCLX_y_TM_PATH if TCLX.h_TM_PATH doesn't exist. proc ::tcl::tm::Defaults {} { global env tcl_platform lassign [split [info tclversion] .] major minor set exe [file normalize [info nameofexecutable]] # Note that we're using [::list], not [list] because [list] means # something other than [::list] in this namespace. roots [::list \ [file dirname [info library]] \ [file join [file dirname [file dirname $exe]] lib] \ ] if {$tcl_platform(platform) eq "windows"} { set sep ";" } else { set sep ":" } for {set n $minor} {$n >= 0} {incr n -1} { set ev TCL${major}.${n}_TM_PATH if {[info exists env($ev)]} { foreach p [split $env($ev) $sep] { path add $p } } else { set ev TCL${major}_${n}_TM_PATH if {[info exists env($ev)]} { foreach p [split $env($ev) $sep] { path add $p } } } } return } ---------------------------------------------------------------------- >Comment By: Andreas Kupries (andreas_kupries) Date: 2008-03-18 10:44 Message: Logged In: YES user_id=75003 Originator: NO Accepted, with changes. Minor: Used a loop to prevent the replication of the 'path add' loop. Changed semantics a bit as well, now always accepting both forms of the environment variable. I.e. TCL_X_y_TM_PATH is accepted even if TCLX.y_TM_PATH exists too, instead of only when it doesn't exist. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1914604&group_id=10894 |