]> Savannah Git Hosting - gnulib.git/commitdiff
Fix a compilation error in C++ mode on Solaris 11.4.
authorBruno Haible <bruno@clisp.org>
Sun, 4 Sep 2022 00:52:14 +0000 (02:52 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 5 Sep 2022 01:54:38 +0000 (03:54 +0200)
* 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.

ChangeLog
lib/uchar.in.h

index b468f73156c164ceb26feb6e320cdf5058379a85..431a6e6b7b57c6f7ce2740d11c490522b137f916 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-09-03  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        Fix compilation errors of C++ tests on Solaris 10 with Sun C++.
index 13913a3dadeb6c1969a8a30d5242ba1991f71a76..e6a5cddf86bd638c593fe5ff29d991e4697c919f 100644 (file)
@@ -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