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

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



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 ?

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* )
-- 
1.8.2.1


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