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/common/android/include/elf.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/common/android') diff --git a/src/common/android/include/elf.h b/src/common/android/include/elf.h index b2a28df4..e6f0c672 100644 --- a/src/common/android/include/elf.h +++ b/src/common/android/include/elf.h @@ -109,17 +109,6 @@ typedef struct { } Elf64_Dyn; -// __WORDSIZE is GLibc-specific and used by Google Breakpad on Linux. -#ifndef __WORDSIZE -#if defined(__i386__) || defined(__ARM_EABI__) || defined(__mips__) -#define __WORDSIZE 32 -#elif defined(__x86_64__) || defined(__aarch64__) -#define __WORDSIZE 64 -#else -#error "Unsupported Android CPU ABI" -#endif -#endif - // The Android headers don't always define this constant. #ifndef EM_X86_64 #define EM_X86_64 62 -- cgit v1.2.1