summaryrefslogtreecommitdiff
path: root/lib/wchar.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-12-11 09:54:35 +0100
committerBruno Haible <bruno@clisp.org>2019-12-11 11:38:51 +0100
commit47bfe0ab18ebdc74c10e9625c27d0c89a369f512 (patch)
tree5d111114b181d06e290bb32f05e0eba20475553e /lib/wchar.in.h
parentc72f9acbc6a63e76df72c5708b33e867825b30bc (diff)
downloadgnulib-47bfe0ab18ebdc74c10e9625c27d0c89a369f512.tar.gz
wchar: Fix compilation error in C++ mode on MSVC.
* lib/wchar.in.h (mbstate_t): Don't override on MSVC.
Diffstat (limited to 'lib/wchar.in.h')
-rw-r--r--lib/wchar.in.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index af019e6c25..6626bd9aad 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -138,10 +138,10 @@ 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.
- On AIX, mbrtowc needs to be overridden, but mbstate_t exists and is large
- enough and overriding it would cause problems in C++ mode. */
+ 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 _AIX || defined _MSC_VER)
# if !GNULIB_defined_mbstate_t
typedef int rpl_mbstate_t;
# undef mbstate_t