Mercurial > pidgin.yaz
diff pidgin/win32/winpidgin.c @ 20828:db66eb25c389
Fix allocating a console for and friends on Windows Vista. Refs #3392.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 08 Oct 2007 10:55:34 +0000 |
parents | 44b4e8bd759b |
children | 9401a46da958 |
line wrap: on
line diff
--- a/pidgin/win32/winpidgin.c Sun Oct 07 23:40:58 2007 +0000 +++ b/pidgin/win32/winpidgin.c Mon Oct 08 10:55:34 2007 +0000 @@ -545,7 +545,7 @@ if (strstr(lpszCmdLine, "-d") || strstr(lpszCmdLine, "-h") || strstr(lpszCmdLine, "-v")) { /* If stdout hasn't been redirected to a file, alloc a console * (_istty() doesn't work for stuff using the GUI subsystem) */ - if (_fileno(stdout) == -1) { + if (_fileno(stdout) == -1 || _fileno(stdout) == -2) { LPFNATTACHCONSOLE MyAttachConsole = NULL; if ((hmod = GetModuleHandle("kernel32.dll"))) { MyAttachConsole =