From 22d55b9f0d56c5998290878d5ab56b76b0544aa6 Mon Sep 17 00:00:00 2001 From: David Lichteblau Date: Mon, 12 Nov 2012 16:11:28 +0100 Subject: [PATCH] LLP64: replace uses of sizeof(long) where pointer size is meant Thanks to Anton Kovalenko. --- src/runtime/backtrace.c | 2 +- src/runtime/coreparse.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/backtrace.c b/src/runtime/backtrace.c index 8345837..e5b02a1 100644 --- a/src/runtime/backtrace.c +++ b/src/runtime/backtrace.c @@ -304,7 +304,7 @@ stack_pointer_p (void *p) /* we are using sizeof(long) here, because that is the right value on both * x86 and x86-64. (But note that false positives would not cause much harm * given the heuristical nature of x86_call_context.) */ - unsigned long stack_alignment = sizeof(long); + unsigned long stack_alignment = sizeof(void*); return (altstack_pointer_p(p) || (p < (void *) arch_os_get_current_thread()->control_stack_end diff --git a/src/runtime/coreparse.c b/src/runtime/coreparse.c index 9dc3157..c3006c5 100644 --- a/src/runtime/coreparse.c +++ b/src/runtime/coreparse.c @@ -477,7 +477,7 @@ load_core_file(char *file, os_vm_offset_t file_offset) ptr, #ifndef LISP_FEATURE_ALPHA remaining_len / (sizeof(struct ndir_entry) / - sizeof(long)), + sizeof(lispobj)), #else remaining_len / (sizeof(struct ndir_entry) / sizeof(u32)), -- 1.7.10.4