Quick fix to (hopefully) module support on mingw

This commit is contained in:
Jason Turner 2009-09-08 19:21:11 +00:00
parent b185e2e792
commit f7b530ebae

View File

@ -13,7 +13,7 @@
#ifdef _POSIX_VERSION #ifdef _POSIX_VERSION
#include <dlfcn.h> #include <dlfcn.h>
#else #else
#ifdef _MSC_VER #ifdef _WINDOWS
#include <Windows.h> #include <Windows.h>
#endif #endif
#endif #endif
@ -87,7 +87,7 @@ namespace chaiscript
}; };
#else #else
#ifdef _MSC_VER #ifdef _WINDOWS
std::string GetErrorMessage(DWORD err) std::string GetErrorMessage(DWORD err)
{ {
@ -100,29 +100,10 @@ namespace chaiscript
NULL, NULL,
err, err,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
lpMsgBuf, (LPWSTR)&lpMsgBuf,
0, NULL ); 0, NULL );
std::string retval; 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) if (lpMsgBuf)
{ {