summaryrefslogtreecommitdiff
path: root/config_ver.h
diff options
context:
space:
mode:
Diffstat (limited to 'config_ver.h')
-rw-r--r--config_ver.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/config_ver.h b/config_ver.h
index f61ac11c..84f52723 100644
--- a/config_ver.h
+++ b/config_ver.h
@@ -26,7 +26,7 @@
// Compiler version macros
-#ifdef __GNUC__
+#if defined(__GNUC__)
# define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#endif
@@ -37,8 +37,10 @@
// Apple and LLVM's Clang. Apple Clang version 7.0 roughly equals LLVM Clang version 3.7
// Also see https://gist.github.com/yamaya/2924292
#if defined(__clang__) && defined(__apple_build_version__)
+# undef CRYPTOPP_GCC_VERSION
# define CRYPTOPP_APPLE_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
#elif defined(__clang__)
+# undef CRYPTOPP_GCC_VERSION
# define CRYPTOPP_LLVM_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
#endif