[sr #111333] AC_CHECK_FUNCS fails when cross-compiling to wasm32

Zack Weinberg <[email protected]> Tue, 4 Nov 2025 11:03:17 -0500 (EST)
Newsgroups gmane.comp.sysutils.autoconf.bugs
Message-ID <[email protected]>
Follow-up Comment #2, sr #111333 (group autoconf):

To elaborate on "not conveniently", this _is_ something that we would like to
fix in the long run. WASM is not the only environment that has started
complaining about this extremely old-school code, and I expect it to become
more of a problem as more compilers adopt C2024 (in which 'extern char strnlen
()' arguably ought to provoke a hard error from the _compiler_, not just the
linker, whether or not <string.h> has been included).

However, the only plausible way to fix it is for Autoconf to have a giant
table listing, for each function that AC_CHECK_FUNC is likely to be asked to
check for, the header that is supposed to declare it, and the expected
prototype.  At a minimum this table should should cover all of ISO C and all
of POSIX, including functions that _used_ to be in either standard but have
been removed.  You can probably imagine how much work this would be, and none
of the core Autoconf maintainers have the time to tackle it in the near
future.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?111333>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaQojxQAKCRCqLAuaBUf3
TjwBAP9vRHR9JbDVnQG7/VeSAE38SmFot5gqsxwpJQpZN4cr6gD/S9U/IIkYkFN9
dUP9Ck4YLCfTLR1pWYs3nZytQUClWgw=
=OkHZ
-----END PGP SIGNATURE-----