/* 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 Free Software Foundation, Inc.
This file is part of GNU Binutils.
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
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)
{
}
-FILE *outfile;
static void
ar_directory_doer (bfd *abfd, bfd *ignore ATTRIBUTE_UNUSED)
}
-bfd *obfd;
-char *real_name;
-
void
ar_open (char *name, int t)
{
bfd_close (obfd);
- rename (ofilename, real_name);
+ smart_rename (ofilename, real_name, 0);
obfd = 0;
free (ofilename);
}
{
if (obfd)
{
- fclose ((FILE *)(obfd->iostream));
+ bfd_cache_close (obfd);
unlink (bfd_get_filename (obfd));
}
}