bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libvirt] [PATCH] Define __USE_MINGW_ANSI_STDIO in config.h


From: Pádraig Brady
Subject: Re: [libvirt] [PATCH] Define __USE_MINGW_ANSI_STDIO in config.h
Date: Tue, 02 Dec 2014 13:50:45 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 17/05/13 15:35, Eric Blake wrote:
> [adding gnulib]
> 
> On 05/17/2013 08:14 AM, Daniel P. Berrange wrote:
>> From: "Daniel P. Berrange" <address@hidden>
>>
>> Latest mingw64 can provide *printf functions which
>> support GNU format specifiers. It won't do that unless
>> you have defined __USE_MINGW_ANSI_STDIO though.
>>
>> GNULIB's 'asprintf' module detected that mingw had
>> the asprintf function, but didn't define the
>> __USE_MINGW_ANSI_STDIO so we got left with the version
>> offering Win32 format specifiers, instead of GNU formats.
>>
>> It could perhaps be argued that gnulib's 'asprintf'
>> could be defining __USE_MINGW_ANSI_STDIO for us ?
> 
> Yes, gnulib should be taking advantage of this new mingw development.

I independently noticed this mingw feature when looking at the portability
of gnulib's ftoastr to mingw.  I agree that gnulib should define this.
Note ftoastr doesn't depend on any of the gnulib printf modules
as that was thought to be overkill for the portability provided,
so I'm not sure where to put this define.  In the attached I added
it to the extensions module and depended on that from both ftoastr and stdio.

cheers,
Pádraig.

Attachment: mingw-stdio.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]