aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-04-27 12:03:33 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-05-01 17:11:29 +0200
commitee33a893f0514344b44536576bb5f0c714d4c423 (patch)
tree9ed1d3b0bdbf65bba99397323937fe9787048a61
parente517edeb7cac6ecda0a951b776fae8d640df5fb2 (diff)
downloadsparse-dev-ee33a893f0514344b44536576bb5f0c714d4c423.tar.gz
use also __x86_64 when __x86_64__ is used
Since both __x86_64__ and __x86_64 are valid use both of them to detect the x86-64 arch and define them both when built on x86-64. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Acked-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
-rw-r--r--lib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index 37766d30..2bfe8ab5 100644
--- a/lib.c
+++ b/lib.c
@@ -285,7 +285,7 @@ enum {
#ifdef __LP64__
#define ARCH_M64_DEFAULT ARCH_LP64
-#elif defined(__x86_64__)
+#elif defined(__x86_64__) || defined(__x86_64)
#define ARCH_M64_DEFAULT ARCH_X32
#else
#define ARCH_M64_DEFAULT ARCH_LP32
@@ -477,8 +477,9 @@ static void handle_arch_m64_finalize(void)
pointer_alignment = 8;
/* fall through */
case_x86_64:
-#ifdef __x86_64__
+#if defined(__x86_64__) || defined(__x86_64)
add_pre_buffer("#weak_define __x86_64__ 1\n");
+ add_pre_buffer("#weak_define __x86_64 1\n");
#endif
break;
}