Large files support on FreeBSD
Julien ÉLIE
julien at trigofacile.com
Mon Mar 23 07:25:58 UTC 2009
Hi Johan,
> Note that ac_cv_sys_largefile_source is also defined in autoconf 2.63,
> but the variable that it fails to set is ac_cv_func_fseeko. Could you
> check if autoconf 2.59 does that? Also the 2.59 release is from 2003;
> I doubt if many people still have that installed by default.
Autoconf 2.59 and 2.60:
# AC_FUNC_FSEEKO
# --------------
AN_FUNCTION([ftello], [AC_FUNC_FSEEKO])
AN_FUNCTION([fseeko], [AC_FUNC_FSEEKO])
AC_DEFUN([AC_FUNC_FSEEKO],
[_AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
[ac_cv_sys_largefile_source],
[Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).],
[@%:@include <stdio.h>], [return !fseeko;])
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
# in glibc 2.1.3, but that breaks too many other things.
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
AC_CACHE_CHECK([for fseeko], [ac_cv_func_fseeko],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <stdio.h>],
[[return fseeko && fseeko (stdin, 0, 0);]])],
[ac_cv_func_fseeko=yes],
[ac_cv_func_fseeko=no])])
if test $ac_cv_func_fseeko = yes; then
AC_DEFINE(HAVE_FSEEKO, 1,
[Define to 1 if fseeko (and presumably ftello) exists and is declared.])
fi
])# AC_FUNC_FSEEKO
Autoconf 2.61+:
# AC_FUNC_FSEEKO
# --------------
AN_FUNCTION([ftello], [AC_FUNC_FSEEKO])
AN_FUNCTION([fseeko], [AC_FUNC_FSEEKO])
AC_DEFUN([AC_FUNC_FSEEKO],
[_AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
[ac_cv_sys_largefile_source],
[Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).],
[@%:@include <stdio.h>],
[[return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);]])
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
# in glibc 2.1.3, but that breaks too many other things.
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
if test $ac_cv_sys_largefile_source != unknown; then
AC_DEFINE(HAVE_FSEEKO, 1,
[Define to 1 if fseeko (and presumably ftello) exists and is declared.])
fi
])# AC_FUNC_FSEEKO
> However the configure file is generated before distribution: it doesn't
> really matter what version of autoconf is present on the system of the
> people compiling INN; but only what version of autoconf is present on
> the system building the INN release package.
I believe we then need to require Autoconf 2.61 (from November 2006).
That's great because... the system on which INN snapshots are compiled
uses Autoconf 2.61 (shipped with Debian Etch and also Debian Lenny).
--
Julien ÉLIE
« Il buvait toutes mes paroles, et comme je parlais beaucoup,
à un moment, je le vois qui titubait... » (Raymond Devos)
More information about the inn-workers
mailing list