]> git.proxmox.com Git - qemu.git/blobdiff - compiler.h
qMerge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20121210.0' into staging
[qemu.git] / compiler.h
index f76921e5b059f16857e3cc136089358c275681be..2f7998b6c121dd2223dbb42a40a7f030729b55a7 100644 (file)
    /* Use gnu_printf when supported (qemu uses standard format strings). */
 #  define GCC_ATTR __attribute__((__unused__, format(gnu_printf, 1, 2)))
 #  define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
+#  if defined(_WIN32)
+    /* Map __printf__ to __gnu_printf__ because we want standard format strings
+     * even when MinGW or GLib include files use __printf__. */
+#   define __printf__ __gnu_printf__
+#  endif
 # endif
-#define GCC_WEAK __attribute__((weak))
 #else
 #define GCC_ATTR /**/
 #define GCC_FMT_ATTR(n, m)