1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 15_gcc4_template_instatiation_fixes.dpatch by Jens Peter Secher <jps@debian.org>
4
## DP: Avoid problems with template instatiation.
7
diff -urNad libcrypto++-5.2.1c2~/dll.cpp libcrypto++-5.2.1c2/dll.cpp
8
--- libcrypto++-5.2.1c2~/dll.cpp 2005-09-26 20:11:11.000000000 +0200
9
+++ libcrypto++-5.2.1c2/dll.cpp 2005-09-26 21:29:24.000000000 +0200
11
// dll.cpp - written and placed in the public domain by Wei Dai
13
-#define CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES
14
+#if defined( __GNUC__ ) && __GNUC__ > 3
15
+# undef CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES
17
+# define CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES
19
#define CRYPTOPP_DEFAULT_NO_DLL
23
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractEuclideanDomain<Integer>;
26
+#if defined(__GNUC__) && __GNUC__ > 3
27
+template class CRYPTOPP_DLL AbstractEuclideanDomain<Integer>;
28
+template class CRYPTOPP_DLL AbstractEuclideanDomain<PolynomialMod2>;
29
+template class CRYPTOPP_DLL AbstractGroup<Integer>;
30
+template class CRYPTOPP_DLL AbstractGroup<EC2NPoint>;
31
+template class CRYPTOPP_DLL AbstractGroup<ECPPoint>;
32
+template class CRYPTOPP_DLL AbstractGroup<PolynomialMod2>;
33
+template class CRYPTOPP_DLL AbstractPolicyHolder<AdditiveCipherAbstractPolicy, TwoBases<SimpleKeyedTransformation<StreamTransformation>, RandomNumberGenerator> >;
34
+template class CRYPTOPP_DLL AbstractRing<Integer>;
35
+template class CRYPTOPP_DLL AbstractRing<PolynomialMod2>;
36
+template class CRYPTOPP_DLL AdditiveCipherTemplate<>;
37
+template class CRYPTOPP_DLL AdditiveCipherTemplate<AbstractPolicyHolder<AdditiveCipherAbstractPolicy, CTR_ModePolicy> >;
38
+template class CRYPTOPP_DLL AdditiveCipherTemplate<AbstractPolicyHolder<AdditiveCipherAbstractPolicy, OFB_ModePolicy> >;
39
+template class CRYPTOPP_DLL AllocatorWithCleanup<byte>;
40
+template class CRYPTOPP_DLL AllocatorWithCleanup<word16>;
41
+template class CRYPTOPP_DLL AllocatorWithCleanup<word32>;
42
+template class CRYPTOPP_DLL AutoSeededX917RNG<DES_EDE3>;
43
+template class CRYPTOPP_DLL CFB_CipherTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, CFB_ModePolicy> >;
44
+template class CRYPTOPP_DLL CFB_CipherTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, SymmetricCipher> >;
45
+template class CRYPTOPP_DLL CFB_DecryptionTemplate<>;
46
+template class CRYPTOPP_DLL CFB_DecryptionTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, CFB_ModePolicy> >;
47
+template class CRYPTOPP_DLL CFB_EncryptionTemplate<>;
48
+template class CRYPTOPP_DLL CFB_EncryptionTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, CFB_ModePolicy> >;
49
+template class CRYPTOPP_DLL CipherModeFinalTemplate_ExternalCipher<CBC_CTS_Decryption>;
50
+template class CRYPTOPP_DLL CipherModeFinalTemplate_ExternalCipher<CBC_CTS_Encryption>;
51
+template class CRYPTOPP_DLL CipherModeFinalTemplate_ExternalCipher<CBC_Decryption>;
52
+template class CRYPTOPP_DLL CipherModeFinalTemplate_ExternalCipher<CBC_Encryption>;
53
+template class CRYPTOPP_DLL CipherModeFinalTemplate_ExternalCipher<ECB_OneWay>;
54
+template class CRYPTOPP_DLL DH_Domain<DL_GroupParameters_GFP_DefaultSafePrime>;
55
+template class CRYPTOPP_DLL DL_Algorithm_GDSA<EC2N::Point>;
56
+template class CRYPTOPP_DLL DL_Algorithm_GDSA<ECP::Point>;
57
+template class CRYPTOPP_DLL DL_Algorithm_GDSA<Integer>;
58
+template class CRYPTOPP_DLL DL_FixedBasePrecomputationImpl<EC2N::Point>;
59
+template class CRYPTOPP_DLL DL_FixedBasePrecomputationImpl<ECPPoint>;
60
+template class CRYPTOPP_DLL DL_FixedBasePrecomputationImpl<Integer>;
61
+template class CRYPTOPP_DLL DL_GroupParameters<Integer>;
62
+template class CRYPTOPP_DLL DL_GroupParameters_EC<EC2N>;
63
+template class CRYPTOPP_DLL DL_GroupParameters_EC<ECP>;
64
+template class CRYPTOPP_DLL DL_GroupParameters_IntegerBasedImpl<ModExpPrecomputation>;
65
+template class CRYPTOPP_DLL DL_GroupPrecomputation<EC2N::Point>;
66
+template class CRYPTOPP_DLL DL_GroupPrecomputation<ECPPoint>;
67
+template class CRYPTOPP_DLL DL_PrivateKeyImpl<DL_GroupParameters_EC<EC2N> >;
68
+template class CRYPTOPP_DLL DL_PrivateKeyImpl<DL_GroupParameters_EC<ECP> >;
69
+template class CRYPTOPP_DLL DL_PrivateKey_EC<EC2N>;
70
+template class CRYPTOPP_DLL DL_PrivateKey_EC<ECP>;
71
+template class CRYPTOPP_DLL DL_PrivateKey_GFP<DL_GroupParameters_DSA>;
72
+template class CRYPTOPP_DLL DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_EC<EC2N>, ECDSA<EC2N> >;
73
+template class CRYPTOPP_DLL DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_EC<ECP>, ECDSA<ECP> >;
74
+template class CRYPTOPP_DLL DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_GFP<DL_GroupParameters_DSA>, DSA>;
75
+template class CRYPTOPP_DLL DL_PublicKeyImpl<DL_GroupParameters_EC<EC2N> >;
76
+template class CRYPTOPP_DLL DL_PublicKeyImpl<DL_GroupParameters_EC<ECP> >;
77
+template class CRYPTOPP_DLL DL_PublicKey_EC<EC2N>;
78
+template class CRYPTOPP_DLL DL_PublicKey_EC<ECP>;
79
+template class CRYPTOPP_DLL DL_PublicKey_GFP<DL_GroupParameters_DSA>;
80
+template class CRYPTOPP_DLL EuclideanDomainOf<PolynomialMod2>;
81
+template class CRYPTOPP_DLL IteratedHashBase<word32, HashTransformation>;
82
+template class CRYPTOPP_DLL IteratedHashBase<word32, MessageAuthenticationCode>;
83
+#ifdef WORD64_AVAILABLE
84
+template class CRYPTOPP_DLL IteratedHashBase<word64, HashTransformation>;
85
+template class CRYPTOPP_DLL IteratedHashBase<word64, MessageAuthenticationCode>;
87
+template class CRYPTOPP_DLL OAEP<SHA>;
88
+#ifdef CRYPTOPP_IS_DLL
89
+template class CRYPTOPP_DLL PKCS_DigestDecoration<SHA>;
91
+template class CRYPTOPP_DLL QuotientRing<EuclideanDomainOf<PolynomialMod2> >;
92
+template class CRYPTOPP_DLL SimpleKeyedTransformation<BlockTransformation>;
93
+template class CRYPTOPP_DLL SimpleKeyedTransformation<HashTransformation>;
94
+template class CRYPTOPP_DLL SimpleKeyedTransformation<StreamTransformation>;
95
+template class CRYPTOPP_DLL StringSinkTemplate<std::string>;
96
+template class CRYPTOPP_DLL TwoBases<SymmetricCipher, RandomNumberGenerator>;
97
+#endif // __GNUC__ > 3
99
template<> const byte PKCS_DigestDecoration<SHA>::decoration[] = {0x30,0x21,0x30,0x09,0x06,0x05,0x2B,0x0E,0x03,0x02,0x1A,0x05,0x00,0x04,0x14};
100
template<> const unsigned int PKCS_DigestDecoration<SHA>::length = sizeof(PKCS_DigestDecoration<SHA>::decoration);