diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-12-15 12:55:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-12-15 12:55:59 (GMT) |
commit | c576cbec93fdeaba19970c8f94a26d68c9cc4454 (patch) | |
tree | 7c4312eacbc921feb888e783a5537487d0b884a3 /win/tclWinPanic.c | |
parent | a69614b432b2cf0d9fdeb9afcff304bad9b9e51e (diff) | |
parent | 556dc3036e36d2449fe4feaece94487adfd745b8 (diff) | |
download | tcl-c576cbec93fdeaba19970c8f94a26d68c9cc4454.zip tcl-c576cbec93fdeaba19970c8f94a26d68c9cc4454.tar.gz tcl-c576cbec93fdeaba19970c8f94a26d68c9cc4454.tar.bz2 |
merge core-8-branch. Fully functioning now, including with the new vc-reform implementation.
Diffstat (limited to 'win/tclWinPanic.c')
-rw-r--r-- | win/tclWinPanic.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/win/tclWinPanic.c b/win/tclWinPanic.c index 5e19cdb..f7d9a72 100644 --- a/win/tclWinPanic.c +++ b/win/tclWinPanic.c @@ -11,8 +11,6 @@ */ #include "tclInt.h" -#ifdef __CYGWIN__ -#endif /* *---------------------------------------------------------------------- * @@ -38,10 +36,8 @@ Tcl_ConsolePanic( va_list argList; WCHAR msgString[TCL_MAX_WARN_LEN]; char buf[TCL_MAX_WARN_LEN * TCL_UTF_MAX]; -#ifndef __CYGWIN__ HANDLE handle = GetStdHandle(STD_ERROR_HANDLE); DWORD dummy; -#endif va_start(argList, format); vsnprintf(buf+3, sizeof(buf)-3, format, argList); @@ -59,19 +55,12 @@ Tcl_ConsolePanic( if (IsDebuggerPresent()) { OutputDebugStringW(msgString); -#ifdef __CYGWIN__ - } else { - buf[0] = 0xEF; buf[1] = 0xBB; buf[2] = 0xBF; /* UTF-8 bom */ - write(2, buf, strlen(buf)); - fsync(2); -#else } else if (_isatty(2)) { WriteConsoleW(handle, msgString, wcslen(msgString), &dummy, 0); } else { buf[0] = 0xEF; buf[1] = 0xBB; buf[2] = 0xBF; /* UTF-8 bom */ - WriteFile(handle, buf, strlen(buf), &dummy, 0); + WriteFile(handle, buf, 3, &dummy, 0); FlushFileBuffers(handle); -#endif } # if defined(__GNUC__) __builtin_trap(); |