Add compile-time option for architecture mode

This allows to decode x86-32 machine code on a 64-bit platform (but
not vice versa). As a side-effect, we also get rid of pointer-size
detection for architecture selection.
This commit is contained in:
Alexis Engelke
2018-12-25 17:06:47 +01:00
parent a3f77dbf49
commit ca54ca7422
4 changed files with 10 additions and 6 deletions

View File

@@ -5,6 +5,10 @@
#include <stddef.h>
#include <stdint.h>
#if defined(ARCH_X86_64) && __SIZEOF_POINTER__ < 8
#error "Decoding x86-64 requires a 64-bit architecture"
#endif
#ifndef ssize_t
#define ssize_t intptr_t
#endif