]> Git Repo - qemu.git/blobdiff - hw/apic.c
Define macro QEMU_GNUC_PREREQ and use it
[qemu.git] / hw / apic.c
index 42920869c182370c887764d2c6aeffa375025f2e..762852e90fe0a3a1ccfcc87464e9f249cf7b5a0c 100644 (file)
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -20,6 +20,7 @@
 #include "hw.h"
 #include "pc.h"
 #include "qemu-timer.h"
+#include "osdep.h"
 
 //#define DEBUG_APIC
 //#define DEBUG_IOAPIC
@@ -107,7 +108,7 @@ static void apic_update_irq(APICState *s);
 /* Find first bit starting from msb */
 static int fls_bit(uint32_t value)
 {
-#if defined(__GNUC__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#if QEMU_GNUC_PREREQ(3, 4)
     return 31 - __builtin_clz(value);
 #else
     unsigned int ret = 0;
@@ -127,7 +128,7 @@ static int fls_bit(uint32_t value)
 /* Find first bit starting from lsb */
 static int ffs_bit(uint32_t value)
 {
-#if defined(__GNUC__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#if QEMU_GNUC_PREREQ(3, 4)
     return __builtin_ffs(value) - 1;
 #else
     unsigned int ret = 0;
This page took 0.02275 seconds and 4 git commands to generate.