diff options
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/authserver/Main.cpp | 12 | ||||
| -rw-r--r-- | src/server/game/World/World.cpp | 2 | ||||
| -rw-r--r-- | src/server/worldserver/CommandLine/CliRunnable.cpp | 14 | ||||
| -rw-r--r-- | src/server/worldserver/Main.cpp | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index a911275ef2a..1669e0958b7 100644 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -49,7 +49,7 @@ namespace fs = boost::filesystem; # define _TRINITY_REALM_CONFIG "authserver.conf" #endif -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS #include "ServiceWin32.h" char serviceName[] = "authserver"; char serviceLongName[] = "TrinityCore auth service"; @@ -90,7 +90,7 @@ int main(int argc, char** argv) if (vm.count("help") || vm.count("version")) return 0; -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS if (configService.compare("install") == 0) return WinServiceInstall() == true ? 0 : 1; else if (configService.compare("uninstall") == 0) @@ -163,7 +163,7 @@ int main(int argc, char** argv) // Set signal handlers boost::asio::signal_set signals(*_ioService, SIGINT, SIGTERM); -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS signals.add(SIGBREAK); #endif signals.async_wait(SignalHandler); @@ -182,7 +182,7 @@ int main(int argc, char** argv) _banExpiryCheckTimer->expires_from_now(boost::posix_time::seconds(_banExpiryCheckInterval)); _banExpiryCheckTimer->async_wait(BanExpiryHandler); -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS if (m_ServiceStatus != -1) { _serviceStatusWatchTimer = new boost::asio::deadline_timer(*_ioService); @@ -271,7 +271,7 @@ void BanExpiryHandler(boost::system::error_code const& error) } } -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS void ServiceStatusWatcher(boost::system::error_code const& error) { if (!error) @@ -299,7 +299,7 @@ variables_map GetConsoleArguments(int argc, char** argv, fs::path& configFile, s ("config,c", value<fs::path>(&configFile)->default_value(fs::absolute(_TRINITY_REALM_CONFIG)), "use <arg> as configuration file") ; -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS options_description win("Windows platform specific options"); win.add_options() ("service,s", value<std::string>(&configService)->default_value(""), "Windows service options: [install | uninstall]") diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 470f2f7f382..fddb3312010 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1185,7 +1185,7 @@ void World::LoadConfigSettings(bool reload) if (dataPath.empty() || (dataPath.at(dataPath.length()-1) != '/' && dataPath.at(dataPath.length()-1) != '\\')) dataPath.push_back('/'); -#if PLATFORM == PLATFORM_UNIX || PLATFORM == PLATFORM_APPLE +#if TRINITY_PLATFORM == TRINITY_PLATFORM_UNIX || TRINITY_PLATFORM == TRINITY_PLATFORM_APPLE if (dataPath[0] == '~') { const char* home = getenv("HOME"); diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp index 633cde6a9ad..d5e03edbd04 100644 --- a/src/server/worldserver/CommandLine/CliRunnable.cpp +++ b/src/server/worldserver/CommandLine/CliRunnable.cpp @@ -29,7 +29,7 @@ #include "Log.h" #include "Util.h" -#if PLATFORM != PLATFORM_WINDOWS +#if TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS #include <readline/readline.h> #include <readline/history.h> #include "Chat.h" @@ -86,7 +86,7 @@ int cli_hook_func() void utf8print(void* /*arg*/, const char* str) { -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS wchar_t wtemp_buf[6000]; size_t wtemp_len = 6000-1; if (!Utf8toWStr(str, strlen(str), wtemp_buf, wtemp_len)) @@ -129,7 +129,7 @@ void CliThread() { ///- Display the list of available CLI functions then beep //TC_LOG_INFO("server.worldserver", ""); -#if PLATFORM != PLATFORM_WINDOWS +#if TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS rl_attempted_completion_function = cli_completion; rl_event_hook = cli_hook_func; #endif @@ -148,7 +148,7 @@ void CliThread() char *command_str ; // = fgets(commandbuf, sizeof(commandbuf), stdin); -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS char commandbuf[256]; command_str = fgets(commandbuf, sizeof(commandbuf), stdin); #else @@ -167,7 +167,7 @@ void CliThread() if (!*command_str) { -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS printf("TC>"); #else free(command_str); @@ -178,7 +178,7 @@ void CliThread() std::string command; if (!consoleToUtf8(command_str, command)) // convert from console encoding to utf8 { -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS printf("TC>"); #else free(command_str); @@ -188,7 +188,7 @@ void CliThread() fflush(stdout); sWorld->QueueCliCommand(new CliCommandHolder(NULL, command.c_str(), &utf8print, &commandFinished)); -#if PLATFORM != PLATFORM_WINDOWS +#if TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS add_history(command.c_str()); free(command_str); #endif diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 6a722219509..76200a8e7ae 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -167,7 +167,7 @@ extern int main(int argc, char** argv) // Set signal handlers (this must be done before starting io_service threads, because otherwise they would unblock and exit) boost::asio::signal_set signals(_ioService, SIGINT, SIGTERM); -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS signals.add(SIGBREAK); #endif signals.async_wait(SignalHandler); |
