Re: autoconf: AC_SYS_LARGEFILE documentation misleading

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

 



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},
> -@code{_FILE_OFFSET_BITS} 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
> +@code{AC_CONFIG_HEADERS}, 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 ;)

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
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

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux