diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-13 09:33:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-13 09:33:54 (GMT) |
commit | db0e5ed1d1f941564a107ea8ee4f24f4c5af317e (patch) | |
tree | 15173ce606cbedc4ebe4cdff43f2d1d17c417445 /win/tkWinInit.c | |
parent | 5bd9666f77def0216733a3eba0709f51752c2bf0 (diff) | |
download | tk-db0e5ed1d1f941564a107ea8ee4f24f4c5af317e.zip tk-db0e5ed1d1f941564a107ea8ee4f24f4c5af317e.tar.gz tk-db0e5ed1d1f941564a107ea8ee4f24f4c5af317e.tar.bz2 |
Some more fixes for Cygwin32/64 in win32 GUI mode.
Now that this is fully working, eliminate all usage of WISH_BUILD_LIB_SPEC: TK_BUILD_LIB_SPEC can be used everywhere in stead.
Add tk.pc
Diffstat (limited to 'win/tkWinInit.c')
-rw-r--r-- | win/tkWinInit.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/win/tkWinInit.c b/win/tkWinInit.c index 19556dd..31304d3 100644 --- a/win/tkWinInit.c +++ b/win/tkWinInit.c @@ -120,6 +120,20 @@ TkpDisplayWarning( WCHAR msgString[TK_MAX_WARN_LEN + 5]; WCHAR titleString[TK_MAX_WARN_LEN + 1]; + /* If running on Cygwin and we have a stderr channel, use it. */ +#if !defined(STATIC_BUILD) + if (tclStubsPtr->reserved9) { + Tcl_Channel errChannel = Tcl_GetStdChannel(TCL_STDERR); + if (errChannel) { + Tcl_WriteChars(errChannel, title, -1); + Tcl_WriteChars(errChannel, ": ", 2); + Tcl_WriteChars(errChannel, msg, -1); + Tcl_WriteChars(errChannel, "\n", 1); + return; + } + } +#endif /* !STATIC_BUILD */ + MultiByteToWideChar(CP_UTF8, 0, msg, -1, msgString, TK_MAX_WARN_LEN); MultiByteToWideChar(CP_UTF8, 0, title, -1, titleString, TK_MAX_WARN_LEN); /* |