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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user