2017-02-17 Pedro Alves <palves@redhat.com>
+ * bfdio.c (real_ftell): Rename to ...
+ (_bfd_real_ftell): ... this.
+ (real_fseek): Rename to ...
+ (_bfd_real_fseek): ... this.
+ (real_fopen): Rename to ...
+ (_bfd_real_fopen): ... this.
+ * libbfd-in.h (real_ftell): Rename to ...
+ (_bfd_real_ftell): ... this.
+ (real_fseek): Rename to ...
+ (_bfd_real_fseek): ... this.
+ (real_fopen): Rename to ...
+ (_bfd_real_fopen): ... this.
+ * cache.c, dwarf2.c, opncls.c: Adjust all callers.
+ * libbfd.h: Regenerate.
+
+2017-02-17 Pedro Alves <palves@redhat.com>
+
* dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
* libbfd.c (read_unsigned_leb128): Rename to ...
(_bfd_read_unsigned_leb128): ... this.
#endif
file_ptr
-real_ftell (FILE *file)
+_bfd_real_ftell (FILE *file)
{
#if defined (HAVE_FTELLO64)
return ftello64 (file);
}
int
-real_fseek (FILE *file, file_ptr offset, int whence)
+_bfd_real_fseek (FILE *file, file_ptr offset, int whence)
{
#if defined (HAVE_FSEEKO64)
return fseeko64 (file, offset, whence);
}
FILE *
-real_fopen (const char *filename, const char *modes)
+_bfd_real_fopen (const char *filename, const char *modes)
{
#ifdef VMS
char *vms_attr;
return TRUE;
}
- to_kill->where = real_ftell ((FILE *) to_kill->iostream);
+ to_kill->where = _bfd_real_ftell ((FILE *) to_kill->iostream);
return bfd_cache_delete (to_kill);
}
if (bfd_open_file (abfd) == NULL)
;
else if (!(flag & CACHE_NO_SEEK)
- && real_fseek ((FILE *) abfd->iostream, abfd->where, SEEK_SET) != 0
+ && _bfd_real_fseek ((FILE *) abfd->iostream,
+ abfd->where, SEEK_SET) != 0
&& !(flag & CACHE_NO_SEEK_ERROR))
bfd_set_error (bfd_error_system_call);
else
FILE *f = bfd_cache_lookup (abfd, CACHE_NO_OPEN);
if (f == NULL)
return abfd->where;
- return real_ftell (f);
+ return _bfd_real_ftell (f);
}
static int
FILE *f = bfd_cache_lookup (abfd, whence != SEEK_CUR ? CACHE_NO_SEEK : CACHE_NORMAL);
if (f == NULL)
return -1;
- return real_fseek (f, offset, whence);
+ return _bfd_real_fseek (f, offset, whence);
}
/* Note that archive entries don't have streams; they share their parent's.
{
case read_direction:
case no_direction:
- abfd->iostream = real_fopen (abfd->filename, FOPEN_RB);
+ abfd->iostream = _bfd_real_fopen (abfd->filename, FOPEN_RB);
break;
case both_direction:
case write_direction:
if (abfd->opened_once)
{
- abfd->iostream = real_fopen (abfd->filename, FOPEN_RUB);
+ abfd->iostream = _bfd_real_fopen (abfd->filename, FOPEN_RUB);
if (abfd->iostream == NULL)
- abfd->iostream = real_fopen (abfd->filename, FOPEN_WUB);
+ abfd->iostream = _bfd_real_fopen (abfd->filename, FOPEN_WUB);
}
else
{
if (stat (abfd->filename, &s) == 0 && s.st_size != 0)
unlink_if_ordinary (abfd->filename);
#endif
- abfd->iostream = real_fopen (abfd->filename, FOPEN_WUB);
+ abfd->iostream = _bfd_real_fopen (abfd->filename, FOPEN_WUB);
abfd->opened_once = TRUE;
}
break;
abbrev_ptr = stash->dwarf_abbrev_buffer + offset;
abbrev_end = stash->dwarf_abbrev_buffer + stash->dwarf_abbrev_size;
- abbrev_number = safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, FALSE, abbrev_end);
+ abbrev_number = _bfd_safe_read_leb128 (abfd, abbrev_ptr, &bytes_read,
+ FALSE, abbrev_end);
abbrev_ptr += bytes_read;
/* Loop until we reach an abbrev number of 0. */
/* Manipulate a system FILE but using BFD's "file_ptr", rather than
the system "off_t" or "off64_t", as the offset. */
-extern file_ptr real_ftell (FILE *file);
-extern int real_fseek (FILE *file, file_ptr offset, int whence);
-extern FILE *real_fopen (const char *filename, const char *modes);
+extern file_ptr _bfd_real_ftell (FILE *file);
+extern int _bfd_real_fseek (FILE *file, file_ptr offset, int whence);
+extern FILE *_bfd_real_fopen (const char *filename, const char *modes);
/* List of supported target vectors, and the default vector (if
bfd_default_vector[0] is NULL, there is no default). */
/* Manipulate a system FILE but using BFD's "file_ptr", rather than
the system "off_t" or "off64_t", as the offset. */
-extern file_ptr real_ftell (FILE *file);
-extern int real_fseek (FILE *file, file_ptr offset, int whence);
-extern FILE *real_fopen (const char *filename, const char *modes);
+extern file_ptr _bfd_real_ftell (FILE *file);
+extern int _bfd_real_fseek (FILE *file, file_ptr offset, int whence);
+extern FILE *_bfd_real_fopen (const char *filename, const char *modes);
/* List of supported target vectors, and the default vector (if
bfd_default_vector[0] is NULL, there is no default). */
nbfd->iostream = fdopen (fd, mode);
else
#endif
- nbfd->iostream = real_fopen (filename, mode);
+ nbfd->iostream = _bfd_real_fopen (filename, mode);
if (nbfd->iostream == NULL)
{
bfd_set_error (bfd_error_system_call);
BFD_ASSERT (name);
- f = real_fopen (name, FOPEN_RB);
+ f = _bfd_real_fopen (name, FOPEN_RB);
if (f == NULL)
return FALSE;
BFD_ASSERT (name);
- f = real_fopen (name, FOPEN_RB);
+ f = _bfd_real_fopen (name, FOPEN_RB);
if (f == NULL)
return FALSE;
.gnu_debuglink section, we insist upon the user providing us with a
correct-for-section-creation-time path, but this need not conform to
the gdb location algorithm. */
- handle = real_fopen (filename, FOPEN_RB);
+ handle = _bfd_real_fopen (filename, FOPEN_RB);
if (handle == NULL)
{
bfd_set_error (bfd_error_system_call);