* lib/wctype.in.h: Include not only <ctype.h> but also <wchar.h>. Do so
also on MSVC.
Reported by Eli Zaretskii <eliz@gnu.org>.
+2017-05-01 Bruno Haible <bruno@clisp.org>
+
+ wctype: Fix problems if <wchar.h> gets included after <wctype.h>.
+ * lib/wctype.in.h: Include not only <ctype.h> but also <wchar.h>. Do so
+ also on MSVC.
+ Reported by Eli Zaretskii <eliz@gnu.org>.
+
2017-05-01 Bruno Haible <bruno@clisp.org>
wchar: Fix compilation error with the original mingw.org mingw.
# include <wchar.h>
#endif
-/* mingw has declarations of towupper and towlower in <ctype.h> as
- well <wctype.h>. Include <ctype.h> in advance to avoid rpl_ prefix
- being added to the declarations. */
-#ifdef __MINGW32__
+/* Native Windows (mingw, MSVC) have declarations of towupper, towlower, and
+ isw* functions in <ctype.h>, <wchar.h> as well as in <wctype.h>. Include
+ <ctype.h>, <wchar.h> in advance to avoid rpl_ prefix being added to the
+ declarations. */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# include <ctype.h>
+# include <wchar.h>
#endif
/* Include the original <wctype.h> if it exists.