bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compile error with xlclang++ on AIX


From: Bruno Haible
Subject: Re: Compile error with xlclang++ on AIX
Date: Wed, 18 Dec 2019 19:36:09 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-166-generic; KDE/5.18.0; x86_64; ; )

On 2019-12-07 I pushed:
>       * lib/wchar.in.h (mbstate_t): Don't override on AIX.

This caused a regression: mbrtowc tests started to fail on AIX and, later,
also on MSVC. This patch fixes the regression:


2019-12-18  Bruno Haible  <address@hidden>

        wchar: Fix test failures on AIX and MSVC (regression from 2019-12-07).
        * lib/wchar.in.h (GNULIB_defined_mbstate_t): Do define on AIX and MSVC.

diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index 6626bd9..1cf7837 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -140,12 +140,13 @@ typedef unsigned int rpl_wint_t;
    implementing mbrtowc for encodings like UTF-8.
    On AIX and MSVC, 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 || defined _MSC_VER)
+#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
 # if !GNULIB_defined_mbstate_t
+#  if !(defined _AIX || defined _MSC_VER)
 typedef int rpl_mbstate_t;
-#  undef mbstate_t
-#  define mbstate_t rpl_mbstate_t
+#   undef mbstate_t
+#   define mbstate_t rpl_mbstate_t
+#  endif
 #  define GNULIB_defined_mbstate_t 1
 # endif
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]