Core/Misc: Prefix all preprocessor defines from CompilerDefs with TRINITY_ to avoid conflicts (PLATFORM_WINDOWS is used/defined by CascLib)

(cherry picked from commit b8db320bf1)
This commit is contained in:
Shauren
2017-05-23 18:34:02 +02:00
committed by Aokromes
parent 496bb4b105
commit d8b9d2a9da
17 changed files with 65 additions and 67 deletions

View File

@@ -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]")