diff options
author | B Stack <bgstack15@gmail.com> | 2019-10-17 15:59:39 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-10-17 15:59:39 -0400 |
commit | 5b604dd360ffc162f163962ccb2b1af109a5f93f (patch) | |
tree | 65292208a81994782e1c16dd84dfcdcc221d0cd7 /zen/build_info.h | |
parent | Merge branch '10.16' into 'master' (diff) | |
download | FreeFileSync-5b604dd360ffc162f163962ccb2b1af109a5f93f.tar.gz FreeFileSync-5b604dd360ffc162f163962ccb2b1af109a5f93f.tar.bz2 FreeFileSync-5b604dd360ffc162f163962ccb2b1af109a5f93f.zip |
add upstream 10.17
Diffstat (limited to 'zen/build_info.h')
-rw-r--r-- | zen/build_info.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/zen/build_info.h b/zen/build_info.h index e80f3721..01f1aeb8 100644 --- a/zen/build_info.h +++ b/zen/build_info.h @@ -7,20 +7,24 @@ #ifndef BUILD_INFO_H_5928539285603428657 #define BUILD_INFO_H_5928539285603428657 -//determine build info: defines ZEN_BUILD_32BIT or ZEN_BUILD_64BIT + #include <bit> //std::endian + +#define ZEN_ARCH_32BIT 32 +#define ZEN_ARCH_64BIT 64 #ifdef __LP64__ - #define ZEN_BUILD_64BIT + #define ZEN_BUILD_ARCH ZEN_ARCH_64BIT #else - #define ZEN_BUILD_32BIT + #define ZEN_BUILD_ARCH ZEN_ARCH_32BIT #endif -#ifdef ZEN_BUILD_32BIT - static_assert(sizeof(void*) == 4); -#endif +static_assert(ZEN_BUILD_ARCH == sizeof(void*) * 8); + +//-------------------------------------------------------------------- -#ifdef ZEN_BUILD_64BIT - static_assert(sizeof(void*) == 8); -#endif +constexpr bool usingLittleEndian() +{ + return std::endian::native == std::endian::little; +} #endif //BUILD_INFO_H_5928539285603428657 |