https://issues.shibboleth.net/jira/browse/CPPOST-66
[shibboleth/cpp-opensaml.git] / saml / internal.h
index 21df6fd..2946c10 100644 (file)
@@ -41,6 +41,8 @@
 
 #include <limits.h>
 
+using namespace xercesc;
+
 // C99 defines LLONG_MIN, LLONG_MAX and ULLONG_MAX, but this part of
 // C99 is not yet included into the C++ standard.
 // GCC defines LONG_LONG_MIN, LONG_LONG_MAX and ULONG_LONG_MAX.
 #if SIZEOF_TIME_T == 8
 # define SAMLTIME_MAX LLONG_MAX
 #elif SIZEOF_TIME_T == 4
-# define SAMLTIME_MAX LONG_MAX
+# define SAMLTIME_MAX INT_MAX
 #endif
 
 #define SAML_LOGCAT "OpenSAML"
 
+namespace xmltooling {
+    class XMLTOOL_API Mutex;
+};
+
 namespace opensaml {
     
     /// @cond OFF
-    class SAMLInternalConfig : public SAMLConfig
+    class SAML_DLLLOCAL SAMLInternalConfig : public SAMLConfig
     {
     public:
-        SAMLInternalConfig() {}
+        SAMLInternalConfig();
+        ~SAMLInternalConfig();
 
         static SAMLInternalConfig& getInternalConfig();
 
@@ -96,10 +103,11 @@ namespace opensaml {
         void generateRandomBytes(std::string& buf, unsigned int len);
         XMLCh* generateIdentifier();
         std::string hashSHA1(const char* data, bool toHex=false);
+
     private:
+        int m_initCount;
+        xmltooling::Mutex* m_lock;
     };
-
-    void log_openssl();
     /// @endcond
 
 };