From bb14f524002c5b0e93c17e929109f4c735f11f5b Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 2 Mar 2005 09:03:58 +0000 Subject: bfd/ 2005-03-02 Jan Beulich * Makefile.am: Add dependency of cache.o on libiberty.h. * cache.c: Include libiberty.h. (bfd_open_file): Use unlink_if_ordinary instead of unlink. binutils/ 2005-03-02 Jan Beulich * ar.c (remove_output): Use unlink_if_ordinary instead of unlink. * objcopy.c (copy_file): Likewise. (strip_main): Likewise. gas/ 2005-03-02 Jan Beulich * as.c (main): Use unlink_if_ordinary instead of unlink. * messages.c (as_fatal): Likewise. ld/ 2005-03-02 Jan Beulich * ldmain.c (remove_output): Use unlink_if_ordinary instead of unlink. * pe-dll.c (pe_dll_generate_implib): Likewise. --- bfd/cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bfd/cache.c') diff --git a/bfd/cache.c b/bfd/cache.c index 0d6529b..1146b5b 100644 --- a/bfd/cache.c +++ b/bfd/cache.c @@ -41,6 +41,7 @@ SECTION #include "bfd.h" #include "sysdep.h" #include "libbfd.h" +#include "libiberty.h" static bfd_boolean bfd_cache_delete (bfd *); @@ -436,7 +437,7 @@ bfd_open_file (bfd *abfd) struct stat s; if (stat (abfd->filename, &s) == 0 && s.st_size != 0) - unlink (abfd->filename); + unlink_if_ordinary (abfd->filename); #endif abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WUB); abfd->opened_once = TRUE; -- cgit v1.1