From 0c7fab68183df463c54fa08caacc4d2d1c91abb1 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 10 Sep 2022 18:20:58 +0200 Subject: [PATCH] string: Fix compilation error in C++ mode on AIX 7.2 with xlclang. * lib/string.in.h (mbslen): Enable the C++ alias warning only on glibc systems. --- ChangeLog | 6 ++++++ lib/string.in.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 667d632e64..269813133c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2022-09-10 Bruno Haible + + string: Fix compilation error in C++ mode on AIX 7.2 with xlclang. + * lib/string.in.h (mbslen): Enable the C++ alias warning only on glibc + systems. + 2022-09-10 Bruno Haible math: Fix compilation error in C++ mode on AIX 7.2 with xlclang. diff --git a/lib/string.in.h b/lib/string.in.h index 3996da9fcb..e56f6db0c9 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -943,7 +943,9 @@ _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbslen); +# endif #endif #if @GNULIB_MBSNLEN@ -- 2.39.5