summaryrefslogtreecommitdiff
path: root/config_ver.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2023-04-15 18:21:03 -0400
committerJeffrey Walton <noloader@gmail.com>2023-04-15 18:21:03 -0400
commitddb8f36e8894a3bce7daeca0815fb0137de73388 (patch)
tree2db9cb4c53c63323da064f21461b63dbcd982013 /config_ver.h
parentf5f63850f9a5521e45de3cc45be61309a2e71ab2 (diff)
downloadcryptopp-git-ddb8f36e8894a3bce7daeca0815fb0137de73388.tar.gz
Fix use of <x86intrin.h> for MSVC (GH #1198)
It seems Microsoft now defines GCC defines, like __BMI__
Diffstat (limited to 'config_ver.h')
-rw-r--r--config_ver.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/config_ver.h b/config_ver.h
index c28abb86..a771de44 100644
--- a/config_ver.h
+++ b/config_ver.h
@@ -87,4 +87,10 @@
# define CRYPTOPP_MSC_VERSION (_MSC_VER)
#endif
+// To control <x86intrin.h> include. May need a guard, like GCC 4.5 and above
+// Also see https://stackoverflow.com/a/42493893 and https://github.com/weidai11/cryptopp/issues/1198
+#if defined(CRYPTOPP_GCC_VERSION) || defined(CRYPTOPP_APPLE_CLANG_VERSION) || defined(CRYPTOPP_LLVM_CLANG_VERSION)
+# define CRYPTOPP_GCC_COMPATIBLE 1
+#endif
+
#endif // CRYPTOPP_CONFIG_VERSION_H