diff options
author | Pavel Labath <labath@google.com> | 2016-01-11 12:38:28 -0500 |
---|---|---|
committer | Mark Mentovai <mark@chromium.org> | 2016-01-11 12:38:28 -0500 |
commit | a1784ae81f2941a8036a0ccc125ace4462674236 (patch) | |
tree | 04420fe04357ddc32256306154228ae606981914 /src/common/dwarf | |
parent | libdisasm: Don't depend on sizeof(void) (diff) | |
download | breakpad-a1784ae81f2941a8036a0ccc125ace4462674236.tar.xz |
Define intptr and uintptr in a more generic way
MSVC does not have the __PTRDIFF_TYPE__ macro defined, so I use the
standard [u]intptr_t types instead. Compilation tested on windows, linux
and mac.
BUG=
R=mark@chromium.org
Review URL: https://codereview.chromium.org/1571293003 .
Patch from Pavel Labath <labath@google.com>.
Diffstat (limited to 'src/common/dwarf')
-rw-r--r-- | src/common/dwarf/types.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/common/dwarf/types.h b/src/common/dwarf/types.h index 61ca4579..59dda316 100644 --- a/src/common/dwarf/types.h +++ b/src/common/dwarf/types.h @@ -45,11 +45,7 @@ typedef unsigned short uint16; typedef unsigned int uint32; typedef unsigned long long uint64; -#ifdef __PTRDIFF_TYPE__ -typedef __PTRDIFF_TYPE__ intptr; -typedef unsigned __PTRDIFF_TYPE__ uintptr; -#else -#error "Can't find pointer-sized integral types." -#endif +typedef intptr_t intptr; +typedef uintptr_t uintptr; #endif // _COMMON_DWARF_TYPES_H__ |