From e69e9cb4ca6e1289a34fd13491027d888184a737 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sun, 24 Jan 2010 12:50:54 +0000 Subject: =?UTF-8?q?Add=20additional=20guards=20for=20some=20interfering=20?= =?UTF-8?q?definitions=20in=20multiarch-dispatch.h=20(reported=20by=20J?= =?UTF-8?q?=C3=A9r=C3=B4me=20Brenier).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This still does not handle everything, but is better than before. Now it works when compiling with -Dx86_64. --- NEWS | 2 ++ multiarch-dispatch.h | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) 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 -- cgit v1.2.1