summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-08-14 07:24:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-08-14 07:24:35 (GMT)
commit242588ac05e34fe9e841f5621e042027cda93ab5 (patch)
tree9b992ca74f58eb15d3a84eec1caccc5f99599781
parent6920371495fe37fc74dba37feb95dd73745bc451 (diff)
downloadtk-242588ac05e34fe9e841f5621e042027cda93ab5.zip
tk-242588ac05e34fe9e841f5621e042027cda93ab5.tar.gz
tk-242588ac05e34fe9e841f5621e042027cda93ab5.tar.bz2
Minor bug-fix for Cygwin: If compiled for Win32 but running on Cygwin, console shouldn't be initialized, because it is never used.
This should be a runtime check, not a compile-time check.
-rw-r--r--generic/tkMain.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 1b21223..1086eb2 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -236,6 +236,10 @@ Tk_MainEx(
Tcl_Preserve(interp);
#if defined(_WIN32) && !defined(__CYGWIN__)
+#if !defined(STATIC_BUILD)
+ /* If compiled for Win32 but running on Cygwin, don't use console */
+ if (!tclStubsPtr->reserved9)
+#endif
Tk_InitConsoleChannels(interp);
#endif