]> Savannah Git Hosting - gnulib.git/commitdiff
Fix compilation error in C++ mode on Solaris 11 OpenIndiana.
authorBruno Haible <bruno@clisp.org>
Wed, 4 Dec 2019 11:20:44 +0000 (12:20 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 4 Dec 2019 11:21:13 +0000 (12:21 +0100)
* lib/wchar.in.h (wcsnrtombs): Force declaration in C++ mode on Solaris.
* doc/posix-functions/wcsnrtombs.texi: Mention the issue.

ChangeLog
doc/posix-functions/wcsnrtombs.texi
lib/wchar.in.h

index 805927af03945b3a6fd9fca3370bbe7aab43a8e3..c5d8df6c134887b31f3163ce6402443e357a6ef6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-12-04  Bruno Haible  <bruno@clisp.org>
+
+       Fix compilation error in C++ mode on Solaris 11 OpenIndiana.
+       * lib/wchar.in.h (wcsnrtombs): Force declaration in C++ mode on Solaris.
+       * doc/posix-functions/wcsnrtombs.texi: Mention the issue.
+
 2019-12-04  Bruno Haible  <bruno@clisp.org>
 
        Disable more _GL_CXXALIASWARN on all platforms other than glibc systems.
index 39415d979f4cbf1ec9d35b9980d7a1d2270aa0f0..08aeebbe8cbf577265e17f5629deb35e7e89a7db 100644 (file)
@@ -15,6 +15,10 @@ FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris
 This function cannot consume valid sequences of wide characters
 on some platforms:
 Solaris 11.4.
+@item
+In C++ mode, the system's @code{<wchar.h>} defines @code{std::wcsnrtombs} but
+not @code{::wcsnrtombs} on some platforms:
+Solaris 11 OpenIndiana.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index f081be648d71c3e3190c1f23aff3c8c3d840829f..71b1efe9ca84a122c54725e6dd916ef09e6a2d8d 100644 (file)
@@ -436,7 +436,7 @@ _GL_CXXALIAS_RPL (wcsnrtombs, size_t,
                   (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
                    mbstate_t *ps));
 # else
-#  if !@HAVE_WCSNRTOMBS@
+#  if !@HAVE_WCSNRTOMBS@ || (defined __cplusplus && defined __sun)
 _GL_FUNCDECL_SYS (wcsnrtombs, size_t,
                   (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
                    mbstate_t *ps)