> isalnum_l: New module. > * lib/ctype.in.h: Include <locale.h>. > (isalnum_l): New declaration. > * tests/test-ctype-h-c++.cc: Check declaration of isalnum_l.
Oops, I forgot to test this in C++ mode. And sure enough, on macOS the _GL_CXXALIASWARN invocation produces an error. 2025-02-14 Bruno Haible <br...@clisp.org> isalnum_l: Fix errors in C++ mode. * lib/ctype.in.h (isalnum_l): Disable _GL_CXXALIASWARN invocation on non-glibc systems. * tests/test-ctype-h-c++.cc (isalnum_l): Fix typo. * doc/posix-functions/isalnum_l.texi: Correct platforms list. diff --git a/doc/posix-functions/isalnum_l.texi b/doc/posix-functions/isalnum_l.texi index 36c0223697..8786db9a7f 100644 --- a/doc/posix-functions/isalnum_l.texi +++ b/doc/posix-functions/isalnum_l.texi @@ -11,7 +11,7 @@ @itemize @item This function is missing on many platforms: -FreeBSD 6.0, NetBSD 5.0, OpenBSD 6.0, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 11.3, Cygwin 1.7.x, mingw, MSVC 14, Android 4.4. +FreeBSD 9.0, NetBSD 6.1, OpenBSD 6.1, Minix 3.1.8, AIX 6.1, HP-UX 11, Solaris 11.3, Cygwin 2.5.x, mingw, MSVC 14, Android 4.4. @end itemize Portability problems not fixed by Gnulib: diff --git a/lib/ctype.in.h b/lib/ctype.in.h index 1ca6437c82..231c0b6601 100644 --- a/lib/ctype.in.h +++ b/lib/ctype.in.h @@ -70,7 +70,9 @@ _GL_FUNCDECL_SYS (isalnum_l, int, (int c, locale_t locale), _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (isalnum_l, int, (int c, locale_t locale)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (isalnum_l); +# endif #elif defined GNULIB_POSIXCHECK # undef isalnum_l # if HAVE_RAW_DECL_ISALNUM_L diff --git a/tests/test-ctype-h-c++.cc b/tests/test-ctype-h-c++.cc index 99d6bd43b7..981eda6671 100644 --- a/tests/test-ctype-h-c++.cc +++ b/tests/test-ctype-h-c++.cc @@ -25,7 +25,7 @@ #if GNULIB_TEST_ISALNUM_L -SIGNATURE_CHECK (GNULIB_NAMESPACE::isalnum_l, int, (int, locale-t)); +SIGNATURE_CHECK (GNULIB_NAMESPACE::isalnum_l, int, (int, locale_t)); #endif #if 0