summaryrefslogtreecommitdiffstats
path: root/generic/tkMain.c
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2012-06-08 21:22:17 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2012-06-08 21:22:17 (GMT)
commit5218de7e5acbeb0e7b0b11e2ce34cc38b2cdc697 (patch)
tree310a9dbc7cc3e084b145ba3775dfb36cf198c278 /generic/tkMain.c
parent8b093febb9b8bbe63829eea5897d8d2fa4788d18 (diff)
parent1b8904bf019505c0ed383c7e0dc0c14772c316ab (diff)
downloadtk-5218de7e5acbeb0e7b0b11e2ce34cc38b2cdc697.zip
tk-5218de7e5acbeb0e7b0b11e2ce34cc38b2cdc697.tar.gz
tk-5218de7e5acbeb0e7b0b11e2ce34cc38b2cdc697.tar.bz2
Implement TkCygwinMainEx for loading Cygwin's Tk_MainEx from the Tk dll
Diffstat (limited to 'generic/tkMain.c')
-rw-r--r--generic/tkMain.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/generic/tkMain.c b/generic/tkMain.c
index c6d5238..99caf27 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -139,15 +139,20 @@ Tk_MainEx(
abort();
}
-#if defined(__WIN32__) && !defined(STATIC_BUILD)
+#if defined(__WIN32__) && !defined(__WIN64__) && !defined(STATIC_BUILD)
+ extern int TkCygwinMainEx(int, char **, Tcl_AppInitProc *, Tcl_Interp *);
+
if (tclStubsPtr->reserved9) {
/* We are running win32 Tk under Cygwin, so let's check
* whether the env("DISPLAY") variable or the -display
* argument is set. If so, we really want to run the
- * Tk_MainEx function of libtk.dll, not this one. */
- if (Tcl_GetVar2(interp, "env", "DISPLAY", TCL_GLOBAL_ONLY)) {
+ * Tk_MainEx function of libtk8.?.dll, not this one. */
+ if (Tcl_GetVar2(interp, "env", "DISPLAY", TCL_GLOBAL_ONLY)) {
loadCygwinTk:
- Tcl_Panic("Should load libtk.dll now, not yet implemented");
+ if (TkCygwinMainEx(argc, argv, appInitProc, interp)) {
+ /* Should never reach here. */
+ return;
+ }
} else {
int i;