Re: AC_SYS_LARGEFILE

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

 



Paul Eggert (2023/09/18 13:46 -0700):
> On 2023-09-18 02:55, Sébastien Hinderer wrote:
> > the project currently has the convention of including
> > system headers before its ocnfiguraiotn headers
>
> Ouch. The Autoconf manual explicitly says "The package should ‘#include’ the
> configuration header file before any other header files"
> <https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/html_node/Configuration-Headers.html>

Many thanks for the sourced response!

> so your project's convention is not supported.

That's sad andprobably partly also my responsibility because I was the
person in charge of moving from a hand-qritten configure script to one
generated from Autoconf and, at the time, I was a completely newbie to
these things and the task was so overwhelming that I didn't pay
attention enough to this aspect. For sure, we woudlbe in a better
situation today regarding this if I had raised the point at that time.
I'll still investigate to see whether there is something that can still
be done to change this convention.

> > One option I am ocnsidering is to use themacro to determine wether the
> > macro needs to be defined and then use its result to determine whether
> > -D_FILE_OFFSET_BITS=64 should be addeed to the command-line or not.
>
> Something like that should be a workaround, yes. However, you'll likely need
> to add -D options for more than just _FILE_OFFSET_BITS.

You are perfectly correct! Many thanks for having raised that. I was
pretty sure we were not using this in other places, but I was also
perfectly wrong.



> I suggest looking
> also into the macros _LARGEFILE_SOURCE, _TIME_BITS, _LARGE_FILES, and
> __MINGW_USE_VC2005_COMPAT, depending on which platforms you're trying to
> port to.

I will look into those, too. Thanks.

> Also, if you're using any other Autoconf macros you may need to do something
> similar. Pretty much any 'undef _*' in your config.hin is suspect. There are
> 37 such macros in GNU coreutils, e.g., _GNU_SOURCE, _DARWIN_C_SOURCE,
> _REGEX_LARGE_OFFSETS. If GNU coreutils used your project's conventions it'd
> likely need to prepare -D options for all of these, and maybe even
> more.

Just to make sure. Are you sayingthat there should normally not  be any
undef in the config headers for macros whose name starts with a _ sign?
Am I understanding you correctly?

Best wishes,

Sébastien.




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

  Powered by Linux