summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-31 22:27:26 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-31 22:46:08 +0300
commit82ace39b426a843382a6a809e7b66487c1412494 (patch)
treec8434c5465d0f0a44aa1a4b438dbe4dfbce317f6 /src/client.cpp
parentf355fe070293a3f80b33ee0bc0154b2fe767fc4d (diff)
downloadmanaplus-82ace39b426a843382a6a809e7b66487c1412494.tar.gz
manaplus-82ace39b426a843382a6a809e7b66487c1412494.tar.bz2
manaplus-82ace39b426a843382a6a809e7b66487c1412494.tar.xz
manaplus-82ace39b426a843382a6a809e7b66487c1412494.zip
Fix code style and compilation under windows.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index b21aa6970..ce265ee15 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -707,7 +707,11 @@ void Client::setEnv(const char *const name, const char *const value)
{
if (!name || !value)
return;
+#ifdef WIN32
+ if (putenv((char*)(std::string(name) + "=" + value).c_str()))
+#else
if (setenv(name, value, 1))
+#endif
logger->log("setenv failed: %s=%s", name, value);
}