diff options
| author | Shauren <shauren.trinity@gmail.com> | 2017-03-04 18:44:13 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2017-03-04 18:46:18 +0100 |
| commit | b8db320bf14e327bcd12279871b914d8635ef122 (patch) | |
| tree | f9e1018ff8f1b4423264a4c11e087c296f36864b /src/server | |
| parent | 61829e269e31d58161614e745a24c12972ec8e97 (diff) | |
Core/Misc: Prefix all preprocessor defines from CompilerDefs with TRINITY_ to avoid conflicts (PLATFORM_WINDOWS is used/defined by CascLib)
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/bnetserver/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/bnetserver/Main.cpp b/src/server/bnetserver/Main.cpp index 9cec10b14de..ec6f11c92da 100644 --- a/src/server/bnetserver/Main.cpp +++ b/src/server/bnetserver/Main.cpp @@ -45,7 +45,7 @@ namespace fs = boost::filesystem; # define _TRINITY_BNET_CONFIG "bnetserver.conf" #endif -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS #include "ServiceWin32.h" char serviceName[] = "bnetserver"; char serviceLongName[] = "TrinityCore bnet service"; @@ -88,7 +88,7 @@ int main(int argc, char** argv) GOOGLE_PROTOBUF_VERIFY_VERSION; -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS if (configService.compare("install") == 0) return WinServiceInstall() ? 0 : 1; else if (configService.compare("uninstall") == 0) @@ -179,7 +179,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); @@ -198,7 +198,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); @@ -289,7 +289,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) @@ -319,7 +319,7 @@ variables_map GetConsoleArguments(int argc, char** argv, fs::path& configFile, s ("config,c", value<fs::path>(&configFile)->default_value(fs::absolute(_TRINITY_BNET_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 845565a1e50..1a5e6de5dfe 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1288,7 +1288,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 0c0aba645ef..37314e9136c 100644 --- a/src/server/worldserver/CommandLine/CliRunnable.cpp +++ b/src/server/worldserver/CommandLine/CliRunnable.cpp @@ -35,7 +35,7 @@ #include "Player.h" #include "Util.h" -#if PLATFORM != PLATFORM_WINDOWS +#if TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS #include <readline/readline.h> #include <readline/history.h> @@ -91,7 +91,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)) @@ -134,7 +134,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 @@ -153,7 +153,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 @@ -172,7 +172,7 @@ void CliThread() if (!*command_str) { -#if PLATFORM == PLATFORM_WINDOWS +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS printf("TC>"); #else free(command_str); @@ -183,7 +183,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); @@ -193,7 +193,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 5b228305095..1ac22b5c81f 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -168,7 +168,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); |
