aboutsummaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-03-16 23:08:02 -0700
committerMike Frysinger <vapier@chromium.org>2020-03-17 06:30:52 +0000
commit23e6fbf571a6638ce9642fc1f50baf1af0f54268 (patch)
treec3ec1270f8769b6baf2eacbc029de6adbd9b6603 /src/tools
parentRoll src/src/third_party/lss/ f70e2f164..fd00dbbd0 (2 commits) (diff)
downloadbreakpad-23e6fbf571a6638ce9642fc1f50baf1af0f54268.tar.xz
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 <vapier@chromium.org>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/linux/md2core/minidump-2-core.cc3
1 files changed, 2 insertions, 1 deletions
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 <elf.h>
#include <errno.h>
+#include <limits.h>
#include <link.h>
#include <stdio.h>
#include <stdlib.h>
@@ -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