mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
Fixed compilation on Solaris 10.
This commit is contained in:
parent
70b2595b26
commit
e14bf9faec
8
README
8
README
@ -0,0 +1,8 @@
|
|||||||
|
Requirements
|
||||||
|
------------
|
||||||
|
|
||||||
|
-C++ compiler that supports C++11
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
-Boost library (components: tr1 smart_ptr bind function make_shared)
|
@ -228,15 +228,15 @@ Component::Ptr Application::LoadComponent(const string& path,
|
|||||||
throw ComponentLoadException("Could not load module");
|
throw ComponentLoadException("Could not load module");
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
pCreateComponent = reinterpret_cast<CreateComponentFunction>(GetProcAddress(hModule,
|
pCreateComponent = (CreateComponentFunction)GetProcAddress(hModule,
|
||||||
"CreateComponent"));
|
"CreateComponent");
|
||||||
#else /* _WIN32 */
|
#else /* _WIN32 */
|
||||||
# ifdef __GNUC__
|
# ifdef __GNUC__
|
||||||
/* suppress compiler warning for void * cast */
|
/* suppress compiler warning for void * cast */
|
||||||
__extension__
|
__extension__
|
||||||
# endif
|
# endif
|
||||||
pCreateComponent = reinterpret_cast<CreateComponentFunction>(lt_dlsym(hModule,
|
pCreateComponent = (CreateComponentFunction)lt_dlsym(hModule,
|
||||||
"CreateComponent"));
|
"CreateComponent");
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
if (pCreateComponent == NULL)
|
if (pCreateComponent == NULL)
|
||||||
@ -484,7 +484,7 @@ int Application::Run(int argc, char **argv)
|
|||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
result = Main(m_Arguments);
|
result = Main(m_Arguments);
|
||||||
} catch (const exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
Application::m_Instance.reset();
|
Application::m_Instance.reset();
|
||||||
|
|
||||||
Application::Log("---");
|
Application::Log("---");
|
||||||
|
@ -28,7 +28,7 @@ namespace icinga
|
|||||||
*
|
*
|
||||||
* @ingroup base
|
* @ingroup base
|
||||||
*/
|
*/
|
||||||
class I2_BASE_API Exception : public virtual exception
|
class I2_BASE_API Exception : public virtual std::exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Exception(void);
|
Exception(void);
|
||||||
|
@ -80,6 +80,7 @@
|
|||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <exception>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
@ -90,29 +91,33 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
using std::exception;
|
||||||
|
|
||||||
#ifdef HAVE_CXX11
|
#ifdef HAVE_CXX11
|
||||||
# include <memory>
|
# include <memory>
|
||||||
# include <functional>
|
# include <functional>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#else /* HAVE_CXX11 */
|
#else /* HAVE_CXX11 */
|
||||||
# ifdef HAVE_BOOST
|
# ifdef HAVE_BOOST
|
||||||
# include <boost/tr1/memory.hpp>
|
# include <boost/smart_ptr.hpp>
|
||||||
# include <boost/tr1/functional.hpp>
|
# include <boost/make_shared.hpp>
|
||||||
|
# include <boost/bind.hpp>
|
||||||
|
# include <boost/function.hpp>
|
||||||
|
|
||||||
using namespace std;
|
using namespace boost;
|
||||||
|
|
||||||
# else /* HAVE_BOOST */
|
# else /* HAVE_BOOST */
|
||||||
# include <tr1/memory>
|
# include <tr1/memory>
|
||||||
# include <tr1/functional>
|
# include <tr1/functional>
|
||||||
# include "cxx11-compat.h"
|
# include "cxx11-compat.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std::tr1;
|
||||||
using namespace std::placeholders;
|
using namespace std::tr1::placeholders;
|
||||||
|
|
||||||
# endif /* HAVE_BOOST */
|
#endif /* HAVE_BOOST */
|
||||||
#endif /* HAVE_CXX11 */
|
#endif /* HAVE_CXX11 */
|
||||||
|
|
||||||
#if defined(__APPLE__) && defined(__MACH__)
|
#if defined(__APPLE__) && defined(__MACH__)
|
||||||
|
@ -302,4 +302,5 @@ char *collapse(char *mask)
|
|||||||
while (*m++);
|
while (*m++);
|
||||||
};
|
};
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user