* elfcomm.c (error): Flush stdout before emitting the error
authorNick Clifton <nickc@redhat.com>
Mon, 4 Mar 2013 14:22:25 +0000 (14:22 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 4 Mar 2013 14:22:25 +0000 (14:22 +0000)
message.
(warn): Likewise.

binutils/ChangeLog
binutils/elfcomm.c

index d13dd05..364980e 100644 (file)
@@ -1,3 +1,9 @@
+2013-03-04  Nick Clifton  <nickc@redhat.com>
+
+       * elfcomm.c (error): Flush stdout before emitting the error
+       message.
+       (warn): Likewise.
+
 2013-03-01  Cary Coutant  <ccoutant@google.com>
 
        * dwarf.c (cu_tu_indexes_read, shndx_pool, shndx_pool_size)
index 1179a1a..1a1fae9 100644 (file)
@@ -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);