Module: check_mk
Branch: master
Commit: bc44dd8d6c265b092eecbb621245488448d42152
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bc44dd8d6c265b…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Mon Mar 19 13:18:18 2018 +0100
Win-agent: move Section.* to subdir sections
Also avoid relative include paths by providing the include path to
sections with the compiler option -I.
---
agents/windows/Makefile.am | 9 ++++----
agents/windows/SectionManager.cc | 36 ++++++++++++++++----------------
agents/windows/build_version | 2 +-
agents/windows/{ => sections}/Section.cc | 0
agents/windows/{ => sections}/Section.h | 0
agents/windows/test/stringutilTest.cc | 2 +-
6 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/agents/windows/Makefile.am b/agents/windows/Makefile.am
index f5b990c..53f5670 100644
--- a/agents/windows/Makefile.am
+++ b/agents/windows/Makefile.am
@@ -4,14 +4,15 @@ noinst_LIBRARIES = libcheck_mk_agent.a
noinst_PROGRAMS = MontyPython
AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -O2 -Wformat=2 -Werror -Wall -fno-rtti -std=c++17 -gdwarf-2 \
- -DCHECK_MK_VERSION='"$(VERSION)"'
-D__USE_MINGW_ANSI_STDIO -DSI_SUPPORT_IOSTREAMS
+AM_CPPFLAGS = -I$(top_srcdir)/sections -O2 -Wformat=2 -Werror -Wall -fno-rtti \
+ -std=c++17 -gdwarf-2 -DCHECK_MK_VERSION='"$(VERSION)"' \
+ -D__USE_MINGW_ANSI_STDIO -DSI_SUPPORT_IOSTREAMS
AM_LDFLAGS = -static -static-libgcc -static-libstdc++
LD_COMMON = -lwsock32 -lws2_32 -lole32 -loleaut32 -lwbemuuid -lpsapi -lshlwapi -limagehlp
-lstdc++fs
check_mk_agent_LDADD = check_mk_agent.res libcheck_mk_agent.a $(LD_COMMON)
-WindowsAgentTest_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/sections -I$(top_srcdir)/test
+WindowsAgentTest_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/test
WindowsAgentTest_LDADD = libcheck_mk_agent.a -lgtest -lgmock $(LD_COMMON)
wmitest_LDADD = $(LD_COMMON)
@@ -75,7 +76,6 @@ libcheck_mk_agent_a_SOURCES = \
PerfCounter.cc \
PerfCounterCommon.cc \
RotatingFileHandler.cc \
- Section.cc \
SectionManager.cc \
SettingsCollector.cc \
Thread.cc \
@@ -85,6 +85,7 @@ libcheck_mk_agent_a_SOURCES = \
types.cc \
win_error.cc \
wmiHelper.cc \
+ sections/Section.cc \
sections/SectionCheckMK.cc \
sections/SectionDF.cc \
sections/SectionEventlog.cc \
diff --git a/agents/windows/SectionManager.cc b/agents/windows/SectionManager.cc
index a361768..1f37d13 100644
--- a/agents/windows/SectionManager.cc
+++ b/agents/windows/SectionManager.cc
@@ -3,24 +3,24 @@
#include "Configuration.h"
#include "Environment.h"
#include "PerfCounterCommon.h"
-#include "sections/SectionCheckMK.h"
-#include "sections/SectionDF.h"
-#include "sections/SectionEventlog.h"
-#include "sections/SectionFileinfo.h"
-#include "sections/SectionGroup.h"
-#include "sections/SectionLogwatch.h"
-#include "sections/SectionMRPE.h"
-#include "sections/SectionMem.h"
-#include "sections/SectionOHM.h"
-#include "sections/SectionPS.h"
-#include "sections/SectionPluginGroup.h"
-#include "sections/SectionServices.h"
-#include "sections/SectionSkype.h"
-#include "sections/SectionSpool.h"
-#include "sections/SectionSystemtime.h"
-#include "sections/SectionUptime.h"
-#include "sections/SectionWMI.h"
-#include "sections/SectionWinperf.h"
+#include "SectionCheckMK.h"
+#include "SectionDF.h"
+#include "SectionEventlog.h"
+#include "SectionFileinfo.h"
+#include "SectionGroup.h"
+#include "SectionLogwatch.h"
+#include "SectionMRPE.h"
+#include "SectionMem.h"
+#include "SectionOHM.h"
+#include "SectionPS.h"
+#include "SectionPluginGroup.h"
+#include "SectionServices.h"
+#include "SectionSkype.h"
+#include "SectionSpool.h"
+#include "SectionSystemtime.h"
+#include "SectionUptime.h"
+#include "SectionWMI.h"
+#include "SectionWinperf.h"
namespace {
// Fix possible backwards incompatibility of section names by mapping
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 21e9912..02c434d 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-3188
+3190
diff --git a/agents/windows/Section.cc b/agents/windows/sections/Section.cc
similarity index 100%
rename from agents/windows/Section.cc
rename to agents/windows/sections/Section.cc
diff --git a/agents/windows/Section.h b/agents/windows/sections/Section.h
similarity index 100%
rename from agents/windows/Section.h
rename to agents/windows/sections/Section.h
diff --git a/agents/windows/test/stringutilTest.cc
b/agents/windows/test/stringutilTest.cc
index 80b0db7..b1b1a2b 100644
--- a/agents/windows/test/stringutilTest.cc
+++ b/agents/windows/test/stringutilTest.cc
@@ -1,6 +1,6 @@
+#include "SectionEventlog.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-#include "sections/SectionEventlog.h"
#include "types.h"
using std::string;