# HG changeset patch
# Parent c5d2094dbdf0a7e1529b24353fb47cfac7d0d967
Fix ANSI mode omission from <wchar.h>

diff --git a/mingwrt/include/wchar.h b/mingwrt/include/wchar.h
--- a/mingwrt/include/wchar.h
+++ b/mingwrt/include/wchar.h
@@ -376,14 +376,15 @@
  * for selective inclusion by <string.h>; to facilitate this, we must
  * change the declarative condition...
  */
 #endif	/* ! RC_INVOKED */
 #endif	/* !__STRING_H_SOURCED__ */
-#if ! (defined RC_INVOKED || (defined _WCHAR_H && defined _STRING_H))
+#if ! defined RC_INVOKED
+#if !(defined _WCHAR_H && (defined _STRING_H && ! defined __STRICT_ANSI__))
 /* ...such that these declarations are exposed when either _WCHAR_H, or
- * _STRING_H is defined, (but not both, since that would indicate that
- * these declarations have already been processed).
+ * when _STRING_H is defined and __STRICT_ANSI__ is not, (since that would
+ * indicate that these declarations have already been processed).
  *
  *
  * Wide character versions of the ISO-C standard string functions.
  */
 _CRTIMP __cdecl __MINGW_NOTHROW  wchar_t *wcscat (wchar_t *, const wchar_t *);
@@ -466,13 +467,14 @@ int __cdecl __MINGW_NOTHROW  wcscmpi (co
 
 /* This completes the set of declarations which are to be duplicated by
  * inclusion of <string.h>; revert the declarative condition, to make it
  * specific to <wchar.h> alone.
  */
-#endif	/* !(RC_INVOKED || (_WCHAR_H && _STRING_H)) */
+#endif	/* !(_WCHAR_H && (_STRING_H && !__STRICT_ANSI__)) */
+#endif	/* ! RC_INVOKED */
+
 #if defined _WCHAR_H && ! defined RC_INVOKED
-
 #ifndef __STRICT_ANSI__
 typedef wchar_t  _Wint_t;
 #endif
 
 typedef int mbstate_t;
