diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-02-11 22:01:00 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-02-11 22:01:00 +0000 |
commit | 1012372a47e4ca5a02b255b13553d0c288facff9 (patch) | |
tree | 78f5089eae2ea813a095a711be6879cf6c34e3f3 /bfd/configure.in | |
parent | 6de918a6f50f6f9dbc8ae3628dcee80d0f8e2f64 (diff) | |
download | gdb-1012372a47e4ca5a02b255b13553d0c288facff9.zip gdb-1012372a47e4ca5a02b255b13553d0c288facff9.tar.gz gdb-1012372a47e4ca5a02b255b13553d0c288facff9.tar.bz2 |
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.
Diffstat (limited to 'bfd/configure.in')
-rw-r--r-- | bfd/configure.in | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bfd/configure.in b/bfd/configure.in index 760bfe3..72f4580 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -917,6 +917,31 @@ AC_SUBST(bfd_backends) 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}'" |