This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
get ecosconfig to work with cygwin tcl 8.4
- From: Bart Veer <bartv at ecoscentric dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Tue, 11 Feb 2003 22:48:11 +0000 (GMT)
- Subject: get ecosconfig to work with cygwin tcl 8.4
There appears to have been a recent change to Tcl. Previously the call
to Tcl_FindExecutable() was optional. Now it is required, otherwise
Tcl does not get properly initialized and on NT/W2K/XP ecosconfig
ended up indirecting through a NULL function pointer. I don't much
like this change - application code like ecosconfig should not have to
know about libcdl implementation details such as the use of tcl.
However there is no easy way for libcdl to access argv[0], so the
issue has to be addressed at the application level rather than inside
libcdl.
Bart
2003-02-11 Bart Veer <bartv@ecoscentric.com>
* ecosconfig.cxx:
With tcl 8.4 on a windows platform it is now necessary to call
Tcl_FindExecutable(). Otherwise Tcl does not get properly
initialized, and can end up indirecting through a NULL function
pointer.
Index: ecosconfig.cxx
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/common/ecosconfig.cxx,v
retrieving revision 1.9
diff -u -u -r1.9 ecosconfig.cxx
--- ecosconfig.cxx 20 May 2002 22:19:28 -0000 1.9
+++ ecosconfig.cxx 11 Feb 2003 22:44:39 -0000
@@ -93,7 +94,9 @@
bool help = false; // --help
bool enable_debug_set = false; // --enable-debug or --disable-debug
int debug_level = 0; // --enable-debug=[0|1|2]
-
+
+ Tcl_FindExecutable(argv[0]);
+
// getopt() cannot easily be used here since this code has to
// build with VC++ as well.
bool args_ok = true;