Commit c90926e0 authored by unknown's avatar unknown
Browse files

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 0b2ae60c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
};


+5 −4
Original line number Diff line number Diff line
@@ -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;
}


+4 −0
Original line number Diff line number Diff line
@@ -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,
+4 −3
Original line number Diff line number Diff line
@@ -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;
}