aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2021-03-11 10:35:04 -0800
committerPaul Eggert2021-03-11 10:43:33 -0800
commitb8bf62b60a63e4af4be0cfdd7b4e0d4b424af45c (patch)
treeb0536f61178ec53618874bf39f72d4cc49c059e0 /src
parent1d4195856b2e8c45cb678821fca35e94c8eb2bf9 (diff)
downloademacs-b8bf62b60a63e4af4be0cfdd7b4e0d4b424af45c.tar.gz
emacs-b8bf62b60a63e4af4be0cfdd7b4e0d4b424af45c.zip
On MS-Windows, fflush stderr after newline
Problem reported by Ioannis Kappas (Bug#46388). * src/sysdep.c (errputc) [WINDOWSNT]: Flush stderr after newline.
Diffstat (limited to 'src')
-rw-r--r--src/sysdep.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 24d8832b2f3..d940acc4e05 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2670,6 +2670,13 @@ void
2670errputc (int c) 2670errputc (int c)
2671{ 2671{
2672 fputc_unlocked (c, errstream ()); 2672 fputc_unlocked (c, errstream ());
2673
2674#ifdef WINDOWSNT
2675 /* Flush stderr after outputting a newline since stderr is fully
2676 buffered when redirected to a pipe, contrary to POSIX. */
2677 if (c == '\n')
2678 fflush_unlocked (stderr);
2679#endif
2673} 2680}
2674 2681
2675void 2682void