summaryrefslogtreecommitdiffstats
path: root/multiarch-dispatch.h
diff options
context:
space:
mode:
Diffstat (limited to 'multiarch-dispatch.h')
-rw-r--r--multiarch-dispatch.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/multiarch-dispatch.h b/multiarch-dispatch.h
index 51d724a..f6c2cef 100644
--- a/multiarch-dispatch.h
+++ b/multiarch-dispatch.h
@@ -20,6 +20,49 @@
#define _multiarch_defined_arm
#endif
+/* Undefine some interfering definitions (not built-ins) */
+/* We can only redefine value 1, so we let it fail with other values */
+#if x86_64 == 1
+#define _multiarch_defined_x86_64
+#undef x86_64
+#endif
+#if ppc64 == 1
+#define _multiarch_defined_ppc64
+#undef ppc64
+#endif
+#if ppc == 1
+#define _multiarch_defined_ppc
+#undef ppc
+#endif
+#if sparc64 == 1
+#define _multiarch_defined_sparc64
+#undef sparc64
+#endif
+#if s390x == 1
+#define _multiarch_defined_s390x
+#undef s390x
+#endif
+#if s390 == 1
+#define _multiarch_defined_s390
+#undef s390
+#endif
+#if ia64 == 1
+#define _multiarch_defined_ia64
+#undef ia64
+#endif
+#if alpha == 1
+#define _multiarch_defined_alpha
+#undef alpha
+#endif
+#if mipsel == 1
+#define _multiarch_defined_mipsel
+#undef mipsel
+#endif
+#if armeb == 1
+#define _multiarch_defined_armeb
+#undef armeb
+#endif
+
/* Dispatch arch dependent header */
#if defined(__linux__)
#define _MULTIARCH_OS linux
@@ -85,3 +128,45 @@
#undef _multiarch_defined_arm
#define arm 1
#endif
+
+/* Redefine interfering defitions */
+#ifdef _multiarch_defined_x86_64
+#undef _multiarch_defined_x86_64
+#define x86_64 1
+#endif
+#ifdef _multiarch_defined_ppc64
+#undef _multiarch_defined_ppc64
+#define ppc64 1
+#endif
+#ifdef _multiarch_defined_ppc
+#undef _multiarch_defined_ppc
+#define ppc 1
+#endif
+#ifdef _multiarch_defined_sparc64
+#undef _multiarch_defined_sparc64
+#define sparc64 1
+#endif
+#ifdef _multiarch_defined_s390x
+#undef _multiarch_defined_s390x
+#define s390x 1
+#endif
+#ifdef _multiarch_defined_s390
+#undef _multiarch_defined_s390
+#define s390 1
+#endif
+#ifdef _multiarch_defined_ia64
+#undef _multiarch_defined_ia64
+#define ia64 1
+#endif
+#ifdef _multiarch_defined_alpha
+#undef _multiarch_defined_alpha
+#define alpha 1
+#endif
+#ifdef _multiarch_defined_mipsel
+#undef _multiarch_defined_mipsel
+#define mipsel 1
+#endif
+#ifdef _multiarch_defined_armeb
+#undef _multiarch_defined_armeb
+#define armeb 1
+#endif