./configure and large file support

Heath Kehoe hakehoe at avalon.net
Thu Jan 6 04:56:35 UTC 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Jan 5, 2005, at 18:25, Russ Allbery wrote:

> Russ Allbery <rra at stanford.edu> writes:
>> Russ Allbery <rra at stanford.edu> writes:
>
>>> Hm.  Maybe we have to use AC_FUNC_FSEEKO instead?  It also defines
>>> _LARGEFILE_SOURCE, which otherwise isn't necessary.
>
>> I'm committing something now that I think will fix this; give it a 
>> shot
>> and let me know if it works.
>
> Hurm, no, we can't use AC_FUNC_FSEEKO because it always enables large 
> file
> compilation.  Bleh.  Okay, what I'm going to do is only probe for 
> fseeko
> and ftello when we're building with large file support, and otherwise 
> just
> #define fseeko to fseek.  That should always work.  Will commit in a
> moment.
>

That looks like it'll work.  I was half right about the needed defines: 
HP/UX does not declare fseeko/ftello in its headers unless 
_LARGEFILE_SOURCE is defined.  Since _LARGEFILE_SOURCE is not otherwise 
required for largefile support, it wasn't getting set by autoconf's 
AC_SYS_LARGEFILE.

But autoconf's AC_FUNC_FSEEKO does test if _LARGEFILE_SOURCE is needed 
to get at fseeko.

Results on the HP/UX box using your latest changes:

[inn-current]# egrep 'FSEEKO|LARGEFILE' include/config.h
#define DO_LARGEFILES 1
/* #undef HAVE_DECL_FSEEKO */
#define HAVE_FSEEKO 1
#define _LARGEFILE_SOURCE 1

On a Linux box (glibc 2.3.3):

[inn-current]# egrep 'FSEEKO|LARGEFILE' include/config.h
#define DO_LARGEFILES 1
/* #undef HAVE_DECL_FSEEKO */
#define HAVE_FSEEKO 1
/* #undef _LARGEFILE_SOURCE */
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFB3MUH4uXPAG0A1J4RAvbcAJ0aS50LOx2HAAzHCsG+LejKnUVJogCfSRAN
Q9iKdUYxEU8vgrESLRfZj7w=
=Sofp
-----END PGP SIGNATURE-----



More information about the inn-workers mailing list