Commit 84c6873b authored by unknown's avatar unknown

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.
parent 281c85a3
......@@ -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;
};
......
......@@ -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;
}
......
......@@ -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,
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment