summaryrefslogtreecommitdiffstats
path: root/compiler.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix and clean code which tests the gcc versionStefan Weil2011-09-231-1/+1
| | | | | | | | | The code which tests whether gcc supports warn_unused_result was wrong. Remove the wrong test from configure and replace it by code using macro QEMU_GNUC_PREREQ in compiler.h. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Move macro QEMU_GNUC_PREREQ to compiler.hStefan Weil2011-09-231-2/+13
| | | | | | | | | | | | | The macro is compiler specific and does not depend on the operating system. Move macro QEMU_GNUC_PREREQ from osdep.h to compiler.h and use it to simplify existing code. host-utils.h uses this macro, so it now needs compiler.h instead of osdep.h. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add new macro QEMU_PACKED for packed C structuresStefan Weil2011-09-031-0/+6
| | | | | | | | | | | | | A packed struct needs different gcc attributes for compilations with 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. QEMU_PACKED sets this attribute and must be used for any packed struct which is affected by -mms-bitfields. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Introduce compiler.h header fileLuiz Capitulino2011-07-211-0/+34
This moves compiler related macros from qemu-common.h to compiler.h. The reason for this change is that there are simple header files that depend only on the compiler macros, so including qemu-common.h is overkill. Besides, qemu-common.h is bloated and will benefit from some splitting. Please, also note that the QEMU_BUILD_BUG_ON() macro is being fixed to not use double underscores as a prefix and the license text was added by Vassili Karpov (malc), who is one of the authors of the new file. Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
OpenPOWER on IntegriCloud