[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoconf: AC_SYS_LARGEFILE documentation misleading

From: Thorsten Glaser
Subject: Re: autoconf: AC_SYS_LARGEFILE documentation misleading
Date: Wed, 25 Jan 2017 20:20:55 +0100 (CET)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

On Wed, 25 Jan 2017, Eric Blake wrote:

> Thanks; that's helpful.  I'm still thinking we may want to iterate on

Yes, of course; you know autoconf much better than I do.

> You're deleting all mention that the macro may modify CC (true, it
> doesn't do it on most platforms, but the code is still there that does
> it for Irix)

Ah, okay. Let’s change that then.

> I also think we can try harder to point out the need for config.h to
> appear first.  How about the following counter-proposal:
> diff --git i/doc/autoconf.texi w/doc/autoconf.texi
> index 55f96a3..2901937 100644
> --- i/doc/autoconf.texi
> +++ w/doc/autoconf.texi
> @@ -8584,9 +8584,10 @@ System Services
>  Arrange for 64-bit file offsets, known as
>  @uref{http://@/www.unix-systems@/.org/@/version2/@/whatsnew/@/lfs20mar.html,
>  large-file support}.  On some hosts, one must use special compiler
> -options to build programs that can access large files.  Define,
> -by calling @code{AC_DEFINE_UNQUOTED},
> address@hidden and @code{_LARGE_FILES} if necessary.
> +options to build programs that can access large files, and this macro
> +modifies the output variable @code{CC} in that case.  This macro will
> +additionally define @code{_FILE_OFFSET_BITS} and @code{_LARGE_FILES} if
> +necessary, by calling @code{AC_DEFINE_UNQUOTED}.

Nice, but I think I can improve on that a bit (later, I’m almost
dropping down due to tiredness), it still confuses me a bit ;)

>  Large-file support can be disabled by configuring with the
>  @option{--disable-largefile} option.
> @@ -8595,7 +8596,9 @@ System Services
>  @code{off_t} is wider than @code{long int}, since this is common when
>  large-file support is enabled.  For example, it is not correct to print
>  an arbitrary @code{off_t} value @code{X} with @code{printf ("%ld",
> -(long int) X)}.
> +(long int) X)}.  Also, when using this macro in concert with
> address@hidden, be sure that @file{config.h} is included
> +before any system header.

Making that explicit is good, yes. Thank you.

On Wed, 25 Jan 2017, Zack Weinberg wrote:

> If we're going to warn people about this in the context of specific
> macros we should do the same for AC_USE_SYSTEM_EXTENSIONS as well.  I

Feel free to… but that’s outside of my scope; I never heard of that
particular macro ;)

tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn •
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]