]> git.proxmox.com Git - qemu.git/blobdiff - compiler.h
Avoid asprintf() which is not available on mingw
[qemu.git] / compiler.h
index 736e77075ae47d9707946f982478e78d764b0fff..07ba1f81139c6ad1203ea22345a79a20b392ed7b 100644 (file)
 #  define GCC_ATTR __attribute__((__unused__, format(gnu_printf, 1, 2)))
 #  define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
 # endif
+#if defined(_WIN32)
+#define GCC_WEAK __attribute__((weak))
+#define GCC_WEAK_DECL GCC_WEAK
+#else
+#define GCC_WEAK __attribute__((weak))
+#define GCC_WEAK_DECL
+#endif
 #else
 #define GCC_ATTR /**/
 #define GCC_FMT_ATTR(n, m)