freelocale() has a portability problem as well, due to macOS.
2025-02-14 Bruno Haible <br...@clisp.org> freelocale: Allow non-POSIX prototype on macOS. * tests/test-freelocale.c: Skip the signature check on macOS. * doc/posix-functions/freelocale.texi: Mention the macOS problem. diff --git a/doc/posix-functions/freelocale.texi b/doc/posix-functions/freelocale.texi index 1167f002fb..21134adc78 100644 --- a/doc/posix-functions/freelocale.texi +++ b/doc/posix-functions/freelocale.texi @@ -21,6 +21,8 @@ Portability problems not fixed by Gnulib: @itemize @item +This function's return type is @code{int} instead of @code{void} on macOS. +@item This function may cause crashes in subsequent @code{newlocale} invocations on some platforms: @c https://dev.haiku-os.org/ticket/18344 diff --git a/tests/test-freelocale.c b/tests/test-freelocale.c index 65c70b1ea1..d056866b1d 100644 --- a/tests/test-freelocale.c +++ b/tests/test-freelocale.c @@ -21,7 +21,9 @@ #include <locale.h> #include "signature.h" +#if !(defined __APPLE__ && defined __MACH__) SIGNATURE_CHECK (freelocale, void, (locale_t)); +#endif #include "macros.h"