diff --git a/lib/config/configcompiler.cpp b/lib/config/configcompiler.cpp index 6b5f3a3ca..1f56306c1 100644 --- a/lib/config/configcompiler.cpp +++ b/lib/config/configcompiler.cpp @@ -27,7 +27,7 @@ #include #ifdef _WIN32 -#include "Shlwapi.h" +# include #endif /* _WIN32 */ using namespace icinga; @@ -354,3 +354,14 @@ bool ConfigCompiler::HasZoneConfigAuthority(const String& zoneName) return !empty; } + + +bool ConfigCompiler::IsAbsolutePath(const String& path) +{ +#ifndef _WIN32 + return (path.GetLength() > 0 && path[0] == '/'); +#else /* _WIN32 */ + return !PathIsRelative(path.CStr()); +#endif /* _WIN32 */ +} + diff --git a/lib/config/configcompiler.hpp b/lib/config/configcompiler.hpp index 472fa2330..94ae967bd 100644 --- a/lib/config/configcompiler.hpp +++ b/lib/config/configcompiler.hpp @@ -127,14 +127,6 @@ public: static bool HasZoneConfigAuthority(const String& zoneName); - static inline bool IsAbsolutePath(const String& path) { -#ifndef _WIN32 - return (path.GetLength() > 0 && path[0] == '/'); -#else - return !PathIsRelative(path.CStr()); -#endif /* _WIN32 */ - } - private: boost::promise > m_Promise; @@ -154,6 +146,8 @@ private: static void HandleIncludeZone(const String& relativeBase, const String& tag, const String& path, const String& pattern, const String& package, std::vector& expressions); + static bool IsAbsolutePath(const String& path); + public: bool m_Eof; int m_OpenBraces;