From 23e6fbf571a6638ce9642fc1f50baf1af0f54268 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 16 Mar 2020 23:08:02 -0700 Subject: Use ULONG_MAX instead of __WORDSIZE to determine native ELF architecture __WORDSIZE is an internal libc definition. Instead, we can use ULONG_MAX from limits.h, whose value corresponds to the machine's native word size. This allows us to remove the fallback definition of __WORDSIZE in the Android compatibility headers. Bug: google-breakpad:631 Change-Id: I7b9e6f3b2121f78ccad9e32bf26acac518aefd8f Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2107100 Reviewed-by: Mike Frysinger --- src/tools/linux/md2core/minidump-2-core.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/tools') diff --git a/src/tools/linux/md2core/minidump-2-core.cc b/src/tools/linux/md2core/minidump-2-core.cc index 941586e9..a60be323 100644 --- a/src/tools/linux/md2core/minidump-2-core.cc +++ b/src/tools/linux/md2core/minidump-2-core.cc @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -54,7 +55,7 @@ #include "third_party/lss/linux_syscall_support.h" #include "tools/linux/md2core/minidump_memory_range.h" -#if __WORDSIZE == 64 +#if ULONG_MAX == 0xffffffffffffffff #define ELF_CLASS ELFCLASS64 #else #define ELF_CLASS ELFCLASS32 -- cgit v1.2.1