+2014-07-12 Eli Zaretskii <eliz@gnu.org>
+
+ * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch
+ stdin to binary mode only if it is connected to a terminal.
+
2014-07-11 Paul Eggert <eggert@cs.ucla.edu>
Coalesce extern decls.
{
emacs_get_tty (fileno (stdin), &etty);
#ifdef WINDOWSNT
- _setmode (fileno (stdin), O_BINARY);
+ if (isatty (fileno (stdin)))
+ _setmode (fileno (stdin), O_BINARY);
#endif
suppress_echo_on_tty (fileno (stdin));
}
fprintf (stdout, "\n");
emacs_set_tty (fileno (stdin), &etty, 0);
#ifdef WINDOWSNT
- _setmode (fileno (stdin), O_TEXT);
+ if (isatty (fileno (stdin)))
+ _setmode (fileno (stdin), O_TEXT);
#endif
}