[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/utils/lib/CryptoPP.h
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/utils/lib/CryptoPP.h |
Date: |
Fri, 02 Dec 2005 07:01:46 -0500 |
Index: mldonkey/src/utils/lib/CryptoPP.h
diff -u mldonkey/src/utils/lib/CryptoPP.h:1.3
mldonkey/src/utils/lib/CryptoPP.h:1.4
--- mldonkey/src/utils/lib/CryptoPP.h:1.3 Wed Nov 30 23:46:25 2005
+++ mldonkey/src/utils/lib/CryptoPP.h Fri Dec 2 12:01:44 2005
@@ -272,7 +272,10 @@
// CodeWarrior defines _MSC_VER
#if !defined(CRYPTOPP_DISABLE_X86ASM) && ((defined(_MSC_VER) &&
!defined(__MWERKS__) && defined(_M_IX86)) || (defined(__GNUC__) &&
defined(__i386__)))
-#define CRYPTOPP_X86ASM_AVAILABLE
+ // The x86 version of MacOSX fails when asm is enabled.
+ #if !defined(__i386__) || !defined(__APPLE__)
+ #define CRYPTOPP_X86ASM_AVAILABLE
+ #endif
#endif
// ***************** determine availability of OS features ********************
@@ -1920,7 +1923,7 @@
template <class T>
inline unsigned int GetAlignment(T* /* dummy */ = NULL) // VC60
workaround
{
-#if (_MSC_VER >= 1300)
+#if defined(_MSC_VER) and (_MSC_VER >= 1300)
return __alignof(T);
#elif defined(__GNUC__)
return __alignof__(T);
@@ -2717,8 +2720,8 @@
class SecBlock
{
public:
- explicit SecBlock(unsigned int size=0)
- : m_size(size) {m_ptr = m_alloc.allocate(size, NULL);}
+ explicit SecBlock(unsigned int blocksize=0)
+ : m_size(blocksize) {m_ptr = m_alloc.allocate(blocksize, NULL);}
SecBlock(const SecBlock<T, A> &t)
: m_size(t.m_size) {m_ptr = m_alloc.allocate(m_size, NULL);
memcpy(m_ptr, t.m_ptr, m_size*sizeof(T));}
SecBlock(const T *t, unsigned int len)
@@ -2935,7 +2938,7 @@
#endif
// SSE2 intrinsics work in GCC 3.3 or later
-#if defined(__SSE2__) && (__GNUC_MAJOR__ > 3 || __GNUC_MINOR__ > 2)
+#if defined(__SSE2__) && (__GNUC__ > 3 || __GNUC_MINOR__ > 2)
#define SSE2_INTRINSICS_AVAILABLE
#endif
@@ -3599,9 +3602,9 @@
typedef int RandomizationParameter;
typedef Integer Element;
- ModularArithmetic(const Integer &modulus = Integer::One())
+ ModularArithmetic(const Integer &mod = Integer::One())
: AbstractRing<Integer>(),
- modulus(modulus), result((word)0, modulus.reg.size()) {}
+ modulus(mod), result((word)0, modulus.reg.size()) {}
ModularArithmetic(const ModularArithmetic &ma)
: AbstractRing<Integer>(),
@@ -4077,9 +4080,9 @@
{
Assign((const byte *)data, data ? strlen(data) : 0, deepCopy);
}
- ConstByteArrayParameter(const byte *data, unsigned int size, bool
deepCopy = false)
+ ConstByteArrayParameter(const byte *data, unsigned int datasize, bool
deepCopy = false)
{
- Assign(data, size, deepCopy);
+ Assign(data, datasize, deepCopy);
}
template <class T> ConstByteArrayParameter(const T &string, bool
deepCopy = false)
{
@@ -4087,14 +4090,14 @@
Assign((const byte *)string.data(), string.size(), deepCopy);
}
- void Assign(const byte *data, unsigned int size, bool deepCopy)
+ void Assign(const byte *data, unsigned int datasize, bool deepCopy)
{
if (deepCopy)
- m_block.Assign(data, size);
+ m_block.Assign(data, datasize);
else
{
m_data = data;
- m_size = size;
+ m_size = datasize;
}
m_deepCopy = deepCopy;
}
@@ -4113,8 +4116,8 @@
class ByteArrayParameter
{
public:
- ByteArrayParameter(byte *data = NULL, unsigned int size = 0)
- : m_data(data), m_size(size) {}
+ ByteArrayParameter(byte *data = NULL, unsigned int datasize = 0)
+ : m_data(data), m_size(datasize) {}
ByteArrayParameter(SecByteBlock &block)
: m_data(block.begin()), m_size(block.size()) {}
- [Mldonkey-commits] Changes to mldonkey/src/utils/lib/CryptoPP.h,
mldonkey-commits <=