diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2013-09-30 15:31:33 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2013-09-30 15:31:33 +0000 |
commit | 5e84dd3fe71c6114506ae4f4086f8b0b9834634e (patch) | |
tree | 074017cd6ac3b060749cdef2647a8b2d5047419f | |
parent | b7a667c0971d2fdd5e407f975c671149c231d6b4 (diff) |
Make stderr buffered in einfo(). Speeds up display of error messages
on slower platforms. Idea from espie@, OK espie@ deraadt@ guenther@
-rw-r--r-- | gnu/usr.bin/binutils/ld/ldmisc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/ld/ldmisc.c b/gnu/usr.bin/binutils/ld/ldmisc.c index def598d639a..b4738503c0a 100644 --- a/gnu/usr.bin/binutils/ld/ldmisc.c +++ b/gnu/usr.bin/binutils/ld/ldmisc.c @@ -426,10 +426,14 @@ void einfo (const char *fmt, ...) { va_list arg; + char buf[BUFSIZ]; + setvbuf(stderr, buf, _IOFBF, sizeof(buf)); va_start (arg, fmt); vfinfo (stderr, fmt, arg); va_end (arg); + fflush(stderr); + setvbuf(stderr, NULL, _IONBF, 0); } void |