summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-02-16 18:46:40 +0000
committerAndrew Cagney <cagney@redhat.com>2004-02-16 18:46:40 +0000
commitfccbf63bae3308d62eea60116ee96749ade202ab (patch)
treea165da688b477d2de176756cc3bc8d7aa8cafac2
parentd12156fdeef1b21c5ea693cc80e0a4cfe4d7d777 (diff)
downloadbinutils-redhat-fccbf63bae3308d62eea60116ee96749ade202ab.tar.gz
2004-02-16 Andrew Cagney <cagney@redhat.com>
* bfd-in.h (file_ptr, ufile_ptr): Configure type using @bfd_file_ptr@. * bfd-in2.h: Re-generate.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/bfd-in.h14
-rw-r--r--bfd/bfd-in2.h14
3 files changed, 14 insertions, 20 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0c4caf5726..04e82983c1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-16 Andrew Cagney <cagney@redhat.com>
+
+ * bfd-in.h (file_ptr, ufile_ptr): Configure type using
+ @bfd_file_ptr@.
+ * bfd-in2.h: Re-generate.
+
2004-02-14 Andrew Cagney <cagney@redhat.com>
* configure.host (HDEFINES): When hppa*-*-hpux*, define
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index cf75f63758..30bc844b1b 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -160,16 +160,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);
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index ce809d49d3..74bbccdac4 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -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);