summaryrefslogtreecommitdiff
path: root/zen/build_info.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-05-22 21:09:26 +0000
committerB. Stack <bgstack15@gmail.com>2022-05-22 21:09:26 +0000
commit54c2e44d7b37b2c3efc449e054eef21fa414dfde (patch)
tree3894ba7e10c78750c195381a861da5e8166a6bfd /zen/build_info.h
parentMerge branch 'b11.20' into 'master' (diff)
parentadd upstream 11.21 (diff)
downloadFreeFileSync-54c2e44d7b37b2c3efc449e054eef21fa414dfde.tar.gz
FreeFileSync-54c2e44d7b37b2c3efc449e054eef21fa414dfde.tar.bz2
FreeFileSync-54c2e44d7b37b2c3efc449e054eef21fa414dfde.zip
Merge branch 'b11.21' into 'master'11.21
add upstream 11.21 See merge request opensource-tracking/FreeFileSync!44
Diffstat (limited to 'zen/build_info.h')
-rw-r--r--zen/build_info.h30
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";
}
bgstack15