From 29888fae6e1eb19f71f82b0ad9f779c56159d040 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Thu, 8 Dec 2011 12:20:35 +0100 Subject: [PATCH] Windows compilation fixes --- spectrum/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spectrum/src/main.cpp b/spectrum/src/main.cpp index a300a709..c0b8fb9b 100644 --- a/spectrum/src/main.cpp +++ b/spectrum/src/main.cpp @@ -211,6 +211,7 @@ int main(int argc, char **argv) return 1; } +#ifndef WIN32 if (!CONFIG_STRING(&config, "service.group").empty() ||!CONFIG_STRING(&config, "service.user").empty() ) { struct group *gr; if ((gr = getgrnam(CONFIG_STRING(&config, "service.group").c_str())) == NULL) { @@ -225,7 +226,6 @@ int main(int argc, char **argv) chown(CONFIG_STRING(&config, "service.working_dir").c_str(), pw->pw_uid, gr->gr_gid); } -#ifndef WIN32 if (!no_daemon) { // daemonize daemonize(CONFIG_STRING(&config, "service.working_dir").c_str(), CONFIG_STRING(&config, "service.pidfile").c_str()); @@ -260,7 +260,7 @@ int main(int argc, char **argv) std::string dir; BOOST_FOREACH(const log4cxx::LogString &prop, p.propertyNames()) { if (boost::ends_with(prop, ".File")) { - dir = p.get(prop); + log4cxx::helpers::Transcoder::encode(p.get(prop), dir); boost::replace_all(dir, "${jid}", jid); break; }