summaryrefslogtreecommitdiff
path: root/bfd/bfd-in2.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-01-22 17:03:44 +0000
committerAndrew Cagney <cagney@redhat.com>2004-01-22 17:03:44 +0000
commit63cf16ad3e07b24e6b4a2d0986bd1cf9ccdc5c32 (patch)
treef3845a144173bb545570084d3bd45ecb18212e89 /bfd/bfd-in2.h
parent73546a3ba36fdab252731bdf8988b91e8eed65d0 (diff)
downloadbinutils-redhat-cagney_bigcore-20040122-branch.tar.gz
Index: bfd/ChangeLogcagney_bigcore-20040122-branch
2004-01-21 Andrew Cagney <cagney@redhat.com> * bfdio.c: Update copyright. Include "bfdio.h". (real_ftell, real_fseek): New functions. (bfd_tell): Use real_ftell, change return-type to file_ptr. (bfd_seek): Use real_ftell and real_fseek. Change type of file_position to a file_ptr. * cache.c: Update copyright. Include "bfdio.h". (close_one): Use real_ftell. (bfd_cache_lookup_worker): Use real_fseek, use ufile_ptr in cast. * bfd-in.h: Update copyright. (file_ptr, ufile_ptr): Specify type using @BFD_FILE_PTR@. (bfd_tell): Make return-type "file_ptr". * bfd-in2.h: Re-generate. * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64, fseeko and fseeko64. * config.in, configure: Re-generate. * libbfd-in.h: Update copyright. (real_ftell, real_fseek): Declare. * libbfd.h: Re-generate. * elf.c (offset_vma_page_alignment): New function. (assign_file_positions_for_segments): Replace broken modulo code with offset_vma_page_alignment. (assign_file_positions_except_relocs): Ditto. Index: gdb/testsuite/ChangeLog 2004-01-22 Andrew Cagney <cagney@redhat.com> * gdb.base/bigcore.exp: New file. * gdb.base/bigcore.c: New file.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r--bfd/bfd-in2.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index f66c29ce23..74bbccdac4 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -8,7 +8,7 @@
/* Main header file for the bfd library -- portable access to object files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -167,16 +167,10 @@ typedef unsigned long bfd_size_type;
#endif /* not BFD64 */
-/* A pointer to a position in a file. */
-/* FIXME: This should be using off_t from <sys/types.h>.
- For now, try to avoid breaking stuff by not including <sys/types.h> here.
- This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
- Probably the best long-term answer is to avoid using file_ptr AND off_t
- in this header file, and to handle this in the BFD implementation
- rather than in its interface. */
-/* typedef off_t file_ptr; */
-typedef bfd_signed_vma file_ptr;
-typedef bfd_vma ufile_ptr;
+/* An offset into a file. BFD always uses the largest possible offset
+ based on the build time availability of fseek, fseeko, or fseeko64. */
+typedef @bfd_file_ptr@ file_ptr;
+typedef unsigned @bfd_file_ptr@ ufile_ptr;
extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
@@ -463,7 +457,7 @@ extern void bfd_hash_traverse
extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
extern int bfd_seek (bfd *, file_ptr, int);
-extern ufile_ptr bfd_tell (bfd *);
+extern file_ptr bfd_tell (bfd *);
extern int bfd_flush (bfd *);
extern int bfd_stat (bfd *, struct stat *);