diff options
author | Shauren <shauren.trinity@gmail.com> | 2013-05-13 18:10:20 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2013-05-13 18:10:20 +0200 |
commit | 86d846e62767df637631ff20764a65dcdfbcd72d (patch) | |
tree | bc3872fc2146513ed0acc2ea6f2acd4a168ad096 | |
parent | 6bc144a328b377a37aec14fda2303e51367dc130 (diff) |
Core: Fixed windows compile
-rw-r--r-- | src/server/shared/Logging/Log.h | 6 | ||||
-rw-r--r-- | src/server/worldserver/Main.cpp | 19 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h index d7612c76738..e35e4f3ab7f 100644 --- a/src/server/shared/Logging/Log.h +++ b/src/server/shared/Logging/Log.h @@ -96,14 +96,14 @@ inline bool Log::ShouldLog(LogFilterType type, LogLevel level) const #define sLog ACE_Singleton<Log, ACE_Thread_Mutex>::instance() -#if PLATFORM != PLATFORM_WINDOWS -# define TC_LOG_MESSAGE_BODY(level__, call__, filterType__, ...) \ +#if COMPILER != COMPILER_MICROSOFT +#define TC_LOG_MESSAGE_BODY(level__, call__, filterType__, ...) \ do { \ if (sLog->ShouldLog(filterType__, level__)) \ sLog->call__(filterType__, __VA_ARGS__); \ } while (0) #else -# define TC_LOG_MESSAGE_BODY(level__, call__, filterType__, ...) \ +#define TC_LOG_MESSAGE_BODY(level__, call__, filterType__, ...) \ __pragma(warning(push)) \ __pragma(warning(disable:4127)) \ do { \ diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 3f6a6d56c8b..f9c672b4945 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -58,15 +58,15 @@ uint32 realmID; ///< Id of the realm /// Print out the usage string for this program on the console. void usage(const char *prog) { - TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Usage: \n %s [<options>]\n" - " -c config_file use config_file as configuration file\n\r" - #ifdef _WIN32 - " Running as service functions:\n\r" - " --service run as service\n\r" - " -s install install service\n\r" - " -s uninstall uninstall service\n\r" - #endif - , prog); + printf("Usage:\n"); + printf(" %s [<options>]\n", prog); + printf(" -c config_file use config_file as configuration file\n"); +#ifdef _WIN32 + printf(" Running as service functions:\n"); + printf(" --service run as service\n"); + printf(" -s install install service\n"); + printf(" -s uninstall uninstall service\n"); +#endif } /// Launch the Trinity server @@ -135,6 +135,7 @@ extern int main(int argc, char **argv) printf("Verify that the file exists and has \'[worldserver]' written in the top of the file!\n"); return 1; } + TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Using configuration file %s.", cfg_file); TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); |