LLP64: replace uses of sizeof(long) where pointer size is meant
authorDavid Lichteblau <david@lichteblau.com>
Mon, 12 Nov 2012 15:11:28 +0000 (16:11 +0100)
committerDavid Lichteblau <david@lichteblau.com>
Tue, 20 Nov 2012 14:01:26 +0000 (15:01 +0100)
Thanks to Anton Kovalenko.

src/runtime/backtrace.c
src/runtime/coreparse.c

index 8345837..e5b02a1 100644 (file)
@@ -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
index 9dc3157..c3006c5 100644 (file)
@@ -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)),