From: Richard Basch Date: Fri, 14 Feb 1997 17:29:25 +0000 (+0000) Subject: com_err.c: Only check if stderr is a tty under Win32; Win16 does not X-Git-Tag: krb5-1.1-beta1~1327 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=10ff64ba31d3feb487e9d8f898be083090516427;p=krb5.git com_err.c: Only check if stderr is a tty under Win32; Win16 does not even declare stderr. (win16/win32) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9864 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/et/com_err.c b/src/util/et/com_err.c index 387458f95..0687827fa 100644 --- a/src/util/et/com_err.c +++ b/src/util/et/com_err.c @@ -99,12 +99,14 @@ void KRB5_CALLCONV default_com_err_proc(ectx, priv, whoami, code, fmt, ap) MacMessageBox(errbuf); #else /* For Windows */ +#ifdef _WIN32 if (_isatty(_fileno(stderr))) { fputs(errbuf, stderr); fputc('\r', stderr); fputc('\n', stderr); fflush(stderr); } else +#endif /* _WIN32 */ MessageBox ((HWND)NULL, errbuf, "Kerberos", MB_ICONEXCLAMATION); #endif }