aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-02-07 21:04:22 +0100
committerChristopher Li <sparse@chrisli.org>2017-02-13 09:34:45 +0800
commit84e7bd4a455f228adb4b7d882965c8786fbe65ca (patch)
treefc6d3055871482f0e2ed708af3de7fee14693dea
parent741d343b25781b4f9d62da6ca2fd402dfab52a2e (diff)
downloadsparse-dev-84e7bd4a455f228adb4b7d882965c8786fbe65ca.tar.gz
define __LP64__ & _LP64 if arch_m64 is enabled
They're part of GCC's common predefined macros and some code & header files depend on them. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r--lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index a2820237..a801d8c1 100644
--- a/lib.c
+++ b/lib.c
@@ -405,6 +405,8 @@ static void handle_arch_m64_finalize(void)
pointer_alignment = 8;
size_t_ctype = &ulong_ctype;
ssize_t_ctype = &long_ctype;
+ add_pre_buffer("#weak_define __LP64__ 1\n");
+ add_pre_buffer("#weak_define _LP64 1\n");
#ifdef __x86_64__
add_pre_buffer("#weak_define __x86_64__ 1\n");
#endif