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

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



[adding gnulib]

On 05/17/2013 08:14 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange redhat com>
> 
> 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.

Please don't push this to libvirt until gnulib has decided what to do
about it.

> 
> Signed-off-by: Daniel P. Berrange <berrange redhat com>
> ---
>  configure.ac | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 3f3f11e..fe916d1 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2123,6 +2123,9 @@ AC_SUBST([VERSION_SCRIPT_FLAGS])
>  AC_SUBST([MSCOM_LIBS])
>  
>  
> +dnl http://sourceforge.net/apps/trac/mingw-w64/wiki/gnu%20printf
> +AC_DEFINE_UNQUOTED([__USE_MINGW_ANSI_STDIO], 1, [Enable GNU style printf formatters])
> +
>  dnl Look for windres to build a Windows icon resource.
>  case "$host" in
>    *-*-mingw* | *-*-cygwin* | *-*-msvc* )
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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