diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-13 10:37:24 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-13 10:37:24 (GMT) |
commit | a9417a5cc8802ec3945cbc12e39ed01724be0067 (patch) | |
tree | 83a004e66e134b8ec0416e8d69277ae94c969bb8 /win | |
parent | 347946d329fcc454775484c08e7764054811c92a (diff) | |
parent | ccfa40c8ce8aca2cfd03317fab6b31cdc3910895 (diff) | |
download | tk-a9417a5cc8802ec3945cbc12e39ed01724be0067.zip tk-a9417a5cc8802ec3945cbc12e39ed01724be0067.tar.gz tk-a9417a5cc8802ec3945cbc12e39ed01724be0067.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.
Remove some old carbon-leftovers from configure/make (see [3607215]).
Diffstat (limited to 'win')
-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 a36ece4..4a327a2 100644 --- a/win/tkWinInit.c +++ b/win/tkWinInit.c @@ -121,6 +121,20 @@ TkpDisplayWarning( WCHAR *msgString; /* points to titleString, just after title, leaving space for ": " */ int len; /* size of title, including terminating NULL */ + /* 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 */ + len = MultiByteToWideChar(CP_UTF8, 0, title, -1, titleString, TK_MAX_WARN_LEN); msgString = &titleString[len + 1]; titleString[TK_MAX_WARN_LEN - 1] = L'\0'; |