summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorunknown <svoj@mysql.com>2005-05-06 20:54:38 +0500
committerunknown <svoj@mysql.com>2005-05-06 20:54:38 +0500
commitc90926e055034da93c7b96b68e7fbb95b89179a2 (patch)
tree21d3c75ceb478d0d0deb7a314efb1f4884de311b /extra
parent0b2ae60c6220b01411a293c5a439605b2672a50b (diff)
downloadmariadb-git-c90926e055034da93c7b96b68e7fbb95b89179a2.tar.gz
Fix FC3 yaSSL compilation problem.
This fix is about WL#2286 - Compile MySQL w/YASSL support extra/yassl/include/yassl_int.hpp: Use instance as static class member to fix FC compilation problem. extra/yassl/src/yassl_int.cpp: Remove local static variable, use static class member instead. extra/yassl/taocrypt/include/integer.hpp: Use instance as static class member to fix FC compilation problem. extra/yassl/taocrypt/src/integer.cpp: Remove local static variable, use static class member instead.
Diffstat (limited to 'extra')
-rw-r--r--extra/yassl/include/yassl_int.hpp2
-rw-r--r--extra/yassl/src/yassl_int.cpp9
-rw-r--r--extra/yassl/taocrypt/include/integer.hpp4
-rw-r--r--extra/yassl/taocrypt/src/integer.cpp7
4 files changed, 15 insertions, 7 deletions
diff --git a/extra/yassl/include/yassl_int.hpp b/extra/yassl/include/yassl_int.hpp
index fa13baf1ac2..02895d3897b 100644
--- a/extra/yassl/include/yassl_int.hpp
+++ b/extra/yassl/include/yassl_int.hpp
@@ -122,6 +122,7 @@ public:
friend sslFactory& GetSSL_Factory(); // singleton creator
private:
+ static sslFactory instance;
sslFactory(const sslFactory&); // hide copy
sslFactory& operator=(const sslFactory&); // and assign
};
@@ -208,6 +209,7 @@ public:
private:
Sessions(const Sessions&); // hide copy
Sessions& operator=(const Sessions&); // and assign
+ static Sessions instance;
};
diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp
index 4cc2b85fccc..c552cfa7189 100644
--- a/extra/yassl/src/yassl_int.cpp
+++ b/extra/yassl/src/yassl_int.cpp
@@ -1346,17 +1346,18 @@ SSL_SESSION::~SSL_SESSION()
}
+Sessions Sessions::instance; // simple singleton
+
Sessions& GetSessions()
{
- static Sessions instance; // simple singleton
- return instance;
+ return Sessions::instance;
}
+sslFactory sslFactory::instance;
sslFactory& GetSSL_Factory()
{
- static sslFactory instance; // simple singleton
- return instance;
+ return sslFactory::instance;
}
diff --git a/extra/yassl/taocrypt/include/integer.hpp b/extra/yassl/taocrypt/include/integer.hpp
index 1706b4c0eea..94383f8061d 100644
--- a/extra/yassl/taocrypt/include/integer.hpp
+++ b/extra/yassl/taocrypt/include/integer.hpp
@@ -258,6 +258,10 @@ private:
Integer(word value, unsigned int length);
+ static const Integer zero;
+ static const Integer one;
+ static const Integer two;
+
int PositiveCompare(const Integer& t) const;
friend void PositiveAdd(Integer& sum, const Integer& a, const Integer& b);
friend void PositiveSubtract(Integer& diff, const Integer& a,
diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp
index c95170722ae..9be0a25b363 100644
--- a/extra/yassl/taocrypt/src/integer.cpp
+++ b/extra/yassl/taocrypt/src/integer.cpp
@@ -2844,23 +2844,24 @@ unsigned int Integer::Encode(byte* output, unsigned int outputLen,
}
+const Integer Integer::zero(1,2);
+
const Integer &Integer::Zero()
{
- static const Integer zero;
return zero;
}
+const Integer Integer::one(1,2);
const Integer &Integer::One()
{
- static const Integer one(1,2);
return one;
}
+const Integer Integer::two(1,2);
const Integer &Integer::Two()
{
- static const Integer two(2,2);
return two;
}