diff options
| author | Paul Eggert | 2019-07-13 09:39:09 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-07-13 16:53:21 -0700 |
| commit | a8ffbb20da67b20a85ddca38e20c609144c3bef3 (patch) | |
| tree | 3ce64362d7d1a8b14f0a5ea4286ea6af27109de2 /src/sysstdio.h | |
| parent | 3767628dc534e64cdc21bdff16d5dd4726feacd2 (diff) | |
| download | emacs-a8ffbb20da67b20a85ddca38e20c609144c3bef3.tar.gz emacs-a8ffbb20da67b20a85ddca38e20c609144c3bef3.zip | |
Avoid interleaving stderr in a few cases
* src/sysdep.c (buferr): New static var.
(init_standard_fds) [_PC_PIPE_BUF]: Initialize it.
(errstream, errputc, verrprintf, errwrite): New functions.
(close_output_streams): Check buferr status too.
* src/xdisp.c: Include sysstdio.h instead of stdio.h.
(message_to_stderr, vmessage): Use the new functions
to avoid interleaving stderr.
Diffstat (limited to 'src/sysstdio.h')
| -rw-r--r-- | src/sysstdio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sysstdio.h b/src/sysstdio.h index 68ae043fe33..5303e8a15b2 100644 --- a/src/sysstdio.h +++ b/src/sysstdio.h | |||
| @@ -25,6 +25,9 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 25 | #include "unlocked-io.h" | 25 | #include "unlocked-io.h" |
| 26 | 26 | ||
| 27 | extern FILE *emacs_fopen (char const *, char const *); | 27 | extern FILE *emacs_fopen (char const *, char const *); |
| 28 | extern void errputc (int); | ||
| 29 | extern void verrprintf (char const *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0); | ||
| 30 | extern void errwrite (void const *, ptrdiff_t); | ||
| 28 | extern void close_output_streams (void); | 31 | extern void close_output_streams (void); |
| 29 | 32 | ||
| 30 | #if O_BINARY | 33 | #if O_BINARY |