From fafd911d9f34471ac85b29643bd47448b9ea238f Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 4 Mar 2013 14:22:25 +0000 Subject: [PATCH] * elfcomm.c (error): Flush stdout before emitting the error message. (warn): Likewise. --- binutils/ChangeLog | 6 ++++++ binutils/elfcomm.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index d13dd05afe..364980e86f 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2013-03-04 Nick Clifton + + * elfcomm.c (error): Flush stdout before emitting the error + message. + (warn): Likewise. + 2013-03-01 Cary Coutant * dwarf.c (cu_tu_indexes_read, shndx_pool, shndx_pool_size) diff --git a/binutils/elfcomm.c b/binutils/elfcomm.c index 1179a1aac5..1a1fae98b9 100644 --- a/binutils/elfcomm.c +++ b/binutils/elfcomm.c @@ -35,6 +35,9 @@ error (const char *message, ...) { va_list args; + /* Try to keep error messages in sync with the program's normal output. */ + fflush (stdout); + va_start (args, message); fprintf (stderr, _("%s: Error: "), program_name); vfprintf (stderr, message, args); @@ -46,6 +49,9 @@ warn (const char *message, ...) { va_list args; + /* Try to keep warning messages in sync with the program's normal output. */ + fflush (stdout); + va_start (args, message); fprintf (stderr, _("%s: Warning: "), program_name); vfprintf (stderr, message, args); -- 2.34.1