#! /bin/sh /usr/share/dpatch/dpatch-run ## 10_gcc4_compile-fixes.dpatch by Jens Peter Secher ## ## DP: Avoid problems with anonymous types, see also ## DP: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20589 . @DPATCH@ diff -urNad --exclude=CVS --exclude=.svn ./iterhash.h /tmp/dpep-work.kJMPta/libcrypto++-5.2.1/iterhash.h --- ./iterhash.h 2005-07-31 01:37:41.000000000 +0200 +++ /tmp/dpep-work.kJMPta/libcrypto++-5.2.1/iterhash.h 2005-07-31 01:38:39.100001152 +0200 @@ -88,7 +88,7 @@ : public ClonableImpl, T_Transform> > { public: - enum {DIGESTSIZE = T_DigestSize}; + enum GCC4FIX2 {DIGESTSIZE = T_DigestSize}; unsigned int DigestSize() const {return DIGESTSIZE;}; protected: diff -urNad --exclude=CVS --exclude=.svn ./lubyrack.h /tmp/dpep-work.kJMPta/libcrypto++-5.2.1/lubyrack.h --- ./lubyrack.h 2005-07-31 01:37:41.000000000 +0200 +++ /tmp/dpep-work.kJMPta/libcrypto++-5.2.1/lubyrack.h 2005-07-31 01:38:39.101001000 +0200 @@ -38,7 +38,7 @@ } protected: - enum {S=T::DIGESTSIZE}; + enum GCC4FIX4 {S=T::DIGESTSIZE}; unsigned int L; // key length / 2 SecByteBlock key; diff -urNad --exclude=CVS --exclude=.svn ./seckey.h /tmp/dpep-work.kJMPta/libcrypto++-5.2.1/seckey.h --- ./seckey.h 2005-07-31 01:37:41.000000000 +0200 +++ /tmp/dpep-work.kJMPta/libcrypto++-5.2.1/seckey.h 2005-07-31 01:40:04.980945264 +0200 @@ -21,7 +21,7 @@ class FixedBlockSize { public: - enum {BLOCKSIZE = N}; + enum GCC4FIX0 {BLOCKSIZE = N}; }; // ************** rounds *************** @@ -31,7 +31,7 @@ class FixedRounds { public: - enum {ROUNDS = R}; + enum GCC4FIX1 {ROUNDS = R}; protected: template @@ -50,7 +50,7 @@ class VariableRounds { public: - enum {DEFAULT_ROUNDS = D, MIN_ROUNDS = N, MAX_ROUNDS = M}; + enum GCC4FIX3 {DEFAULT_ROUNDS = D, MIN_ROUNDS = N, MAX_ROUNDS = M}; static unsigned int StaticGetDefaultRounds(unsigned int keylength) {return DEFAULT_ROUNDS;} protected: #! /bin/sh /usr/share/dpatch/dpatch-run ## 15_gcc4_template_instatiation_fixes.dpatch by Jens Peter Secher ## ## DP: Avoid problems with template instatiation. @DPATCH@ diff -urNad --exclude=CVS --exclude=.svn ./dll.cpp /tmp/dpep-work.r5hvim/libcrypto++-5.2.1/dll.cpp --- ./dll.cpp 2004-06-20 11:22:24.000000000 +0200 +++ /tmp/dpep-work.r5hvim/libcrypto++-5.2.1/dll.cpp 2005-07-30 22:10:10.420609464 +0200 @@ -1,6 +1,6 @@ // dll.cpp - written and placed in the public domain by Wei Dai -#define CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES +#undef CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES #define CRYPTOPP_DEFAULT_NO_DLL #include "dll.h" @@ -37,6 +37,79 @@ CRYPTOPP_DLL_TEMPLATE_CLASS AbstractEuclideanDomain; #endif +#if defined(__GNUC__) && __GNUC__ > 3 +template class CRYPTOPP_DLL AbstractEuclideanDomain; +template class CRYPTOPP_DLL AbstractEuclideanDomain; +template class CRYPTOPP_DLL AbstractGroup; +template class CRYPTOPP_DLL AbstractGroup; +template class CRYPTOPP_DLL AbstractGroup; +template class CRYPTOPP_DLL AbstractGroup; +template class CRYPTOPP_DLL AbstractPolicyHolder, RandomNumberGenerator> >; +template class CRYPTOPP_DLL AbstractRing; +template class CRYPTOPP_DLL AbstractRing; +template class CRYPTOPP_DLL AdditiveCipherTemplate<>; +template class CRYPTOPP_DLL AdditiveCipherTemplate >; +template class CRYPTOPP_DLL AdditiveCipherTemplate >; +template class CRYPTOPP_DLL AllocatorWithCleanup; +template class CRYPTOPP_DLL AllocatorWithCleanup; +template class CRYPTOPP_DLL AllocatorWithCleanup; +template class CRYPTOPP_DLL AutoSeededX917RNG; +template class CRYPTOPP_DLL CFB_CipherTemplate >; +template class CRYPTOPP_DLL CFB_CipherTemplate >; +template class CRYPTOPP_DLL CFB_DecryptionTemplate<>; +template class CRYPTOPP_DLL CFB_DecryptionTemplate >; +template class CRYPTOPP_DLL CFB_EncryptionTemplate<>; +template class CRYPTOPP_DLL CFB_EncryptionTemplate >; +template class CRYPTOPP_DLL CipherModeFinalTemplate_ExternalCipher; +template class CRYPTOPP_DLL CipherModeFinalTemplate_ExternalCipher; +template class CRYPTOPP_DLL CipherModeFinalTemplate_ExternalCipher; +template class CRYPTOPP_DLL CipherModeFinalTemplate_ExternalCipher; +template class CRYPTOPP_DLL CipherModeFinalTemplate_ExternalCipher; +template class CRYPTOPP_DLL DH_Domain; +template class CRYPTOPP_DLL DL_Algorithm_GDSA; +template class CRYPTOPP_DLL DL_Algorithm_GDSA; +template class CRYPTOPP_DLL DL_Algorithm_GDSA; +template class CRYPTOPP_DLL DL_FixedBasePrecomputationImpl; +template class CRYPTOPP_DLL DL_FixedBasePrecomputationImpl; +template class CRYPTOPP_DLL DL_FixedBasePrecomputationImpl; +template class CRYPTOPP_DLL DL_GroupParameters; +template class CRYPTOPP_DLL DL_GroupParameters_EC; +template class CRYPTOPP_DLL DL_GroupParameters_EC; +template class CRYPTOPP_DLL DL_GroupParameters_IntegerBasedImpl; +template class CRYPTOPP_DLL DL_GroupPrecomputation; +template class CRYPTOPP_DLL DL_GroupPrecomputation; +template class CRYPTOPP_DLL DL_PrivateKeyImpl >; +template class CRYPTOPP_DLL DL_PrivateKeyImpl >; +template class CRYPTOPP_DLL DL_PrivateKey_EC; +template class CRYPTOPP_DLL DL_PrivateKey_EC; +template class CRYPTOPP_DLL DL_PrivateKey_GFP; +template class CRYPTOPP_DLL DL_PrivateKey_WithSignaturePairwiseConsistencyTest, ECDSA >; +template class CRYPTOPP_DLL DL_PrivateKey_WithSignaturePairwiseConsistencyTest, ECDSA >; +template class CRYPTOPP_DLL DL_PrivateKey_WithSignaturePairwiseConsistencyTest, DSA>; +template class CRYPTOPP_DLL DL_PublicKeyImpl >; +template class CRYPTOPP_DLL DL_PublicKeyImpl >; +template class CRYPTOPP_DLL DL_PublicKey_EC; +template class CRYPTOPP_DLL DL_PublicKey_EC; +template class CRYPTOPP_DLL DL_PublicKey_GFP; +template class CRYPTOPP_DLL EuclideanDomainOf; +template class CRYPTOPP_DLL IteratedHashBase; +template class CRYPTOPP_DLL IteratedHashBase; +#ifdef WORD64_AVAILABLE +template class CRYPTOPP_DLL IteratedHashBase; +template class CRYPTOPP_DLL IteratedHashBase; +#endif +template class CRYPTOPP_DLL OAEP; +#ifdef CRYPTOPP_IS_DLL +template class CRYPTOPP_DLL PKCS_DigestDecoration; +#endif +template class CRYPTOPP_DLL QuotientRing >; +template class CRYPTOPP_DLL SimpleKeyedTransformation; +template class CRYPTOPP_DLL SimpleKeyedTransformation; +template class CRYPTOPP_DLL SimpleKeyedTransformation; +template class CRYPTOPP_DLL StringSinkTemplate; +template class CRYPTOPP_DLL TwoBases; +#endif // __GNUC__ > 3 + template<> const byte PKCS_DigestDecoration::decoration[] = {0x30,0x21,0x30,0x09,0x06,0x05,0x2B,0x0E,0x03,0x02,0x1A,0x05,0x00,0x04,0x14}; template<> const unsigned int PKCS_DigestDecoration::length = sizeof(PKCS_DigestDecoration::decoration);