* cache.c (cache_bread): Set bfd_error_file_truncated if EOF
[deliverable/binutils-gdb.git] / bfd / vms-misc.c
index 1492f146ff0e5316713f8716dca6c19e362a1ba1..98fbb0e299719c3217506f42cd10e1f549e718d5 100644 (file)
@@ -691,12 +691,17 @@ _bfd_vms_output_flush (bfd * abfd)
 
   if (PRIV (push_level) == 0)
     {
+      if (0
 #ifndef VMS
-       /* Write length first, see FF_FOREIGN in the input routines.  */
-      fwrite (PRIV (output_buf) + 2, 2, 1, (FILE *) abfd->iostream);
-#endif
-      fwrite (PRIV (output_buf), (size_t) real_size, 1,
-             (FILE *) abfd->iostream);
+         /* Write length first, see FF_FOREIGN in the input routines.  */
+         || fwrite (PRIV (output_buf) + 2, 2, 1,
+                    (FILE *) abfd->iostream) != 1
+#endif
+         || (real_size != 0
+             && fwrite (PRIV (output_buf), (size_t) real_size, 1,
+                        (FILE *) abfd->iostream) != 1))
+       /* FIXME: Return error status.  */
+       abort ();
 
       PRIV (output_size) = 0;
     }
This page took 0.023517 seconds and 4 git commands to generate.