From f7cb31acaffef034e5b758459796f8ac411c83ef Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 14 Feb 2025 23:59:09 +0100 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ doc/posix-functions/isalnum_l.texi | 2 +- lib/ctype.in.h | 2 ++ tests/test-ctype-h-c++.cc | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1e0df76df0..1d543ca251 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2025-02-14 Bruno Haible + 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. + isalnum_l: Add tests. * tests/test-isalnum_l.c: New file, based on tests/test-c32isalnum.c. * modules/isalnum_l-tests: New file. 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 @@ Portability problems fixed by Gnulib: @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 -- 2.39.5