+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
$(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
$(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
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
+#include "libiberty.h"
static bfd_boolean bfd_cache_delete (bfd *);
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;
+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>
bfd_cache_close (output_bfd);
if (output_file != NULL)
fclose (output_file);
- unlink (output_filename);
+ unlink_if_ordinary (output_filename);
}
}
if (delete)
{
- unlink (output_filename);
+ unlink_if_ordinary (output_filename);
status = 1;
}
}
status = hold_status;
}
else
- unlink (tmpname);
+ unlink_if_ordinary (tmpname);
if (output_file == NULL)
free (tmpname);
}
+2005-03-02 Jan Beulich <jbeulich@novell.com>
+
+ * as.c (main): Use unlink_if_ordinary instead of unlink.
+ * messages.c (as_fatal): Likewise.
+
2005-03-02 Jan Beulich <jbeulich@novell.com>
* config/tc-i386.c (build_modrm_byte): Add lock prefix for cr8...15
keep_it = 0;
if (!keep_it)
- unlink (out_file_name);
+ unlink_if_ordinary (out_file_name);
input_scrub_end ();
/* Delete the output file, if it exists. This will prevent make from
thinking that a file was created and hence does not need rebuilding. */
if (out_file_name != NULL)
- unlink (out_file_name);
+ unlink_if_ordinary (out_file_name);
xexit (EXIT_FAILURE);
}
#else
+2005-03-02 Jan Beulich <jbeulich@novell.com>
+
+ * ldmain.c (remove_output): Use unlink_if_ordinary instead of unlink.
+ * pe-dll.c (pe_dll_generate_implib): Likewise.
+
2005-02-24 Ben Elliston <bje@au.ibm.com>
* ldfile.c: Remove GNU960 conditional code.
if (output_bfd)
bfd_cache_close (output_bfd);
if (delete_output_file_on_failure)
- unlink (output_filename);
+ unlink_if_ordinary (output_filename);
}
}
if (!ISALNUM (dll_symname[i]))
dll_symname[i] = '_';
- unlink (impfilename);
+ unlink_if_ordinary (impfilename);
outarch = bfd_openw (impfilename, 0);