• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

The MinGW.org Windows System Libraries


Commit MetaInfo

Revisão05ab3d1afdda01c240fb712b61017fd6f3a05a45 (tree)
Hora2016-10-18 06:05:55
AutorKeith Marshall <keithmarshall@user...>
CommiterKeith Marshall

Mensagem de Log

Resolve an ANSI mode <string.h> vs. <wchar.h> conflict.

Mudança Sumário

Diff

--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,13 @@
1+2016-10-17 Keith Marshall <keithmarshall@users.sourceforge.net>
2+
3+ Resolve an ANSI mode <string.h> vs. <wchar.h> conflict.
4+
5+ * include/wchar.h [!(_WCHAR_H && _STRING_H)]: Change condition...
6+ [!(_WCHAR_H && (_STRING_H && !__STRICT_ANSI__))]: ...to this; the
7+ guarded declarations are not exposed by including <string.h> when...
8+ [__STRICT_ANSI__]: ...this is defined; hence, we must declare them
9+ when including <wchar.h>, even after including <string.h>
10+
111 2016-10-13 Keith Marshall <keithmarshall@users.sourceforge.net>
212
313 Prepare and tag mingwrt-3.22.3 patch release.
--- a/mingwrt/include/wchar.h
+++ b/mingwrt/include/wchar.h
@@ -378,10 +378,13 @@ _BEGIN_C_DECLS
378378 */
379379 #endif /* ! RC_INVOKED */
380380 #endif /* !__STRING_H_SOURCED__ */
381-#if ! (defined RC_INVOKED || (defined _WCHAR_H && defined _STRING_H))
382-/* ...such that these declarations are exposed when either _WCHAR_H, or
383- * _STRING_H is defined, (but not both, since that would indicate that
384- * these declarations have already been processed).
381+#if ! defined RC_INVOKED
382+#if !(defined _WCHAR_H && (defined _STRING_H && ! defined __STRICT_ANSI__))
383+/* ...such that these declarations are exposed when either _WCHAR_H is defined,
384+ * or when _STRING_H is defined and __STRICT_ANSI__ is not, but NOT when BOTH of
385+ * these apply, since that indicates that this group of declarations has already
386+ * been processed, during partial inclusion of <wchar.h> by <string.h>, whereas
387+ * we are now including <wchar.h> in its own right.
385388 *
386389 *
387390 * Wide character versions of the ISO-C standard string functions.
@@ -468,9 +471,10 @@ _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsupr (wchar_t *);
468471 * inclusion of <string.h>; revert the declarative condition, to make it
469472 * specific to <wchar.h> alone.
470473 */
471-#endif /* !(RC_INVOKED || (_WCHAR_H && _STRING_H)) */
472-#if defined _WCHAR_H && ! defined RC_INVOKED
474+#endif /* !(_WCHAR_H && (_STRING_H && !__STRICT_ANSI__)) */
475+#endif /* ! RC_INVOKED */
473476
477+#if defined _WCHAR_H && ! defined RC_INVOKED
474478 #ifndef __STRICT_ANSI__
475479 typedef wchar_t _Wint_t;
476480 #endif