On 11/1/18, Liu Hao <lh_mo...@126.com> wrote:
> 在 2018/11/1 9:52, Mateusz 写道:
>> During discussion about inttypes I realized that we check (in header
>> files) if
>> __USE_MINGW_ANSI_STDIO is active in non consistent way:
>> #if defined(__USE_MINGW_ANSI_STDIO) && ((__USE_MINGW_ANSI_STDIO + 0) !=
>> 0)
>> #elif defined(__USE_MINGW_ANSI_STDIO)
>> #if !defined (__USE_MINGW_ANSI_STDIO) || __USE_MINGW_ANSI_STDIO == 0
>>
>> Attached patch simplified checking if __USE_MINGW_ANSI_STDIO is active --
>> it
>> always define __USE_MINGW_ANSI_STDIO to 0 or 1 in _mingw.h so now it
>> should be
>> simple:
>> #if __USE_MINGW_ANSI_STDIO /* active */
>> #if __USE_MINGW_ANSI_STDIO == 0 /* not active */
>>
>> Please review.

The only broken case seems to have been that first hunk in stdio.h
(added by commit 015e637b4b24 this year.) Others always consistently
check __USE_MINGW_ANSI_STDIO to be non-zero in order to activate it.
So this patch is good.


> Are there any existent projects where `__USE_MINGW_ANSI_STDIO` is
> defined as something other than `0` or `1`, if it is defined at all,
> including empty?

That would be a bug, and I'd recommend applying this patch.

Just in case, you guys should check documentation (wiki, etc)
and clarify as necessary.


_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to