diff options
author | Jeffrey Walton <noloader@gmail.com> | 2023-04-15 18:21:03 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2023-04-15 18:21:03 -0400 |
commit | ddb8f36e8894a3bce7daeca0815fb0137de73388 (patch) | |
tree | 2db9cb4c53c63323da064f21461b63dbcd982013 /config_ver.h | |
parent | f5f63850f9a5521e45de3cc45be61309a2e71ab2 (diff) | |
download | cryptopp-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.h | 6 |
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
|