summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2016-09-18 14:30:27 +0800
committerruki <[email protected]>2016-09-18 14:30:27 +0800
commit66ec236100d9972c1ce3dff8f36b43b20757255d (patch)
tree7cd6f9fa0fee575db7bf4a948e2475ee60e93927 /core/src
parenta9b9e12af47b126dd792d07b0ffec4377025e1ba (diff)
fix ___iob_func for vs2015
Diffstat (limited to 'core/src')
-rwxr-xr-xcore/src/xmake/machine.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/src/xmake/machine.c b/core/src/xmake/machine.c
index 2f0791834..ebb360629 100755
--- a/core/src/xmake/machine.c
+++ b/core/src/xmake/machine.c
@@ -155,10 +155,8 @@ static luaL_Reg const g_process_functions[] =
// patch for linking error on vs2015: unresolved external symbol ___iob_func, fprintf, fscanf
#if defined(TB_COMPILER_IS_MSVC) && _MSC_VER >= 1900
# pragma comment(lib, "legacy_stdio_definitions.lib")
-extern "C"
-{
- FILE __iob_func[3] = { *stdin, *stdout, *stderr };
-}
+FILE _iob[] = { *stdin, *stdout, *stderr };
+extern "C" FILE* __cdecl __iob_func(tb_void_t) { return _iob; }
#endif
/* //////////////////////////////////////////////////////////////////////////////////////