History | View | Annotate | Download (2 kB)
w32: Always use standard instead of native format strings
GLib 2.0 include files use printf for the format attributewhich resolves to native format strings on w32 hosts.
QEMU wants standard format strings instead of native formatstrings, so we simply change any declaration with printf...
win32: provide separate macros for weak decls and definitions
mingw32 seems to want the declaration to also carry the weak attribute.Strangely, gcc on Linux absolutely does not want the declaration to be markedas weak. This may not be the right fix, but it seems to do the trick....
compiler: add macro for GCC weak symbols
This lets us provide a default implementation of a symbol which targets canoverride.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
rewrite QEMU_BUILD_BUG_ON
On some platforms, LINE will not expand to real number in QEMU_BUILD_BUG_ON,so if using QEMU_BUILD_BUG_ON twice, compiler will report errors. This patch willfix it.
BTW, I got error message on RHEL 6.1/gcc 4.4.5.
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>...
Move macro QEMU_GNUC_PREREQ to compiler.h
The macro is compiler specific and does not depend on the operating system.
Move macro QEMU_GNUC_PREREQ from osdep.h to compiler.hand use it to simplify existing code.
host-utils.h uses this macro, so it now needs compiler.h...
Fix and clean code which tests the gcc version
The code which tests whether gcc supports warn_unused_result was wrong.Remove the wrong test from configure and replace it by code usingmacro QEMU_GNUC_PREREQ in compiler.h.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
Add new macro QEMU_PACKED for packed C structures
A packed struct needs different gcc attributes for compilationswith MinGW compilers because glib-2.0 adds compiler flag-mms-bitfields which modifies the packing algorithm.
Attribute gcc_struct reverses the negative effects of -mms-bitfields....
Introduce compiler.h header file
This moves compiler related macros from qemu-common.h to compiler.h.
The reason for this change is that there are simple header files thatdepend only on the compiler macros, so including qemu-common.h is overkill.
Besides, qemu-common.h is bloated and will benefit from some splitting....