]> granicus.if.org Git - icinga2/commitdiff
Build fix for Windows
authorGunnar Beutner <gunnar@beutner.name>
Mon, 22 Dec 2014 13:14:16 +0000 (14:14 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 22 Dec 2014 13:14:16 +0000 (14:14 +0100)
lib/base/application.cpp
lib/base/scriptframe.cpp
lib/base/scriptframe.hpp

index 3bd1fac99206d84203867dd36c90f43d8872180a..7b511307ee007a005cd7a24a30d6f2944415f4cf 100644 (file)
@@ -506,6 +506,11 @@ void Application::DisplayBugMessage(std::ostream& os)
           << "***" << "\n";
 }
 
+String Application::GetCrashReportFilename(void)
+{
+       return GetLocalStateDir() + "/log/icinga2/crash/report." + Convert::ToString(Utility::GetTime());
+}
+
 #ifndef _WIN32
 /**
  * Signal handler for SIGINT and SIGTERM. Prepares the application for cleanly
@@ -539,11 +544,6 @@ void Application::SigUsr1Handler(int)
        RequestReopenLogs();
 }
 
-String Application::GetCrashReportFilename(void)
-{
-       return GetLocalStateDir() + "/log/icinga2/crash/report." + Convert::ToString(Utility::GetTime());
-}
-
 /**
  * Signal handler for SIGABRT. Helps with debugging ASSERT()s.
  *
index 58323e5dc40e297eb26a618fe55e489fc633393b..6632ac625d7d9160d708264149d1ce8f432a3881 100644 (file)
 using namespace icinga;
 
 boost::thread_specific_ptr<ScriptFrame *> ScriptFrame::m_CurrentFrame;
+
+ScriptFrame::ScriptFrame(void)
+       : Locals(new Dictionary()), Self(ScriptGlobal::GetGlobals())
+{
+       NextFrame = GetCurrentFrame();
+       SetCurrentFrame(this);
+}
+
+ScriptFrame::ScriptFrame(const Value& self)
+       : Locals(new Dictionary()), Self(self)
+{
+       NextFrame = GetCurrentFrame();
+       SetCurrentFrame(this);
+}
+
+ScriptFrame::~ScriptFrame(void)
+{
+       ASSERT(GetCurrentFrame() == this);
+       SetCurrentFrame(NextFrame);
+}
+
+ScriptFrame *ScriptFrame::GetCurrentFrame(void)
+{
+       ScriptFrame **pframe = m_CurrentFrame.get();
+
+       if (pframe)
+               return *pframe;
+       else
+               return NULL;
+}
+
+void ScriptFrame::SetCurrentFrame(ScriptFrame *frame)
+{
+       m_CurrentFrame.reset(new ScriptFrame *(frame));
+}
\ No newline at end of file
index 76bb53c24abc87129c3d83c5f73ac15ec87b1f08..120697a3ba2b92b0621887754ebfbc58a5c58cd7 100644 (file)
@@ -34,43 +34,16 @@ struct I2_BASE_API ScriptFrame
        Value Self;
        ScriptFrame *NextFrame;
 
-       ScriptFrame(void)
-               : Locals(new Dictionary()), Self(ScriptGlobal::GetGlobals())
-       {
-               NextFrame = GetCurrentFrame();
-               SetCurrentFrame(this);
-       }
+       ScriptFrame(void);
+       ScriptFrame(const Value& self);
+       ~ScriptFrame(void);
 
-       ScriptFrame(const Value& self)
-               : Locals(new Dictionary()), Self(self)
-       {
-               NextFrame = GetCurrentFrame();
-               SetCurrentFrame(this);
-       }
-
-       ~ScriptFrame(void)
-       {
-               ASSERT(GetCurrentFrame() == this);
-               SetCurrentFrame(NextFrame);
-       }
-
-       static inline ScriptFrame *GetCurrentFrame(void)
-       {
-               ScriptFrame **pframe = m_CurrentFrame.get();
-
-               if (pframe)
-                       return *pframe;
-               else
-                       return NULL;
-       }
+       static ScriptFrame *GetCurrentFrame(void);
 
 private:
        static boost::thread_specific_ptr<ScriptFrame *> m_CurrentFrame;
 
-       static inline void SetCurrentFrame(ScriptFrame *frame)
-       {
-               m_CurrentFrame.reset(new ScriptFrame *(frame));
-       }
+       static void SetCurrentFrame(ScriptFrame *frame);
 };
 
 }