aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/Makefile.am2
-rw-r--r--bfd/Makefile.in2
-rw-r--r--bfd/cache.c3
4 files changed, 10 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ccc3c9e..b84bcf0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-02 Jan Beulich <jbeulich@novell.com>
+
+ * 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.
+
2005-03-01 Zack Weinberg <zack@codesourcery.com>
* elf.c (bfd_section_from_shdr <default case>): Call
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 18cb4ff..ae1c62f 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -903,7 +903,7 @@ bfd.lo: bfd.c bfdver.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/elf/external.h
bfdio.lo: bfdio.c $(INCDIR)/filenames.h
bfdwin.lo: bfdwin.c $(INCDIR)/filenames.h
-cache.lo: cache.c $(INCDIR)/filenames.h
+cache.lo: cache.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h
corefile.lo: corefile.c $(INCDIR)/filenames.h
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 7d95597..13b836e 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -1459,7 +1459,7 @@ bfd.lo: bfd.c bfdver.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/elf/external.h
bfdio.lo: bfdio.c $(INCDIR)/filenames.h
bfdwin.lo: bfdwin.c $(INCDIR)/filenames.h
-cache.lo: cache.c $(INCDIR)/filenames.h
+cache.lo: cache.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h
corefile.lo: corefile.c $(INCDIR)/filenames.h
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;