+1999-09-12  Donn Terry  <donn@interix.com>
+
+       * ar.c (output_filename): Make const.
+       (open_inarch): If creating a new empty archive, set
+       output_filename.
+
 1999-09-12  Ian Lance Taylor  <ian@zembu.com>
 
        * ar.c (full_pathname): New static variable.
 
 
 /* Remove any output file.  This is only called via xatexit.  */
 
-static char *output_filename = NULL;
+static const char *output_filename = NULL;
 static FILE *output_file = NULL;
 static bfd *output_bfd = NULL;
 
          || ! bfd_set_format (arch, bfd_archive)
          || ! bfd_close (arch))
        bfd_fatal (archive_filename);
+
+      /* If we die creating a new archive, don't leave it around.  */
+      output_filename = archive_filename;
     }
 
   arch = bfd_openr (archive_filename, target);