summaryrefslogtreecommitdiff
path: root/lib/wchar.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-12-18 19:33:27 +0100
committerBruno Haible <bruno@clisp.org>2019-12-18 19:33:27 +0100
commitc99e1067a76d76a82dfaff1842f7d68e7f8ead45 (patch)
tree62de05aeb0fb6f058da8a8d7a7b9176c08d8feee /lib/wchar.in.h
parentb7e45cc191f3ba8389ecc08942c149add83a367e (diff)
downloadgnulib-c99e1067a76d76a82dfaff1842f7d68e7f8ead45.tar.gz
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.
Diffstat (limited to 'lib/wchar.in.h')
-rw-r--r--lib/wchar.in.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index 6626bd9aad..1cf7837313 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