diff options
author | Bruno Haible <bruno@clisp.org> | 2019-12-07 18:49:45 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-12-07 18:49:45 +0100 |
commit | bf92de50a07679dbc5c48cffd9e17cd374d39ff2 (patch) | |
tree | 4770d50ab67de9939d305aa6b8857216f1f54adb | |
parent | cd1dac96d3623f6390b632eb8498282300549dab (diff) | |
download | gnulib-bf92de50a07679dbc5c48cffd9e17cd374d39ff2.tar.gz gnulib-bf92de50a07679dbc5c48cffd9e17cd374d39ff2.tar.bz2 |
Fix compilation errors in C++ mode on AIX with xlclang++.
Reported by Christian Biesinger <cbiesinger@google.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00009.html>.
* lib/wchar.in.h (mbstate_t): Don't override on AIX.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/wchar.in.h | 7 |
2 files changed, 12 insertions, 2 deletions
@@ -1,5 +1,12 @@ 2019-12-07 Bruno Haible <bruno@clisp.org> + Fix compilation errors in C++ mode on AIX with xlclang++. + Reported by Christian Biesinger <cbiesinger@google.com> in + <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00009.html>. + * lib/wchar.in.h (mbstate_t): Don't override on AIX. + +2019-12-07 Bruno Haible <bruno@clisp.org> + Document compilation error in C++ mode on NetBSD 8.0. * doc/posix-headers/monetary.texi: Mention the NetBSD bug. diff --git a/lib/wchar.in.h b/lib/wchar.in.h index 71b1efe9ca..af019e6c25 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -137,8 +137,11 @@ typedef unsigned int rpl_wint_t; /* Override mbstate_t if it is too small. On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for - implementing mbrtowc for encodings like UTF-8. */ -#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ + implementing mbrtowc for encodings like UTF-8. + On AIX, mbrtowc needs to be overridden, but mbstate_t exists and is large + enough and overriding it would cause problems in C++ mode. */ +#if (!(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@) \ + && !defined _AIX # if !GNULIB_defined_mbstate_t typedef int rpl_mbstate_t; # undef mbstate_t |