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)
{
#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); \
} }
}
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)
{
#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); \
} }
}
#include "base/console.hpp"
#include <boost/foreach.hpp>
#include <boost/algorithm/string/join.hpp>
+#include <boost/algorithm/string/replace.hpp>
#include <fstream>
#include <iostream>
fp.close();
#ifdef _WIN32
- _unlink(filename.CStr());
+ _unlink(path.CStr());
#endif /* _WIN32 */
if (rename(tempPath.CStr(), path.CStr()) < 0) {
fp.close();
#ifdef _WIN32
- _unlink(filename.CStr());
+ _unlink(path.CStr());
#endif /* _WIN32 */
if (rename(tempPath.CStr(), path.CStr()) < 0) {