* gdb/generic/tclInitScript.h patch
@ 2001-07-17 10:22 Frank Ch. Eigler
0 siblings, 0 replies; only message in thread
From: Frank Ch. Eigler @ 2001-07-17 10:22 UTC (permalink / raw)
To: sid, insight
Hi -
I'm planning to commit this obvious patch to tcl/generic/tclInitScript.h.
The block of code being modified was recently added, and broke build-tree
testing of sid. It did this by not properly guarding some [file]
operations against errors that are innocent and shouldn't make Tcl_Init
abort.
Thanks to bje for reporting this problem.
2001-07-17 Frank Ch. Eigler <fche@redhat.com>
* generic/tclInitScript.h (initScript): Check that nameofexecutable
is valid (file exists) before traversing it as a possible link.
Index: generic/tclInitScript.h
===================================================================
RCS file: /cvs/src/src/tcl/generic/tclInitScript.h,v
retrieving revision 1.3
diff -u -1 -0 -r1.3 tclInitScript.h
--- tclInitScript.h 2000/06/05 23:07:29 1.3
+++ tclInitScript.h 2001/07/17 17:22:03
@@ -77,21 +77,21 @@
lappend dirs $env(TCL_LIBRARY)\n\
}\n\
# CYGNUS LOCAL: I've changed this alot. \n\
# Basically we only care about two cases,\n\
# if we are installed, and if we are in the devo tree...\n\
# The next few are for if we are installed:\n\
# NB. We also want this to work if the user is actually\n\
# running a link and not the actual program. So look for a\n\
# link and chase it down to its source.\n\
set execName [info nameofexecutable]\n\
- if {[string compare [file type $execName] \"link\"] == 0} {\n\
+ if {[file exists $execName] && [string compare [file type $execName] \"link\"] == 0} {\n\
set execName [file readlink $execName]\n\
if {[string compare [file pathtype $execName] \"relative\"] == 0} {\n\
set execName [file join [pwd] $execName]\n\
}\n\
}\n\
set parentDir [file dirname [file dirname $execName]]\n\
lappend dirs [file join $parentDir share tcl$tcl_version]\n\
lappend dirs [file join $parentDir \"usr\" share tcl$tcl_version]\n\
lappend dirs [file join [file dirname $parentDir] share tcl$tcl_version]\n\
# NOW, let's try to find it in the build tree...\n\
--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7VHRYVZbdDOm/ZT0RAmNpAJ9h4Hj7hg6cpCqnDaAN5++oHt+rQwCfTtm5
dnqHtRLF/dv5noIcp8nNgX4=
=IahV
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-07-17 10:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-17 10:22 gdb/generic/tclInitScript.h patch Frank Ch. Eigler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).