* configure.in: Check for fopen64.

* libbfd-in.h (real_fopen): New prototype.
	* configure, config.in, libbfd.h: Regenerated.
	* bfdio.c (real_fopen): New function.
	* opncls.c (bfd_fopen, bfd_fill_in_gnu_debuglink_section): Use it.
	* cache.c (bfd_open_file): Likewise.
This commit is contained in:
Daniel Jacobowitz
2005-11-03 16:06:11 +00:00
parent 6f2942edf0
commit 2e6f4fae07
9 changed files with 150 additions and 233 deletions

View File

@@ -476,15 +476,15 @@ bfd_open_file (bfd *abfd)
{
case read_direction:
case no_direction:
abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_RB);
abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_RB);
break;
case both_direction:
case write_direction:
if (abfd->opened_once)
{
abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_RUB);
abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_RUB);
if (abfd->iostream == NULL)
abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WUB);
abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_WUB);
}
else
{
@@ -514,7 +514,7 @@ bfd_open_file (bfd *abfd)
if (stat (abfd->filename, &s) == 0 && s.st_size != 0)
unlink_if_ordinary (abfd->filename);
#endif
abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WUB);
abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_WUB);
abfd->opened_once = TRUE;
}
break;