diff options
author | Ryan Phillips <rphillips@gentoo.org> | 2004-04-30 17:43:41 +0000 |
---|---|---|
committer | Ryan Phillips <rphillips@gentoo.org> | 2004-04-30 17:43:41 +0000 |
commit | d57fb2172b9f046a98b131910679446911bf725e (patch) | |
tree | 8f74fd08c277d062a3eb6efdc240c2921dcf9e93 /dev-libs/crypto++/files | |
parent | Version bumped. Added lynxkeymap IUSE flag. Thanks to Tom Martin <tom@edgeoft... (diff) | |
download | gentoo-2-d57fb2172b9f046a98b131910679446911bf725e.tar.gz gentoo-2-d57fb2172b9f046a98b131910679446911bf725e.tar.bz2 gentoo-2-d57fb2172b9f046a98b131910679446911bf725e.zip |
Added Thomas Weidner's GCC 3.4 patch and AMD64 patch
Diffstat (limited to 'dev-libs/crypto++/files')
-rw-r--r-- | dev-libs/crypto++/files/crypto++-5.1-amd64.diff | 78 | ||||
-rw-r--r-- | dev-libs/crypto++/files/digest-crypto++-5.1-r1 | 1 |
2 files changed, 79 insertions, 0 deletions
diff --git a/dev-libs/crypto++/files/crypto++-5.1-amd64.diff b/dev-libs/crypto++/files/crypto++-5.1-amd64.diff new file mode 100644 index 000000000000..783007335b2b --- /dev/null +++ b/dev-libs/crypto++/files/crypto++-5.1-amd64.diff @@ -0,0 +1,78 @@ +Only in crypto++-5.1.amd64/: adhoc.cpp +diff -ru crypto++-5.1/config.h crypto++-5.1.amd64/config.h +--- crypto++-5.1/config.h 2003-03-20 02:24:11.000000000 +0100 ++++ crypto++-5.1.amd64/config.h 2004-04-26 15:37:37.000000000 +0200 +@@ -100,7 +100,7 @@ + NAMESPACE_BEGIN(CryptoPP)
+
+ typedef unsigned short word16;
+-#if defined(__alpha) && !defined(_MSC_VER)
++#if (defined(__alpha) || defined(__x86_64__)) && !defined(_MSC_VER)
+ typedef unsigned int word32;
+ #else
+ typedef unsigned long word32;
+@@ -124,7 +124,7 @@ + // word should have the same size as your CPU registers
+ // dword should be twice as big as word
+
+-#if (defined(__GNUC__) && !defined(__alpha)) || defined(__MWERKS__)
++#if (defined(__GNUC__) && !defined(__alpha)) && !defined(__x86_64__) || defined(__MWERKS__)
+ typedef unsigned long word;
+ typedef unsigned long long dword;
+ #elif defined(_MSC_VER) || defined(__BCPLUSPLUS__)
+diff -ru crypto++-5.1/misc.cpp crypto++-5.1.amd64/misc.cpp +--- crypto++-5.1/misc.cpp 2002-10-04 19:31:51.000000000 +0200 ++++ crypto++-5.1.amd64/misc.cpp 2004-04-26 15:37:37.000000000 +0200 +@@ -16,7 +16,7 @@ +
+ void xorbuf(byte *buf, const byte *mask, unsigned int count)
+ {
+- if (((unsigned int)buf | (unsigned int)mask | count) % WORD_SIZE == 0)
++ if (((uintptr_t)buf | (uintptr_t)mask | count) % WORD_SIZE == 0)
+ XorWords((word *)buf, (const word *)mask, count/WORD_SIZE);
+ else
+ {
+@@ -27,7 +27,7 @@ +
+ void xorbuf(byte *output, const byte *input, const byte *mask, unsigned int count)
+ {
+- if (((unsigned int)output | (unsigned int)input | (unsigned int)mask | count) % WORD_SIZE == 0)
++ if (((uintptr_t)output | (uintptr_t)input | (uintptr_t)mask | count) % WORD_SIZE == 0)
+ XorWords((word *)output, (const word *)input, (const word *)mask, count/WORD_SIZE);
+ else
+ {
+diff -ru crypto++-5.1/misc.h crypto++-5.1.amd64/misc.h +--- crypto++-5.1/misc.h 2002-10-04 19:31:52.000000000 +0200 ++++ crypto++-5.1.amd64/misc.h 2004-04-26 15:37:37.000000000 +0200 +@@ -5,6 +5,7 @@ + #include "cryptlib.h"
+ #include <assert.h>
+ #include <string.h> // CodeWarrior doesn't have memory.h
++#include <inttypes.h>
+ #include <algorithm>
+ #include <string>
+
+@@ -142,7 +143,7 @@ +
+ inline bool IsAlignedOn(const void *p, unsigned int alignment)
+ {
+- return IsPowerOf2(alignment) ? ModPowerOf2((unsigned int)p, alignment) == 0 : (unsigned int)p % alignment == 0;
++ return IsPowerOf2(alignment) ? ModPowerOf2((uintptr_t)p, alignment) == 0 : (uintptr_t)p % alignment == 0;
+ }
+
+ template <class T>
+diff -ru crypto++-5.1/serpent.cpp crypto++-5.1.amd64/serpent.cpp +--- crypto++-5.1/serpent.cpp 2002-10-04 19:31:57.000000000 +0200 ++++ crypto++-5.1.amd64/serpent.cpp 2004-04-26 15:38:39.000000000 +0200 +@@ -428,7 +428,9 @@ + word32 *k = m_key;
+ GetUserKey(LITTLE_ENDIAN_ORDER, k, 8, userKey, keylen);
+
+- word32 i,a,b,c,d,e;
++ word32 a,b,c,d,e;
++ // word32 is an unsigned integral type,so it will underflow
++ int i;
+
+ if (keylen < 32)
+ k[keylen/4] |= word32(1) << ((keylen%4)*8);
+Only in crypto++-5.1.amd64/: serpent.cpp~ diff --git a/dev-libs/crypto++/files/digest-crypto++-5.1-r1 b/dev-libs/crypto++/files/digest-crypto++-5.1-r1 index d3625c273a47..728b5fb0cdba 100644 --- a/dev-libs/crypto++/files/digest-crypto++-5.1-r1 +++ b/dev-libs/crypto++/files/digest-crypto++-5.1-r1 @@ -1 +1,2 @@ MD5 f4bfd4ac39dc1b7f0764d61a1ec4df16 crypto51.zip 829560 +MD5 70790a6dea63b6a02f1b1d3b5d26ae1a crypto++-gcc-3.4.diff.bz2 13033 |