On 2022-11-11 19:45, Zack Weinberg wrote:
For anything specified by either ISO C or POSIX/XSI, I think Autoconf probably*can* bake in an expected function prototype.
Unfortunately that won't work in general. strerror_r comes to mind (GNU's signature disagrees with POSIX). And it's not uncommon for compilers to have pre-standard versions of functions that are eventually standardized with a different signature or whatever (e.g., we'll see that with totalorder in C23).
Although we can surely do it in many common cases, it'll require judgment calls and debugging (and I hope someone other than me would do that and also field and fix all the bug reports :-).