summaryrefslogtreecommitdiff
path: root/binutils/elfcomm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-03-04 14:22:25 +0000
committerNick Clifton <nickc@redhat.com>2013-03-04 14:22:25 +0000
commit2c0423dbe2157f0a39ad4a51382202736df2c728 (patch)
tree4773a77dea5bfe8e38e9400811336885c9f247ae /binutils/elfcomm.c
parentc9e8cb3eb47e9c7097ff2ce825878e19307a3976 (diff)
downloadbinutils-redhat-2c0423dbe2157f0a39ad4a51382202736df2c728.tar.gz
* elfcomm.c (error): Flush stdout before emitting the error
message. (warn): Likewise.
Diffstat (limited to 'binutils/elfcomm.c')
-rw-r--r--binutils/elfcomm.c6
1 files changed, 6 insertions, 0 deletions
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);