summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-27 13:07:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-27 13:07:29 (GMT)
commitcb35a015bca66fd1c76097082f0498ef1d007745 (patch)
tree4286860ecfa77057377c770f894b76469765d7fb /generic
parentbe9d4efe7ba6f645e1cd3e8c93dfa13f634eb972 (diff)
downloadtk-cb35a015bca66fd1c76097082f0498ef1d007745.zip
tk-cb35a015bca66fd1c76097082f0498ef1d007745.tar.gz
tk-cb35a015bca66fd1c76097082f0498ef1d007745.tar.bz2
Make compiling/running Tk8.5 against 8.6 headers work on Windows as well.
In dynamic builds, Tcl_FindExecutable should always be taken from the stub table, even though the 8.6 headers tell otherwise. That's why in Tcl 8.6, the Tcl_FindExecutable() call moved from Tk_MainEx to the Tk_Main() macro.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkMain.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 5d58932..cb1fb5e 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -171,6 +171,12 @@ Tk_MainEx(
tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+#if !defined(STATIC_BUILD)
+# undef Tcl_FindExecutable
+# define Tcl_FindExecutable \
+ (tclStubsPtr->tcl_FindExecutable) /* 144 */
+#endif
+
Tcl_FindExecutable(argv[0]);
tsdPtr->interp = interp;
Tcl_Preserve((ClientData) interp);