This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFA] Large corefile support; Was: [wip]
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 11 Feb 2004 17:00:25 -0500
- Subject: Re: [RFA] Large corefile support; Was: [wip]
- References: <400877DC.3040108@redhat.com> <400C8647.9040704@gnu.org>
Back to this. Of the below, I've committed just the configure.in
changes (which means that everthing needed is available but not yet used).
I'll follow up by testing then committing other parts as I show that
they don't break anything ...
Andrew
2004-01-19 Andrew Cagney <cagney@redhat.com>
* 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.
* bfdio.h: New file.
* 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.
2004-02-11 Andrew Cagney <cagney@redhat.com>
* configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
fseeko and fseeko64. Determine bfd_file_ptr.
* configure: Re-generate.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.142
diff -u -r1.142 configure.in
--- configure.in 19 Dec 2003 11:43:53 -0000 1.142
+++ configure.in 11 Feb 2004 21:48:08 -0000
@@ -917,6 +917,31 @@
AC_SUBST(bfd_machines)
AC_SUBST(bfd_default_target_size)
+# Determine the host dependant file_ptr a.k.a. off_t type. In order
+# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
+# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long.
+# Hopefully a reasonable assumption since fseeko et.al. should be
+# upward compatible.
+AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64)
+AC_MSG_CHECKING([file_ptr type])
+bfd_file_ptr="long"
+bfd_ufile_ptr="unsigned long"
+if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
+ AC_COMPILE_CHECK_SIZEOF(off_t)
+ if test "x${ac_cv_sizeof_off_t}" = "x8"; then
+ bfd_file_ptr=BFD_HOST_64_BIT
+ bfd_ufile_ptr=BFD_HOST_U_64_BIT
+ fi
+fi
+if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes; then
+ bfd_file_ptr=BFD_HOST_64_BIT
+ bfd_ufile_ptr=BFD_HOST_U_64_BIT
+fi
+AC_MSG_RESULT($bfd_file_ptr)
+AC_SUBST(bfd_file_ptr)
+AC_SUBST(bfd_ufile_ptr)
+
+
tdefaults=""
test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"