diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2019-10-28 23:21:40 +0000 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2019-10-28 23:21:40 +0000 |
commit | 8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7 (patch) | |
tree | 65292208a81994782e1c16dd84dfcdcc221d0cd7 /zen/build_info.h | |
parent | Merge branch '10.16' into 'master' (diff) | |
parent | add upstream 10.17 (diff) | |
download | FreeFileSync-8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7.tar.gz FreeFileSync-8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7.tar.bz2 FreeFileSync-8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7.zip |
Merge branch '10.17' into 'master'10.17
10.17
See merge request opensource-tracking/FreeFileSync!14
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 |