]> git.proxmox.com Git - qemu.git/commitdiff
mingw32: Enable C99/POSIX format strings
authorStefan Weil <weil@mail.berlios.de>
Fri, 12 Feb 2010 10:02:08 +0000 (11:02 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 19 Feb 2010 21:32:15 +0000 (15:32 -0600)
Starting with mingw32-runtime 3.15, C99/POSIX
format strings (%zu, %lld, ...) are supported
by defining __USE_MINGW_ANSI_STDIO=1.

As QEMU uses such format strings, unconditionally
define this macro. It won't hurt on older revisions
of mingw32-runtime.

Tested with manually installed mingw32-runtime 3.15
on debian (cross compiled + wine).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
configure

index 2c2e7ae048c5c19dcde97d0593ce3fc66c8a41da..8eb5f5be9dc0ce2db0d913fad49df19e483a5bdc 100755 (executable)
--- a/configure
+++ b/configure
@@ -441,6 +441,8 @@ fi
 if test "$mingw32" = "yes" ; then
   EXESUF=".exe"
   QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS"
+  # enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later)
+  QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS"
   LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
 fi