mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-07 15:08:27 +01:00
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>
This commit is contained in:
parent
2633712387
commit
23e6fbf571
3 changed files with 11 additions and 20 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue