Windows build fix.

This commit is contained in:
Gunnar Beutner 2013-08-20 08:29:38 +02:00
parent 74822e929a
commit 82b3b81b91
13 changed files with 210 additions and 55 deletions

View File

@ -54,14 +54,8 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="aggregator.cpp" />
<ClCompile Include="avgaggregator.cpp" />
<ClCompile Include="countaggregator.cpp" />
<ClCompile Include="sumaggregator.cpp" />
<ClInclude Include="avgaggregator.cpp" />
<ClInclude Include="minaggregator.cpp" />
<ClInclude Include="maxaggregator.cpp" />
<ClInclude Include="stdaggregator.cpp" />
<ClInclude Include="invsumaggregator.cpp" />
<ClInclude Include="invavgaggregator.cpp" />
<ClCompile Include="andfilter.cpp" />
<ClCompile Include="attributefilter.cpp" />
<ClCompile Include="column.cpp" />
@ -75,13 +69,19 @@
<ClCompile Include="filter.cpp" />
<ClCompile Include="hostgroupstable.cpp" />
<ClCompile Include="hoststable.cpp" />
<ClCompile Include="invavgaggregator.cpp" />
<ClCompile Include="invsumaggregator.cpp" />
<ClCompile Include="livestatus-type.cpp" />
<ClCompile Include="maxaggregator.cpp" />
<ClCompile Include="minaggregator.cpp" />
<ClCompile Include="negatefilter.cpp" />
<ClCompile Include="orfilter.cpp" />
<ClCompile Include="query.cpp" />
<ClCompile Include="servicegroupstable.cpp" />
<ClCompile Include="servicestable.cpp" />
<ClCompile Include="statustable.cpp" />
<ClCompile Include="stdaggregator.cpp" />
<ClCompile Include="sumaggregator.cpp" />
<ClCompile Include="timeperiodstable.cpp" />
<ClCompile Include="logtable.cpp" />
<ClCompile Include="table.cpp" />
@ -250,4 +250,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -90,9 +90,6 @@
<ClInclude Include="column.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="servicegroupstable.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="servicestable.h">
<Filter>Headerdateien</Filter>
</ClInclude>
@ -105,6 +102,12 @@
<ClInclude Include="downtimestable.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="avgaggregator.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="servicegroupsstable.h">
<Filter>Headerdateien</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="component.cpp">
@ -146,27 +149,6 @@
<ClCompile Include="countaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="sumaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="avgaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="minaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="maxaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="stdaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="invavgaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="invsumaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="attributefilter.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
@ -203,10 +185,31 @@
<ClCompile Include="livestatus-type.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="avgaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="invavgaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="invsumaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="maxaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="minaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="stdaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="sumaggregator.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="livestatus-type.conf">
<Filter>Quelldateien</Filter>
</CustomBuild>
</ItemGroup>
</Project>
</Project>

View File

@ -23,11 +23,17 @@
<ClCompile Include="array.cpp" />
<ClCompile Include="attribute.cpp" />
<ClCompile Include="bufferedstream.cpp" />
<ClCompile Include="consolelogger.cpp" />
<ClCompile Include="convert.cpp" />
<ClCompile Include="dynamicobject.cpp" />
<ClCompile Include="dictionary.cpp" />
<ClCompile Include="dynamictype.cpp" />
<ClCompile Include="filelogger.cpp" />
<ClCompile Include="networkstream.cpp" />
<ClCompile Include="script.cpp" />
<ClCompile Include="scriptinterpreter.cpp" />
<ClCompile Include="scriptlanguage.cpp" />
<ClCompile Include="scriptvariable.cpp" />
<ClCompile Include="threadpool.cpp" />
<ClCompile Include="exception.cpp" />
<ClCompile Include="fifo.cpp" />
@ -62,11 +68,18 @@
<ClInclude Include="array.h" />
<ClInclude Include="attribute.h" />
<ClInclude Include="bufferedstream.h" />
<ClInclude Include="consolelogger.h" />
<ClInclude Include="convert.h" />
<ClInclude Include="dynamicobject.h" />
<ClInclude Include="dictionary.h" />
<ClInclude Include="dynamictype.h" />
<ClInclude Include="filelogger.h" />
<ClInclude Include="initialize.h" />
<ClInclude Include="networkstream.h" />
<ClInclude Include="script.h" />
<ClInclude Include="scriptinterpreter.h" />
<ClInclude Include="scriptlanguage.h" />
<ClInclude Include="scriptvariable.h" />
<ClInclude Include="threadpool.h" />
<ClInclude Include="fifo.h" />
<ClInclude Include="logger_fwd.h" />

View File

@ -100,10 +100,36 @@
<ClCompile Include="tlsutility.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="threadpool.cpp" />
<ClCompile Include="scriptfunctionwrapper.cpp" />
<ClCompile Include="bufferedstream.cpp" />
<ClCompile Include="networkstream.cpp" />
<ClCompile Include="bufferedstream.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="consolelogger.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="filelogger.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="networkstream.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="script.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="scriptfunctionwrapper.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="scriptinterpreter.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="scriptlanguage.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="scriptvariable.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="threadpool.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="application.h">
@ -217,10 +243,39 @@
<ClInclude Include="singleton.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="threadpool.h" />
<ClInclude Include="scriptfunctionwrapper.h" />
<ClInclude Include="bufferedstream.h" />
<ClInclude Include="networkstream.h" />
<ClInclude Include="threadpool.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="bufferedstream.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="consolelogger.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="filelogger.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="initialize.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="networkstream.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="script.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="scriptfunctionwrapper.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="scriptinterpreter.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="scriptlanguage.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="scriptvariable.h">
<Filter>Headerdateien</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Quelldateien">

View File

@ -32,7 +32,7 @@ namespace icinga
*
* @ingroup base
*/
class StackTrace
class I2_BASE_API StackTrace
{
public:
StackTrace(void);

View File

@ -29,9 +29,9 @@ namespace icinga
/**
* A command.
*
* @ingroup base
* @ingroup icinga
*/
class I2_BASE_API CheckCommand : public Command
class I2_ICINGA_API CheckCommand : public Command
{
public:
DECLARE_PTR_TYPEDEFS(CheckCommand);

View File

@ -33,9 +33,9 @@ namespace icinga
/**
* A command.
*
* @ingroup base
* @ingroup icinga
*/
class I2_BASE_API Command : public DynamicObject, public MacroResolver
class I2_ICINGA_API Command : public DynamicObject, public MacroResolver
{
public:
DECLARE_PTR_TYPEDEFS(Command);

View File

@ -277,7 +277,7 @@ Dictionary::Ptr CompatUtility::GetServiceStatusAttributes(const Service::Ptr& se
attr->Set("max_attempts", service->GetMaxCheckAttempts());
attr->Set("last_state_change", service->GetLastStateChange());
attr->Set("last_hard_state_change", service->GetLastHardStateChange());
attr->Set("last_update", time(NULL));
attr->Set("last_update", static_cast<long>(time(NULL)));
attr->Set("process_performance_data", 1); /* always enabled */
attr->Set("freshness_checks_enabled", 1); /* always enabled */
attr->Set("notifications_enabled", (service->GetEnableNotifications() ? 1 : 0));

View File

@ -29,9 +29,9 @@ namespace icinga
/**
* An event handler command.
*
* @ingroup base
* @ingroup icinga
*/
class I2_BASE_API EventCommand : public Command
class I2_ICINGA_API EventCommand : public Command
{
public:
DECLARE_PTR_TYPEDEFS(EventCommand);

View File

@ -20,9 +20,13 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="api.cpp" />
<ClCompile Include="checkcommand.cpp" />
<ClCompile Include="checkresultmessage.cpp" />
<ClCompile Include="cib.cpp" />
<ClCompile Include="command.cpp" />
<ClCompile Include="compatutility.cpp" />
<ClCompile Include="downtimemessage.cpp" />
<ClCompile Include="eventcommand.cpp" />
<ClCompile Include="externalcommandprocessor.cpp" />
<ClCompile Include="flappingmessage.cpp" />
<ClCompile Include="host.cpp" />
@ -38,11 +42,17 @@
<ClCompile Include="macroprocessor.cpp" />
<ClCompile Include="macroresolver.cpp" />
<ClCompile Include="notification.cpp" />
<ClCompile Include="notificationcommand.cpp" />
<ClCompile Include="notificationmessage.cpp" />
<ClCompile Include="notificationrequestmessage.cpp" />
<ClCompile Include="nulleventtask.cpp" />
<ClCompile Include="perfdatawriter.cpp" />
<ClCompile Include="pluginchecktask.cpp" />
<ClCompile Include="nullchecktask.cpp" />
<ClCompile Include="plugineventtask.cpp" />
<ClCompile Include="pluginnotificationtask.cpp" />
<ClCompile Include="service-event.cpp" />
<ClCompile Include="service-flapping.cpp" />
<ClCompile Include="service-notification.cpp" />
<ClCompile Include="service.cpp" />
<ClCompile Include="service-check.cpp" />
@ -55,9 +65,13 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="api.h" />
<ClInclude Include="checkcommand.h" />
<ClInclude Include="checkresultmessage.h" />
<ClInclude Include="cib.h" />
<ClInclude Include="command.h" />
<ClInclude Include="compatutility.h" />
<ClInclude Include="downtimemessage.h" />
<ClInclude Include="eventcommand.h" />
<ClInclude Include="externalcommandprocessor.h" />
<ClInclude Include="flappingmessage.h" />
<ClInclude Include="host.h" />
@ -68,10 +82,14 @@
<ClInclude Include="macroprocessor.h" />
<ClInclude Include="macroresolver.h" />
<ClInclude Include="notification.h" />
<ClInclude Include="notificationcommand.h" />
<ClInclude Include="notificationmessage.h" />
<ClInclude Include="notificationrequestmessage.h" />
<ClInclude Include="nulleventtask.h" />
<ClInclude Include="perfdatawriter.h" />
<ClInclude Include="pluginchecktask.h" />
<ClInclude Include="nullchecktask.h" />
<ClInclude Include="plugineventtask.h" />
<ClInclude Include="pluginnotificationtask.h" />
<ClInclude Include="service.h" />
<ClInclude Include="servicegroup.h" />
@ -250,4 +268,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -79,6 +79,42 @@
<ClCompile Include="timeperiod.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="checkcommand.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="service-flapping.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="command.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="compatutility.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="eventcommand.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="legacytimeperiod.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="macroresolver.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="notificationcommand.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="nulleventtask.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="perfdatawriter.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="plugineventtask.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="service-event.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="i2-icinga.h">
@ -147,6 +183,36 @@
<ClInclude Include="timeperiod.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="checkcommand.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="plugineventtask.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="command.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="compatutility.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="eventcommand.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="legacytimeperiod.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="macroresolver.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="notificationcommand.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="nulleventtask.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="perfdatawriter.h">
<Filter>Headerdateien</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Headerdateien">
@ -161,4 +227,4 @@
<Filter>Quelldateien</Filter>
</CustomBuild>
</ItemGroup>
</Project>
</Project>

View File

@ -324,7 +324,7 @@ bool LegacyTimePeriod::IsInDayDefinition(const String& daydef, tm *reference)
ParseTimeRange(daydef, &begin, &end, &stride, reference);
Log(LogDebug, "icinga", "ParseTimeRange: '" + daydef + "' => " + Convert::ToString(mktime(&begin)) + " -> " + Convert::ToString(mktime(&end)) + ", stride: " + Convert::ToString(stride));
Log(LogDebug, "icinga", "ParseTimeRange: '" + daydef + "' => " + Convert::ToString(static_cast<long>(mktime(&begin))) + " -> " + Convert::ToString(static_cast<long>(mktime(&end))) + ", stride: " + Convert::ToString(stride));
return IsInTimeRange(&begin, &end, stride, reference);
}
@ -393,7 +393,7 @@ Array::Ptr LegacyTimePeriod::ScriptFunc(const TimePeriod::Ptr& tp, double begin,
time_t refts = begin + i * 24 * 60 * 60;
tm reference;
Log(LogDebug, "icinga", "Checking reference time " + Convert::ToString(refts));
Log(LogDebug, "icinga", "Checking reference time " + Convert::ToString(static_cast<long>(refts)));
#ifdef _MSC_VER
tm *temp = localtime(&refts);

View File

@ -31,9 +31,9 @@ class Notification;
/**
* A notification command.
*
* @ingroup base
* @ingroup icinga
*/
class I2_BASE_API NotificationCommand : public Command
class I2_ICINGA_API NotificationCommand : public Command
{
public:
DECLARE_PTR_TYPEDEFS(NotificationCommand);