diff --git a/include/storage/shared_memory.hpp b/include/storage/shared_memory.hpp index 47238cfdf..9ceef7d76 100644 --- a/include/storage/shared_memory.hpp +++ b/include/storage/shared_memory.hpp @@ -7,7 +7,7 @@ #include #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #else #include @@ -39,7 +39,7 @@ struct OSRMLockFile } }; -#ifndef WIN32 +#ifndef _WIN32 class SharedMemory { diff --git a/include/util/lua_util.hpp b/include/util/lua_util.hpp index 4d4fe17be..4af7473f9 100644 --- a/include/util/lua_util.hpp +++ b/include/util/lua_util.hpp @@ -43,8 +43,7 @@ inline bool luaFunctionExists(lua_State *lua_state, const char *name) inline void luaAddScriptFolderToLoadPath(lua_State *lua_state, const char *file_name) { boost::filesystem::path profile_path = boost::filesystem::canonical(file_name); - std::string folder = profile_path.parent_path().string(); - // TODO: This code is most probably not Windows safe since it uses UNIX'ish path delimiters + std::string folder = profile_path.parent_path().generic_string(); const std::string lua_code = "package.path = \"" + folder + "/?.lua;\" .. package.path"; luaL_dostring(lua_state, lua_code.c_str()); }