-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cryptopp] clang-cl: fix compilation with cryptopp/gzip.h (#40679)
Co-authored-by: Cheney Wang <[email protected]>
- Loading branch information
1 parent
1595890
commit a01cae2
Showing
5 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/secblock.h b/secblock.h | ||
index 5ab920f9..74d939cf 100644 | ||
--- a/secblock.h | ||
+++ b/secblock.h | ||
@@ -270,7 +270,7 @@ public: | ||
/// \details VS.NET STL enforces the policy of "All STL-compliant allocators | ||
/// have to provide a template class member called rebind". | ||
template <class V> struct rebind { typedef AllocatorWithCleanup<V, T_Align16> other; }; | ||
-#if (CRYPTOPP_MSC_VERSION >= 1500) | ||
+#if (CRYPTOPP_MSC_VERSION >= 1500) || defined(__clang__) | ||
AllocatorWithCleanup() {} | ||
template <class V, bool A> AllocatorWithCleanup(const AllocatorWithCleanup<V, A> &) {} | ||
#endif | ||
diff --git a/zdeflate.cpp b/zdeflate.cpp | ||
index b3514b55..20717c24 100644 | ||
--- a/zdeflate.cpp | ||
+++ b/zdeflate.cpp | ||
@@ -413,7 +413,7 @@ unsigned int Deflator::LongestMatch(unsigned int &bestMatch) const | ||
{ | ||
CRYPTOPP_ASSERT(scan[2] == match[2]); | ||
unsigned int len = (unsigned int)( | ||
-#if defined(_STDEXT_BEGIN) && !(defined(CRYPTOPP_MSC_VERSION) && (CRYPTOPP_MSC_VERSION < 1400 || CRYPTOPP_MSC_VERSION >= 1600)) && !defined(_STLPORT_VERSION) | ||
+#if defined(_STDEXT_BEGIN) && !(defined(CRYPTOPP_MSC_VERSION) && (CRYPTOPP_MSC_VERSION < 1400 || CRYPTOPP_MSC_VERSION >= 1600)) && !defined(_STLPORT_VERSION) && !defined(__clang__) | ||
stdext::unchecked_mismatch | ||
#else | ||
std::mismatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters