diff options
author | Anssi Hannula <anssi@mandriva.org> | 2010-01-24 12:50:54 +0000 |
---|---|---|
committer | Anssi Hannula <anssi@mandriva.org> | 2010-01-24 12:50:54 +0000 |
commit | e69e9cb4ca6e1289a34fd13491027d888184a737 (patch) | |
tree | 3a8577d1501790225224247d6f7db5d9a986889b | |
parent | 9bb5ff20f343fd212c521b47fc84d0099696e7da (diff) | |
download | multiarch-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-- | NEWS | 2 | ||||
-rw-r--r-- | multiarch-dispatch.h | 85 |
2 files changed, 87 insertions, 0 deletions
@@ -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 |