mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-02-07 18:26:49 +08:00
Quick fix to (hopefully) module support on mingw
This commit is contained in:
parent
b185e2e792
commit
f7b530ebae
@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user