summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-12-04 12:20:44 +0100
committerBruno Haible <bruno@clisp.org>2019-12-04 12:21:13 +0100
commit1eb6fd581f1890682ef7b39b12c5bcf37c6ee6dd (patch)
treefb7677cf195614bf9d165ac32f759cca6ddc4bcc
parent3ef3dd8d3523725e0b13c2a2ef4c99217d2446c1 (diff)
downloadgnulib-1eb6fd581f1890682ef7b39b12c5bcf37c6ee6dd.tar.gz
gnulib-1eb6fd581f1890682ef7b39b12c5bcf37c6ee6dd.tar.bz2
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.
-rw-r--r--ChangeLog6
-rw-r--r--doc/posix-functions/wcsnrtombs.texi4
-rw-r--r--lib/wchar.in.h2
3 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 805927af03..c5d8df6c13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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.
* lib/wchar.in.h (wcsnrtombs, wcwidth, wcswidth): Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
diff --git a/doc/posix-functions/wcsnrtombs.texi b/doc/posix-functions/wcsnrtombs.texi
index 39415d979f..08aeebbe8c 100644
--- a/doc/posix-functions/wcsnrtombs.texi
+++ b/doc/posix-functions/wcsnrtombs.texi
@@ -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:
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index f081be648d..71b1efe9ca 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -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)

Return to:

Send suggestions and report system problems to the System administrator.