openbsd-ports/devel/cryptopp/patches/patch-secblock_h

33 lines
1.3 KiB
Plaintext

$OpenBSD: patch-secblock_h,v 1.3 2012/02/29 12:46:30 dcoppa Exp $
--- secblock.h.orig Fri Aug 6 18:46:20 2010
+++ secblock.h Wed Feb 29 10:10:22 2012
@@ -88,7 +88,7 @@ class AllocatorWithCleanup : public AllocatorBase<T> (
pointer allocate(size_type n, const void * = NULL)
{
- CheckSize(n);
+ this->CheckSize(n);
if (n == 0)
return NULL;
@@ -120,7 +120,7 @@ class AllocatorWithCleanup : public AllocatorBase<T> (
// VS.NET STL enforces the policy of "All STL-compliant allocators have to provide a
// template class member called rebind".
template <class U> struct rebind { typedef AllocatorWithCleanup<U, T_Align16> other; };
-#if _MSC_VER >= 1500
+#if defined(_MSC_VER) && _MSC_VER >= 1500
AllocatorWithCleanup() {}
template <class U, bool A> AllocatorWithCleanup(const AllocatorWithCleanup<U, A> &) {}
#endif
@@ -243,8 +243,8 @@ class SecBlock (public)
typedef typename A::const_pointer const_iterator;
typedef typename A::size_type size_type;
- explicit SecBlock(size_type size=0)
- : m_size(size) {m_ptr = m_alloc.allocate(size, NULL);}
+ explicit SecBlock(size_type sz=0)
+ : m_size(sz) {m_ptr = m_alloc.allocate(sz, NULL);}
SecBlock(const SecBlock<T, A> &t)
: m_size(t.m_size) {m_ptr = m_alloc.allocate(m_size, NULL); memcpy_s(m_ptr, m_size*sizeof(T), t.m_ptr, m_size*sizeof(T));}
SecBlock(const T *t, size_type len)