forked from beerpsi/chuniio-brokenithm
use a standard way to determine 32-bit/64-bit environment
This commit is contained in:
parent
db9ac578e3
commit
1bb616e1ec
@ -5,20 +5,14 @@
|
||||
#ifndef BROKENITHM_ARCH_H
|
||||
#define BROKENITHM_ARCH_H
|
||||
|
||||
#if _WIN32 || _WIN64
|
||||
#if _WIN64
|
||||
#define ENV64BIT
|
||||
#else
|
||||
#define ENV32BIT
|
||||
#endif // _WIN64
|
||||
#endif // _WIN32 || _WIN64
|
||||
#include <stdint.h>
|
||||
|
||||
#if __GNUC__
|
||||
#if __x86_64__ || __ppc64__
|
||||
#define ENV64BIT
|
||||
#if UINTPTR_MAX == UINT32_MAX
|
||||
#define ENV32BIT
|
||||
#elif UINTPTR_MAX == UINT64_MAX
|
||||
#define ENV64BIT
|
||||
#else
|
||||
#define ENV32BIT
|
||||
#endif // __x86_64__ || __ppc64__
|
||||
#error "Environment is neither 32-bit nor 64-bit."
|
||||
#endif
|
||||
|
||||
#endif // BROKENITHM_ARCH_H
|
||||
|
Loading…
Reference in New Issue
Block a user