* lib/wchar.in.h (GNULIB_defined_mbstate_t): Ignore a missing mbsinit function
on native Windows.
mbrtowc: Don't replace mbstate_t on MSVC.
* m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN): Require AC_CANONICAL_HOST. Ignore
a missing mbsinit function on native Windows.
+ * lib/wchar.in.h (GNULIB_defined_mbstate_t): Likewise.
* m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Strengthen the test, to detect an
MSVC bug.
* doc/posix-functions/wcrtomb.texi: Mention the MSVC bug.
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@
+#if !(((defined _WIN32 && !defined __CYGWIN__) || @HAVE_MBSINIT@) && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
# if !GNULIB_defined_mbstate_t
# if !(defined _AIX || defined _MSC_VER)
typedef int rpl_mbstate_t;