Skip to contentSkip to conversation

ia64-dis.c: Undefine ABS to avoid clash with glib

PATCH Applied Peter Maydell 2 participants 2 messages Oct 29, 2011 – Nov 1, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64-dis.c: Undefine ABS to avoid clash with glib

Undefine ABS to avoid a clash with the macro that glib.h helpfully defines for us (and a resulting build failure on ia64 hosts).

---
Bit of a namespace grab by glib.h if you ask me. Undefining ABS seems the most straightforward fix.

 ia64-dis.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
ia64-dis.c +3 -0
index 2886df3..2a103e6 100644
@@ -781,6 +781,9 @@ ext_inc3 (const struct ia64_operand *self, ia64_insn code, ia64_insn *valuep)
   return 0;
 }
 
+/* glib.h defines ABS so we must undefine it to avoid a clash */
+#undef ABS
+
 #define CST	IA64_OPND_CLASS_CST
 #define REG	IA64_OPND_CLASS_REG
 #define IND	IA64_OPND_CLASS_IND
Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 5 lines · Peter Maydell

Undefine ABS to avoid a clash with the macro that glib.h helpfully defines for us (and a resulting build failure on ia64 hosts).

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 21 lines

---
Bit of a namespace grab by glib.h if you ask me. Undefining ABS seems the most straightforward fix.

  ia64-dis.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)
ia64-dis.c +3 -0
index 2886df3..2a103e6 100644
@@ -781,6 +781,9 @@ ext_inc3 (const struct ia64_operand *self, ia64_insn code, ia64_insn *valuep)
    return 0;
  }
 
+/* glib.h defines ABS so we must undefine it to avoid a clash */
+#undef ABS
+
  #define CST	IA64_OPND_CLASS_CST
  #define REG	IA64_OPND_CLASS_REG
  #define IND	IA64_OPND_CLASS_IND