summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mandriva.org>2010-01-24 12:50:54 +0000
committerAnssi Hannula <anssi@mandriva.org>2010-01-24 12:50:54 +0000
commite69e9cb4ca6e1289a34fd13491027d888184a737 (patch)
tree3a8577d1501790225224247d6f7db5d9a986889b
parent9bb5ff20f343fd212c521b47fc84d0099696e7da (diff)
downloadmultiarch-utils-e69e9cb4ca6e1289a34fd13491027d888184a737.tar
multiarch-utils-e69e9cb4ca6e1289a34fd13491027d888184a737.tar.gz
multiarch-utils-e69e9cb4ca6e1289a34fd13491027d888184a737.tar.bz2
multiarch-utils-e69e9cb4ca6e1289a34fd13491027d888184a737.tar.xz
multiarch-utils-e69e9cb4ca6e1289a34fd13491027d888184a737.zip
Add additional guards for some interfering definitions in
multiarch-dispatch.h (reported by Jérôme Brenier). This still does not handle everything, but is better than before. Now it works when compiling with -Dx86_64.
-rw-r--r--NEWS2
-rw-r--r--multiarch-dispatch.h85
2 files changed, 87 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index fc87b9e..f01e450 100644
--- a/NEWS
+++ b/NEWS
@@ -3,3 +3,5 @@
- fix broken check for rpm/macros.d directory (from Per Øyvind Karlsen)
- add mips support (from Arnaud Patard)
- add armel support (from Arnaud Patard)
+- add additional guards for some interfering definitions in
+ multiarch-dispatch.h (reported by Jérôme Brenier)
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