1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-05 07:01:11 -08:00

On MS-Windows, fflush stderr after newline

Problem reported by Ioannis Kappas (Bug#46388).
* src/sysdep.c (errputc) [WINDOWSNT]: Flush stderr after newline.
This commit is contained in:
Paul Eggert 2021-03-11 10:35:04 -08:00
parent 1d4195856b
commit b8bf62b60a

View file

@ -2670,6 +2670,13 @@ void
errputc (int c)
{
fputc_unlocked (c, errstream ());
#ifdef WINDOWSNT
/* Flush stderr after outputting a newline since stderr is fully
buffered when redirected to a pipe, contrary to POSIX. */
if (c == '\n')
fflush_unlocked (stderr);
#endif
}
void