aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/ar.c2
-rw-r--r--binutils/objcopy.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 0899afc..16e12d2 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-02 Jan Beulich <jbeulich@novell.com>
+
+ * ar.c (remove_output): Use unlink_if_ordinary instead of unlink.
+ * objcopy.c (copy_file): Likewise.
+ (strip_main): Likewise.
+
2005-03-01 Stig Petter Olsroed <stigpo@users.sourceforge.net>
Nick Clifton <nickc@redhat.com>
diff --git a/binutils/ar.c b/binutils/ar.c
index 05933a1..585b704 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -323,7 +323,7 @@ remove_output (void)
bfd_cache_close (output_bfd);
if (output_file != NULL)
fclose (output_file);
- unlink (output_filename);
+ unlink_if_ordinary (output_filename);
}
}
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index d58e12e..63d5a15 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -1731,7 +1731,7 @@ copy_file (const char *input_filename, const char *output_filename,
if (delete)
{
- unlink (output_filename);
+ unlink_if_ordinary (output_filename);
status = 1;
}
}
@@ -2438,7 +2438,7 @@ strip_main (int argc, char *argv[])
status = hold_status;
}
else
- unlink (tmpname);
+ unlink_if_ordinary (tmpname);
if (output_file == NULL)
free (tmpname);
}