From: Gunnar Beutner Date: Fri, 13 Jul 2012 19:07:39 +0000 (+0200) Subject: Fixed compilation errors on *NIX. X-Git-Tag: v0.0.1~243 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a73f41fb6cdb17730dca33daec746e8ee639a25b;p=icinga2 Fixed compilation errors on *NIX. --- diff --git a/base/Makefile.am b/base/Makefile.am index 24d7699cc..24d60168d 100644 --- a/base/Makefile.am +++ b/base/Makefile.am @@ -65,7 +65,8 @@ libbase_la_CPPFLAGS = \ $(LTDLINCL) \ $(BOOST_CPPFLAGS) \ $(OPENSSL_INCLUDES) \ - -I${top_srcdir}/third-party/mmatch + -I${top_srcdir}/third-party/mmatch \ + -I${top_srcdir}/third-party/popen-noshell libbase_la_LDFLAGS = \ $(BOOST_LDFLAGS) \ @@ -79,4 +80,5 @@ libbase_la_LIBADD = \ $(OPENSSL_LIBS) \ $(BOOST_SIGNALS_LIB) \ $(BOOST_THREAD_LIB) \ - ${top_builddir}/third-party/mmatch/libmmatch.la + ${top_builddir}/third-party/mmatch/libmmatch.la \ + ${top_builddir}/third-party/popen-noshell/libpopen_noshell.la diff --git a/base/asynctask.h b/base/asynctask.h index df1614403..08237355c 100644 --- a/base/asynctask.h +++ b/base/asynctask.h @@ -1,3 +1,22 @@ +/****************************************************************************** + * Icinga 2 * + * Copyright (C) 2012 Icinga Development Team (http://www.icinga.org/) * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software Foundation * + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * + ******************************************************************************/ + #ifndef ASYNCTASK_H #define ASYNCTASK_H @@ -42,7 +61,7 @@ protected: bool m_Finished; private: - static void FinishForwarder(typename const shared_ptr& task) + static void FinishForwarder(const shared_ptr& task) { task->OnTaskCompleted(task); } diff --git a/base/process.cpp b/base/process.cpp index 439ad34ed..2d1d8292b 100644 --- a/base/process.cpp +++ b/base/process.cpp @@ -1,5 +1,28 @@ +/****************************************************************************** + * Icinga 2 * + * Copyright (C) 2012 Icinga Development Team (http://www.icinga.org/) * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software Foundation * + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * + ******************************************************************************/ + #include "i2-base.h" +#ifndef _MSC_VER +# include "popen_noshell.h" +#endif /* _MSC_VER */ + using namespace icinga; bool Process::m_ThreadsCreated = false; diff --git a/base/process.h b/base/process.h index f7b45cbf0..4aa0e7f77 100644 --- a/base/process.h +++ b/base/process.h @@ -1,3 +1,22 @@ +/****************************************************************************** + * Icinga 2 * + * Copyright (C) 2012 Icinga Development Team (http://www.icinga.org/) * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software Foundation * + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * + ******************************************************************************/ + #ifndef PROCESS_H #define PROCESS_H diff --git a/cib/Makefile.am b/cib/Makefile.am index 9b33ce5c2..9a427408a 100644 --- a/cib/Makefile.am +++ b/cib/Makefile.am @@ -34,8 +34,7 @@ libcib_la_CPPFLAGS = \ -I${top_srcdir}/base \ -I${top_srcdir}/dyn \ -I${top_srcdir}/jsonrpc \ - -I${top_srcdir}/icinga \ - -I${top_srcdir}/third-party/popen-noshell + -I${top_srcdir}/icinga libcib_la_LDFLAGS = \ $(BOOST_LDFLAGS) \ @@ -49,5 +48,4 @@ libcib_la_LIBADD = \ ${top_builddir}/base/libbase.la \ ${top_builddir}/dyn/libdyn.la \ ${top_builddir}/jsonrpc/libjsonrpc.la \ - ${top_builddir}/icinga/libicinga.la \ - ${top_builddir}/third-party/popen-noshell/libpopen_noshell.la + ${top_builddir}/icinga/libicinga.la diff --git a/cib/nagioschecktask.cpp b/cib/nagioschecktask.cpp index 334c1ffe8..b17147d62 100644 --- a/cib/nagioschecktask.cpp +++ b/cib/nagioschecktask.cpp @@ -19,10 +19,6 @@ #include "i2-cib.h" -#ifndef _MSC_VER -# include "popen_noshell.h" -#endif /* _MSC_VER */ - using namespace icinga; NagiosCheckTask::NagiosCheckTask(const Service& service)