diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2004-07-03 01:20:11 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2004-07-03 01:20:11 +0000 |
commit | e844cb79246824fb345f5c9a41f2369979ef6185 (patch) | |
tree | b9be61377a42dc73c1ed4980ce7070d3498c440a | |
parent | 52d12ac9a7018fb659b4f6cc11c35559d57cbf0b (diff) | |
download | cryptopp-e844cb79246824fb345f5c9a41f2369979ef6185.tar.gz |
allow compile with STLport again
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@182 57ff6487-cd31-0410-9ec3-f628ee90f5f0
-rw-r--r-- | config.h | 6 | ||||
-rw-r--r-- | ida.cpp | 8 | ||||
-rw-r--r-- | zdeflate.cpp | 2 |
3 files changed, 10 insertions, 6 deletions
@@ -177,7 +177,11 @@ NAMESPACE_END # pragma warning(disable: 4231 4250 4251 4275 4660 4661 4786 4355) #endif -#if !(defined(_MSC_VER) && _MSC_VER <= 1300) && !defined(__MWERKS__) +#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || defined(_STLPORT_VERSION) +#define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION +#endif + +#ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION #define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE #endif @@ -391,13 +391,13 @@ unsigned int PaddingRemover::Put2(const byte *begin, unsigned int length, int me m_possiblePadding = false; } -#if defined(_MSC_VER) && !defined(__MWERKS__) +#if defined(_MSC_VER) && !defined(__MWERKS__) && (_MSC_VER < 1300) // VC60 workaround: built-in reverse_iterator has two template parameters, Dinkumware only has one - typedef reverse_bidirectional_iterator<const byte *, const byte> rit; + typedef reverse_bidirectional_iterator<const byte *, const byte> RevIt; #else - typedef reverse_iterator<const byte *> rit; + typedef reverse_iterator<const byte *> RevIt; #endif - const byte *x = find_if(rit(end), rit(begin), bind2nd(not_equal_to<byte>(), 0)).base(); + const byte *x = find_if(RevIt(end), RevIt(begin), bind2nd(not_equal_to<byte>(), 0)).base(); if (x != begin && *(x-1) == 1) { AttachedTransformation()->Put(begin, x-begin-1); diff --git a/zdeflate.cpp b/zdeflate.cpp index b0e9f4b..a5a8daf 100644 --- a/zdeflate.cpp +++ b/zdeflate.cpp @@ -628,7 +628,7 @@ void Deflator::EncodeBlock(bool eof, unsigned int blockType) { if (blockType == DYNAMIC) { -#if defined(_MSC_VER) && !defined(__MWERKS__) +#if defined(_MSC_VER) && !defined(__MWERKS__) && (_MSC_VER < 1300) // VC60 workaround: built-in reverse_iterator has two template parameters, Dinkumware only has one typedef reverse_bidirectional_iterator<unsigned int *, unsigned int> RevIt; #else |