[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in ar (all binutils version)
From: |
Nick Clifton |
Subject: |
Re: Bug in ar (all binutils version) |
Date: |
Thu, 27 Oct 2005 16:38:41 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20041206) |
Hi Mario,
The bug is in arsup.c in function ar_save. The rename instead of smart_rename is
used. The smart_rename function take the operating system into account. This bug
is in all version of the binutils 2.11, 2.13, 2.14 and 2.15 under windows.
Are you sure about the problem existing in 2.15 ?
(Also there is a 2.16 binutils release which is out now, although the
code in arsup.c there is essentially the same as in 2.15).
> File: arsup.c
> #if defined (_WIN32) && !defined (__CYGWIN32__)
> smart_rename (ofilename, real_name, 0);
> #else
> rename (ofilename, real_name);
> #endif
The file binutils/ChangeLog for the 2.15 sources shows:
2004-04-09 Daniel Jacobowitz <address@hidden>
Merge from mainline:
2004-04-07 Benjamin Monate <address@hidden>
PR 86
* arsup.c (ar_save): Use smart_rename.
and the code for the function looks like this:
void
ar_save (void)
{
if (!obfd)
{
fprintf (stderr, _("%s: no open output archive\n"), program_name);
maybequit ();
}
else
{
char *ofilename = xstrdup (bfd_get_filename (obfd));
bfd_close (obfd);
smart_rename (ofilename, real_name, 0);
obfd = 0;
free (ofilename);
}
}
Cheers
Nick