summaryrefslogtreecommitdiffstats
path: root/generic/tkMain.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-04-01 17:07:10 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-04-01 17:07:10 (GMT)
commitd81f8f7c49270ddc93b4d639c0e7f77767c4fd47 (patch)
tree64da754277b242dc50862f735d5b4ee523971fa6 /generic/tkMain.c
parente19cf65c7641a093a5c7cf8325c5466e431d7c69 (diff)
parentb8f8082aad49088238582658c22248f9469ad055 (diff)
downloadtk-bug_3607830.zip
tk-bug_3607830.tar.gz
tk-bug_3607830.tar.bz2
Merge 8.5. Bring together the compile time and run time Xkb checks.bug_3607830
Diffstat (limited to 'generic/tkMain.c')
-rw-r--r--generic/tkMain.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 3be7189..8bebb3d 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -132,12 +132,15 @@ Tk_MainEx(
Tcl_DString appName;
/*
- * Ensure that we are getting the matching version of Tcl. This is really
- * only an issue when Tk is loaded dynamically.
+ * Ensure that we are getting a compatible version of Tcl.
*/
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
- abort();
+ if (Tcl_InitStubs(interp, TCL_VERSION ".0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
+ abort();
+ } else {
+ Tcl_Panic("%s", Tcl_GetStringResult(interp));
+ }
}
#if defined(__WIN32__) && !defined(__WIN64__) && !defined(STATIC_BUILD)
@@ -168,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);