[Top][All Lists]

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

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

From: Zack Weinberg
Subject: Re: How can Autoconf help with the transition to stricter compilation defaults?
Date: Fri, 11 Nov 2022 22:45:39 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Bob Friesenhahn <> 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 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]