Windows build fix.

This commit is contained in:
Gunnar Beutner 2013-10-10 23:06:28 +02:00
parent 28c69c21ad
commit 1b0977a512
9 changed files with 32 additions and 4 deletions

View File

@ -1414,7 +1414,11 @@ void ClusterListener::MessageHandler(const Endpoint::Ptr& sender, const Dictiona
Log(LogInformation, "cluster", "Processing config update for identity '" + identity + "'.");
String dir = GetClusterDir() + "config/" + SHA256(identity);
#ifndef _WIN32
if (mkdir(dir.CStr(), 0700) < 0 && errno != EEXIST) {
#else /*_ WIN32 */
if (mkdir(dir.CStr()) < 0 && errno != EEXIST) {
#endif /* _WIN32 */
BOOST_THROW_EXCEPTION(posix_error()
<< boost::errinfo_api_function("localtime")
<< boost::errinfo_errno(errno));

View File

@ -62,6 +62,8 @@
<ClCompile Include="unixsocket.cpp" />
<ClCompile Include="utility.cpp" />
<ClCompile Include="value.cpp" />
<ClCompile Include="workqueue.cpp" />
<ClCompile Include="zlibstream.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="application.h" />
@ -112,6 +114,8 @@
<ClInclude Include="utility.h" />
<ClInclude Include="value.h" />
<ClInclude Include="win32.h" />
<ClInclude Include="workqueue.h" />
<ClInclude Include="zlibstream.h" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />

View File

@ -127,6 +127,12 @@
<ClCompile Include="threadpool.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="workqueue.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="zlibstream.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="application.h">
@ -273,6 +279,12 @@
<ClInclude Include="debug.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="workqueue.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="zlibstream.h">
<Filter>Headerdateien</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Quelldateien">

View File

@ -26,7 +26,7 @@
namespace icinga {
class StdioStream : public Stream
class I2_BASE_API StdioStream : public Stream
{
public:
DECLARE_PTR_TYPEDEFS(StdioStream);

View File

@ -36,7 +36,7 @@ namespace icinga
shared_ptr<SSL_CTX> I2_BASE_API MakeSSLContext(const String& pubkey, const String& privkey, const String& cakey);
String I2_BASE_API GetCertificateCN(const shared_ptr<X509>& certificate);
shared_ptr<X509> I2_BASE_API GetX509Certificate(const String& pemfile);
String SHA256(const String& s);
String I2_BASE_API SHA256(const String& s);
class I2_BASE_API openssl_error : virtual public std::exception, virtual public boost::exception { };

View File

@ -28,7 +28,7 @@
namespace icinga {
class ZlibStream : public Stream
class I2_BASE_API ZlibStream : public Stream
{
public:
DECLARE_PTR_TYPEDEFS(ZlibStream);

View File

@ -69,7 +69,7 @@ void ServiceDbObject::StaticInitialize(void)
Service::OnEventCommandExecuted.connect(bind(&ServiceDbObject::AddEventHandlerHistory, _1));
ExternalCommandProcessor::OnNewExternalCommand.connect(bind(&ServiceDbObject::AddExternalCommandHistory, _1, _2, _3));
ExternalCommandProcessor::OnNewExternalCommand.connect(boost::bind(&ServiceDbObject::AddExternalCommandHistory, _1, _2, _3));
}
ServiceDbObject::ServiceDbObject(const DbType::Ptr& type, const String& name1, const String& name2)

View File

@ -25,6 +25,7 @@
<ClCompile Include="cib.cpp" />
<ClCompile Include="command.cpp" />
<ClCompile Include="compatutility.cpp" />
<ClCompile Include="domain.cpp" />
<ClCompile Include="eventcommand.cpp" />
<ClCompile Include="externalcommandprocessor.cpp" />
<ClCompile Include="host.cpp" />
@ -65,6 +66,7 @@
<ClInclude Include="cib.h" />
<ClInclude Include="command.h" />
<ClInclude Include="compatutility.h" />
<ClInclude Include="domain.h" />
<ClInclude Include="eventcommand.h" />
<ClInclude Include="externalcommandprocessor.h" />
<ClInclude Include="host.h" />

View File

@ -100,6 +100,9 @@
<ClCompile Include="service-event.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="domain.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="i2-icinga.h">
@ -183,6 +186,9 @@
<ClInclude Include="perfdatawriter.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="domain.h">
<Filter>Headerdateien</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Headerdateien">