diff options
author | B. Stack <bgstack15@gmail.com> | 2022-05-22 17:03:17 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-05-22 17:03:17 -0400 |
commit | 2c81be72eef5363736cf1892646c74a3311ee4c1 (patch) | |
tree | 3894ba7e10c78750c195381a861da5e8166a6bfd /zen/build_info.h | |
parent | Merge branch 'b11.20' into 'master' (diff) | |
download | FreeFileSync-b11.21.tar.gz FreeFileSync-b11.21.tar.bz2 FreeFileSync-b11.21.zip |
add upstream 11.21b11.21
Diffstat (limited to 'zen/build_info.h')
-rw-r--r-- | zen/build_info.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/zen/build_info.h b/zen/build_info.h index 5a1d1635..b06c1302 100644 --- a/zen/build_info.h +++ b/zen/build_info.h @@ -8,25 +8,25 @@ #define BUILD_INFO_H_5928539285603428657 -#define ZEN_ARCH_32BIT 32 -#define ZEN_ARCH_64BIT 64 - #ifdef __LP64__ - #define ZEN_BUILD_ARCH ZEN_ARCH_64BIT - #else - #define ZEN_BUILD_ARCH ZEN_ARCH_32BIT - #endif +namespace zen +{ +enum class BuildArch +{ + bit32, + bit64, -static_assert(ZEN_BUILD_ARCH == sizeof(void*) * 8); +#ifdef __LP64__ + program = bit64 +#else + program = bit32 +#endif +}; +static_assert((BuildArch::program == BuildArch::bit32 ? 32 : 64) == sizeof(void*) * 8); -namespace zen -{ - #if ZEN_BUILD_ARCH == ZEN_ARCH_32BIT - const char cpuArchName[] = "i686"; - #else - const char cpuArchName[] = "x86-64"; - #endif + +constexpr const char* cpuArchName = BuildArch::program == BuildArch::bit32 ? "i686": "x86-64"; } |