* regenerated files from updating libtool.
[deliverable/binutils-gdb.git] / binutils / arsup.c
index e69281fcfd7198a439e7725a2248cc3e87888f54..0d2b2a5fc3aa57f998566ae3938076a1d6446216 100644 (file)
@@ -1,6 +1,6 @@
 /* arsup.c - Archive support for MRI compatibility
-   Copyright 1992, 1994, 1995, 1996, 1997, 2000, 2002, 2003
-   Free Software Foundation, Inc.
+   Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
+   2004, 2007 Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
 
@@ -16,7 +16,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 
 /* Contributed by Steve Chamberlain
    This file looks after requests from arparse.y, to provide the MRI
    style librarian command syntax + 1 word LIST.  */
 
+#include "sysdep.h"
 #include "bfd.h"
-#include "arsup.h"
 #include "libiberty.h"
-#include "bucomm.h"
 #include "filenames.h"
+#include "bucomm.h"
+#include "arsup.h"
 
 static void map_over_list
   (bfd *, void (*function) (bfd *, bfd *), struct list *);
@@ -38,6 +39,10 @@ static void ar_addlib_doer (bfd *, bfd *);
 
 extern int verbose;
 
+static bfd *obfd;
+static char *real_name;
+static FILE *outfile;
+
 static void
 map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
 {
@@ -86,7 +91,6 @@ map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
 }
 
 
-FILE *outfile;
 
 static void
 ar_directory_doer (bfd *abfd, bfd *ignore ATTRIBUTE_UNUSED)
@@ -141,9 +145,6 @@ maybequit (void)
 }
 
 
-bfd *obfd;
-char *real_name;
-
 void
 ar_open (char *name, int t)
 {
@@ -235,7 +236,7 @@ ar_addlib (char *name, struct list *list)
       if (arch != NULL)
        map_over_list (arch, ar_addlib_doer, list);
 
-      /* Don't close the bfd, since it will make the elements disasppear.  */
+      /* Don't close the bfd, since it will make the elements disappear.  */
     }
 }
 
@@ -333,7 +334,7 @@ ar_save (void)
 
       bfd_close (obfd);
 
-      rename (ofilename, real_name);
+      smart_rename (ofilename, real_name, 0);
       obfd = 0;
       free (ofilename);
     }
@@ -433,7 +434,7 @@ ar_end (void)
 {
   if (obfd)
     {
-      fclose ((FILE *)(obfd->iostream));
+      bfd_cache_close (obfd);
       unlink (bfd_get_filename (obfd));
     }
 }
This page took 0.030216 seconds and 4 git commands to generate.