]> Savannah Git Hosting - gnulib.git/commitdiff
wchar: Fix test failures on AIX and MSVC (regression from 2019-12-07).
authorBruno Haible <bruno@clisp.org>
Wed, 18 Dec 2019 18:33:27 +0000 (19:33 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 18 Dec 2019 18:33:27 +0000 (19:33 +0100)
* lib/wchar.in.h (GNULIB_defined_mbstate_t): Do define on AIX and MSVC.

ChangeLog
lib/wchar.in.h

index ff5ecb86e688b0de12feaec2c61cc08fd45d75ff..6bf4218275d4e63db4339740b952c4d30253d05e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-12-18  Bruno Haible  <bruno@clisp.org>
+
+       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.
+
 2019-12-18  Bruno Haible  <bruno@clisp.org>
 
        localename: Ensure multithread-safety in future changes.
index 6626bd9aad4ea97d7e8793587b9aef342f0332e8..1cf78373139f101a68ae2e3cb59ad32f32de7f75 100644 (file)
@@ -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