From f7b530ebaed278df3b168da0f68d6d559a3e4b71 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 8 Sep 2009 19:21:11 +0000 Subject: [PATCH] Quick fix to (hopefully) module support on mingw --- .../chaiscript/language/chaiscript_engine.hpp | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/include/chaiscript/language/chaiscript_engine.hpp b/include/chaiscript/language/chaiscript_engine.hpp index 46a8e92a..b74ab04e 100644 --- a/include/chaiscript/language/chaiscript_engine.hpp +++ b/include/chaiscript/language/chaiscript_engine.hpp @@ -13,7 +13,7 @@ #ifdef _POSIX_VERSION #include #else -#ifdef _MSC_VER +#ifdef _WINDOWS #include #endif #endif @@ -87,7 +87,7 @@ namespace chaiscript }; #else -#ifdef _MSC_VER +#ifdef _WINDOWS std::string GetErrorMessage(DWORD err) { @@ -100,29 +100,10 @@ namespace chaiscript NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - lpMsgBuf, + (LPWSTR)&lpMsgBuf, 0, NULL ); std::string retval; -/* - int bsz = WideCharToMultiByte(codepage, - 0, - pw,-1, - 0,0, - 0,0); - if (bsz > 0) { - char p[bsz]; - int rc = WideCharToMultiByte(codepage, - 0, - pw,-1, - p,bsz, - 0,0); - if (rc != 0) { - p[bsz-1] = 0; - retval = p; - } - } - */ if (lpMsgBuf) {