autoconf: AC_SYS_LARGEFILE documentation misleading

2017-01-25 Thread Thorsten Glaser
found 158969 2.69-10 thanks Hi *, I have to reopen this because the documentation is plain wrong and misleading still: -- Macro: AC_SYS_LARGEFILE Arrange for 64-bit file offsets, known as large-file support (http://www.unix-systems.org/version2/whatsnew/lfs20mar.html). On some h

autoconf: AC_SYS_LARGEFILE should output to CPPFLAGS

2017-01-25 Thread Thorsten Glaser
On Wed, 25 Jan 2017, Thorsten Glaser wrote: > Looking at the source, AC_SYS_LARGEFILE calls AC_DEFINE_UNQUOTED, > which appends to DEFS (which I agree with Tom Dickey is wrong) as > Florian Weimer said, but — even more confusingly — only when > AC_CONFIG_HEADERS is not used. > > If AC_CONFIG_HEAD

Re: autoconf: AC_SYS_LARGEFILE documentation misleading

2017-01-25 Thread Eric Blake
On 01/25/2017 10:45 AM, Thorsten Glaser wrote: > > This is even more unfortunate, because now, if any program includes > a glibc system header before "config.h", the definition will be > ignored, because it comes too late. This is wrong. The manual clearly states that config.h MUST be included pr

Re: autoconf: AC_SYS_LARGEFILE should output to CPPFLAGS

2017-01-25 Thread Eric Blake
On 01/25/2017 10:57 AM, Thorsten Glaser wrote: > On Wed, 25 Jan 2017, Thorsten Glaser wrote: > >> Looking at the source, AC_SYS_LARGEFILE calls AC_DEFINE_UNQUOTED, >> which appends to DEFS (which I agree with Tom Dickey is wrong) as >> Florian Weimer said, but — even more confusingly — only when >

Re: autoconf: AC_SYS_LARGEFILE should output to CPPFLAGS

2017-01-25 Thread Thorsten Glaser
severity 852617 wishlist tags 852617 = upstream thanks On Wed, 25 Jan 2017, Eric Blake wrote: > If the real-world package is not including config.h first, then that is > a bug in the real-world package that should be fixed there. Autoconf OK, I’ve (separately) reported the bug to xrdp upstream.

Re: autoconf: AC_SYS_LARGEFILE documentation misleading

2017-01-25 Thread Thorsten Glaser
On Wed, 25 Jan 2017, Eric Blake wrote: > Please propose a patch to the documentation, rather than just telling me > that it is wrong, so that we have a concrete proposal for a wording > improvement that we can discuss. Oh okay, I’ll cater for lazy upstreams this time ;-) See the attached git form

Re: autoconf: AC_SYS_LARGEFILE should output to CPPFLAGS

2017-01-25 Thread Zack Weinberg
On Wed, Jan 25, 2017 at 12:21 PM, Thorsten Glaser wrote: > > Would you at least *consider* moving the definition back to some > command line argument? (Changing severity to wishlist now; if not, > we can likely close the bug, but I’d still like you to please at > least consider doing the change.)

Re: autoconf: AC_SYS_LARGEFILE should output to CPPFLAGS

2017-01-25 Thread Thorsten Glaser
On Wed, 25 Jan 2017, Zack Weinberg wrote: > As far as I can tell from the Git history, AC_SYS_LARGEFILE has > *always* used AC_DEFINE_UNQUOTED to define the various preprocessor > macros that it can define (_FILE_OFFSET_BITS, _LARGE_FILES, and > _DARWIN_USE_64_BIT_INODE). Interesting, as I recall

Re: autoconf: AC_SYS_LARGEFILE should output to CPPFLAGS

2017-01-25 Thread Zack Weinberg
On Wed, Jan 25, 2017 at 1:02 PM, Thorsten Glaser wrote: > On Wed, 25 Jan 2017, Zack Weinberg wrote: > >> As far as I can tell from the Git history, AC_SYS_LARGEFILE has >> *always* used AC_DEFINE_UNQUOTED to define the various preprocessor >> macros that it can define (_FILE_OFFSET_BITS, _LARGE_FI

Re: autoconf: AC_SYS_LARGEFILE should output to CPPFLAGS

2017-01-25 Thread Paul Eggert
On 01/25/2017 10:24 AM, Zack Weinberg wrote: The ChangeLog entry for the addition says "Import AC_SYS_LARGEFILE from largefile.m4 serial 12", so that sounds like there was an add-on .m4 file with the same functionality floating around prior to that - I don't know where to find copies of that file

Re: autoconf: AC_SYS_LARGEFILE documentation misleading

2017-01-25 Thread Eric Blake
On 01/25/2017 11:30 AM, Thorsten Glaser wrote: > On Wed, 25 Jan 2017, Eric Blake wrote: > >> Please propose a patch to the documentation, rather than just telling me >> that it is wrong, so that we have a concrete proposal for a wording >> improvement that we can discuss. > Oh okay, I’ll cater for

Re: autoconf: AC_SYS_LARGEFILE documentation misleading

2017-01-25 Thread Zack Weinberg
On Wed, Jan 25, 2017 at 2:06 PM, Eric Blake wrote: > > I also think we can try harder to point out the need for config.h to > appear first. How about the following counter-proposal: ... If we're going to warn people about this in the context of specific macros we should do the same for AC_USE_SY

Re: autoconf: AC_SYS_LARGEFILE documentation misleading

2017-01-25 Thread Thorsten Glaser
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 th

Re: autoconf: AC_SYS_LARGEFILE should output to CPPFLAGS

2017-01-25 Thread Thorsten Glaser
On Wed, 25 Jan 2017, Zack Weinberg wrote: > > Interesting, as I recall seeing -D_FILE_OFFSET_BITS=64 on various > > compiler command lines when working under GNU. (I normally work > > under BSD at home, so I don’t know where exactly.) > > Is it possible that those programs were not using a config