From: Bruno Haible Date: Sun, 4 Sep 2022 00:52:14 +0000 (+0200) Subject: Fix a compilation error in C++ mode on Solaris 11.4. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=833bdf5f68dfbf8e32761f8de4e12b4e74c41c8d;p=gnulib.git Fix a compilation error in C++ mode on Solaris 11.4. * lib/uchar.in.h (c32rtomb): Enable the C++ alias warning only on glibc ≥ 2.16 systems. Fix a GNULIB_POSIXCHECK mistake. (mbrtoc32): Enable the C++ alias warning only on glibc ≥ 2.16 systems. --- diff --git a/ChangeLog b/ChangeLog index b468f73156..431a6e6b7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2022-09-03 Bruno Haible + + Fix a compilation error in C++ mode on Solaris 11.4. + * lib/uchar.in.h (c32rtomb): Enable the C++ alias warning only on + glibc ≥ 2.16 systems. Fix a GNULIB_POSIXCHECK mistake. + (mbrtoc32): Enable the C++ alias warning only on glibc ≥ 2.16 systems. + 2022-09-03 Bruno Haible Fix compilation errors of C++ tests on Solaris 10 with Sun C++. diff --git a/lib/uchar.in.h b/lib/uchar.in.h index 13913a3dad..e6a5cddf86 100644 --- a/lib/uchar.in.h +++ b/lib/uchar.in.h @@ -170,11 +170,13 @@ _GL_FUNCDECL_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); # endif +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 _GL_CXXALIASWARN (c32rtomb); +# endif #elif defined GNULIB_POSIXCHECK # undef c32rtomb # if HAVE_RAW_DECL_C32RTOMB -_GL_WARN_ON_USE (mbrtoc32, "c32rtomb is not portable - " +_GL_WARN_ON_USE (c32rtomb, "c32rtomb is not portable - " "use gnulib module c32rtomb for portability"); # endif #endif @@ -245,7 +247,9 @@ _GL_FUNCDECL_SYS (mbrtoc32, size_t, _GL_CXXALIAS_SYS (mbrtoc32, size_t, (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); # endif +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 _GL_CXXALIASWARN (mbrtoc32); +# endif #elif defined GNULIB_POSIXCHECK # undef mbrtoc32 # if HAVE_RAW_DECL_MBRTOC32