Build fix for Windows and RHEL 5

fixes #7433
This commit is contained in:
Gunnar Beutner 2014-10-23 19:07:14 +02:00
parent 17003d0157
commit 7f0ced592c
5 changed files with 11 additions and 10 deletions

View File

@ -27,8 +27,8 @@
using namespace icinga;
namespace po = boost::program_options;
REGISTER_BLACKANDWHITELIST_CLICOMMAND("whitelist");
REGISTER_BLACKANDWHITELIST_CLICOMMAND("blacklist");
REGISTER_BLACKANDWHITELIST_CLICOMMAND(whitelist);
REGISTER_BLACKANDWHITELIST_CLICOMMAND(blacklist);
RegisterBlackAndWhitelistCLICommandHelper::RegisterBlackAndWhitelistCLICommandHelper(const String& type)
{

View File

@ -68,7 +68,7 @@ public:
#define REGISTER_BLACKANDWHITELIST_CLICOMMAND(type) \
namespace { namespace UNIQUE_NAME(blackandwhitelist) { \
I2_EXPORT icinga::RegisterBlackAndWhitelistCLICommandHelper l_RegisterBlackAndWhitelistCLICommand(type); \
I2_EXPORT icinga::RegisterBlackAndWhitelistCLICommandHelper l_RegisterBlackAndWhitelistCLICommand_ ## type(#type); \
} }
}

View File

@ -31,10 +31,10 @@
using namespace icinga;
namespace po = boost::program_options;
REGISTER_REPOSITORY_CLICOMMAND("Host");
REGISTER_REPOSITORY_CLICOMMAND("Service");
REGISTER_REPOSITORY_CLICOMMAND("Zone");
REGISTER_REPOSITORY_CLICOMMAND("Endpoint");
REGISTER_REPOSITORY_CLICOMMAND(Host);
REGISTER_REPOSITORY_CLICOMMAND(Service);
REGISTER_REPOSITORY_CLICOMMAND(Zone);
REGISTER_REPOSITORY_CLICOMMAND(Endpoint);
RegisterRepositoryCLICommandHelper::RegisterRepositoryCLICommandHelper(const String& type)
{

View File

@ -70,7 +70,7 @@ public:
#define REGISTER_REPOSITORY_CLICOMMAND(type) \
namespace { namespace UNIQUE_NAME(repositoryobject) { \
I2_EXPORT icinga::RegisterRepositoryCLICommandHelper l_RegisterRepositoryCLICommand(type); \
I2_EXPORT icinga::RegisterRepositoryCLICommandHelper l_RegisterRepositoryCLICommand_ ## type(#type); \
} }
}

View File

@ -30,6 +30,7 @@
#include "base/console.hpp"
#include <boost/foreach.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <fstream>
#include <iostream>
@ -206,7 +207,7 @@ bool RepositoryUtility::WriteObjectToRepository(const String& path, const String
fp.close();
#ifdef _WIN32
_unlink(filename.CStr());
_unlink(path.CStr());
#endif /* _WIN32 */
if (rename(tempPath.CStr(), path.CStr()) < 0) {
@ -238,7 +239,7 @@ bool RepositoryUtility::WriteObjectToRepositoryChangeLog(const String& path, con
fp.close();
#ifdef _WIN32
_unlink(filename.CStr());
_unlink(path.CStr());
#endif /* _WIN32 */
if (rename(tempPath.CStr(), path.CStr()) < 0) {