From ddb8f36e8894a3bce7daeca0815fb0137de73388 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 15 Apr 2023 18:21:03 -0400 Subject: Fix use of for MSVC (GH #1198) It seems Microsoft now defines GCC defines, like __BMI__ --- config_ver.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'config_ver.h') 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 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 -- cgit v1.2.1