From 8c75cf1ff5cbf9bd27f577d92070df698b04a66e Mon Sep 17 00:00:00 2001 From: KimLS Date: Mon, 8 Jul 2019 19:26:21 -0700 Subject: [PATCH] Fix for compile issues on windows (bad perl bad) --- common/dbcore.cpp | 6 +++--- common/eqemu_logsys.cpp | 7 ++++--- common/eqemu_logsys.h | 9 ++++++++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/common/dbcore.cpp b/common/dbcore.cpp index 68cebc4f3..1189a8a62 100644 --- a/common/dbcore.cpp +++ b/common/dbcore.cpp @@ -2,8 +2,9 @@ #include #endif -#include "../common/misc_functions.h" -#include "../common/eqemu_logsys.h" +#include "misc_functions.h" +#include "eqemu_logsys.h" +#include "timer.h" #include "dbcore.h" @@ -21,7 +22,6 @@ #else #include "unix.h" -#include "timer.h" #include #endif diff --git a/common/eqemu_logsys.cpp b/common/eqemu_logsys.cpp index aed5365f5..3389342b9 100644 --- a/common/eqemu_logsys.cpp +++ b/common/eqemu_logsys.cpp @@ -468,9 +468,10 @@ void EQEmuLogSys::Out( prefix = fmt::format("[{0}::{1}:{2}] ", base_file_name(file), func, line); } + auto msg_cstr = message.c_str(); va_list args; - va_start(args, message); - std::string output_message = vStringFormat(message.c_str(), args); + va_start(args, msg_cstr); + std::string output_message = vStringFormat(msg_cstr, args); va_end(args); std::string output_debug_message = EQEmuLogSys::FormatOutMessageString(log_category, prefix + output_message); @@ -597,4 +598,4 @@ void EQEmuLogSys::StartFileLogs(const std::string &log_name) std::ios_base::app | std::ios_base::out ); } -} \ No newline at end of file +} diff --git a/common/eqemu_logsys.h b/common/eqemu_logsys.h index c3856edbb..f3c48ae88 100644 --- a/common/eqemu_logsys.h +++ b/common/eqemu_logsys.h @@ -21,11 +21,18 @@ #ifndef EQEMU_LOGSYS_H #define EQEMU_LOGSYS_H -#include #include #include #include #include + +#ifdef _WIN32 +#ifdef utf16_to_utf8 +#undef utf16_to_utf8 +#endif +#endif + +#include #include "types.h" namespace Logs {