Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 2020-02-13 16:19, Tom Lane wrote:
>> According to C99 and POSIX, intptr_t should be provided by <stdint.h> ...
>> now that we're requiring C99, can we get away with just #include'ing
>> that directly in these test files?
> I think in the past we were worried about the C library not being fully
> C99. But the build farm indicates that even the trailing edge OS X and
> HP-UX members have it, so I'm content to require it. Then we should
> probably remove the Autoconf tests altogether.
Yeah, I think that the C99 requirement has obsoleted a number of configure
tests and related hackery in c.h. We just haven't got round to cleaning
that up yet.
BTW: I'm still concerned about the possibility of the C library being
less than C99. The model that was popular back then, and which still
exists on e.g. gaur, was that you could install a C99 *compiler* on
a pre-C99 system, and the compiler would bring its own standard header
files as necessary. While I don't have the machine booted up to check,
I'm pretty sure that gaur's <stdint.h> is being supplied by the gcc
installation not directly from /usr/include. On the other hand, that
compiler installation is still dependent on the vendor-supplied libc.
So the sorts of tests I think we can get away with removing have to do
with the presence of C99-required headers, macros, typedefs, etc.
Anything that is checking the presence or behavior of code in libc,
we probably need to be more careful about.
regards, tom lane