From 05ab3d1afdda01c240fb712b61017fd6f3a05a45 Mon Sep 17 00:00:00 2001 From: Keith Marshall Date: Mon, 17 Oct 2016 22:05:55 +0100 Subject: [PATCH] Resolve an ANSI mode vs. conflict. --- mingwrt/ChangeLog | 10 ++++++++++ mingwrt/include/wchar.h | 16 ++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index d9ff374..bbbbdef 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,13 @@ +2016-10-17 Keith Marshall + + Resolve an ANSI mode vs. conflict. + + * include/wchar.h [!(_WCHAR_H && _STRING_H)]: Change condition... + [!(_WCHAR_H && (_STRING_H && !__STRICT_ANSI__))]: ...to this; the + guarded declarations are not exposed by including when... + [__STRICT_ANSI__]: ...this is defined; hence, we must declare them + when including , even after including + 2016-10-13 Keith Marshall Prepare and tag mingwrt-3.22.3 patch release. diff --git a/mingwrt/include/wchar.h b/mingwrt/include/wchar.h index 9f356c3..21e2aeb 100644 --- a/mingwrt/include/wchar.h +++ b/mingwrt/include/wchar.h @@ -378,10 +378,13 @@ _BEGIN_C_DECLS */ #endif /* ! RC_INVOKED */ #endif /* !__STRING_H_SOURCED__ */ -#if ! (defined RC_INVOKED || (defined _WCHAR_H && defined _STRING_H)) -/* ...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). +#if ! defined RC_INVOKED +#if !(defined _WCHAR_H && (defined _STRING_H && ! defined __STRICT_ANSI__)) +/* ...such that these declarations are exposed when either _WCHAR_H is defined, + * or when _STRING_H is defined and __STRICT_ANSI__ is not, but NOT when BOTH of + * these apply, since that indicates that this group of declarations has already + * been processed, during partial inclusion of by , whereas + * we are now including in its own right. * * * Wide character versions of the ISO-C standard string functions. @@ -468,9 +471,10 @@ _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsupr (wchar_t *); * inclusion of ; revert the declarative condition, to make it * specific to alone. */ -#endif /* !(RC_INVOKED || (_WCHAR_H && _STRING_H)) */ -#if defined _WCHAR_H && ! defined RC_INVOKED +#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 -- 2.11.0