Re: How can Autoconf help with the transition to stricter compilation defaults?

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

 



Bob Friesenhahn <bfriesen@xxxxxxxxxxxxxxxxxxx> writes:
> On Thu, 10 Nov 2022, Zack Weinberg wrote:
>> The biggest remaining (potential) problem, that I’m aware of, is that
>> AC_CHECK_FUNC unconditionally declares the function we’re probing for
>> as ‘char NAME (void)’
>
> This does seem like the biggest problem since it would appear to
> require that new macros are used and that the configure.ac developer
> would need to supply additional syntax (where syntax does not
> currently exist) in order to succeed with linking.  It is not possible
> for Autoconf itself to anticipate the function names used by libraries
> and assume some specific prototype.

For anything specified by either ISO C or POSIX/XSI, I think Autoconf
probably *can* bake in an expected function prototype.  It might be
worth doing the same for common-but-not-standardized C library
extensions (for concreteness, let’s say anything that exists in both
glibc and at least two BSDs is a candidate for this treatment).

We could go on doing what we do today for any unrecognized symbol, but
issue a warning, recommending the script be updated to supply the
expected prototype and headers.

zw





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

  Powered by Linux