Large files support on FreeBSD
Johan van Selst
johans at stack.nl
Sun Mar 22 10:40:33 UTC 2009
Russ Allbery wrote:
> Julien ÉLIE <julien at trigofacile.com> writes:
> > "gdb makedbz makedbz.core" show this line of lib/ftello.c file:
<snip>
> This code is all an attempt to provide fseeko and ftello on BSD systems,
> where neither of those functions were provided but fpos_t was an off_t and
> hence they could be emulated by using fsetpos() and fgetpos().
But fseeko and ftello have been in FreeBSD for almost 10 years now
(since 3.2, and definately in 6.2). So there shouldn't be a reason to
use INN's alternative function here. Could it be that a configure check
fails?
The relevant part of the configure script seems to be:
dnl Probe for fseeko and ftello, which take off_t instead of int.
if test x"$inn_enable_largefiles" = xyes ; then
AC_FUNC_FSEEKO
if test x"$ac_cv_func_fseeko" != xyes ; then
INN_TYPE_FPOS_T_LARGE
AC_CHECK_DECLS([fseeko, ftello])
AC_LIBOBJ([fseeko])
AC_LIBOBJ([ftello])
fi
else
AC_CHECK_DECLS([fseeko])
fi
But AC_FUNC_FSEEKO never sets $ac_cv_func_fseeko(!), even if fseeko
is defined (it does define HAVE_FSEEKO, but doesn't seem to set any
useful shellvariable). So the first check, AC_CHECK_DECLS([fseeko,
ftello]) will always be executed. The result of this isn't checked
either. Consequently inn will always use its own version of fseeko and
ftello, even if the operating system defines other alternatives.
I guess this configure check should be rewritten. Possibly so that
AC_LIBOBJ is only called here when AC_CHECK_DECLS fails - that is,
if $ac_cv_have_decl_fseeko isn't set.
Johan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/inn-workers/attachments/20090322/3ab0835f/attachment.bin>
More information about the inn-workers
mailing list