aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerenc Wágner <wferi@niif.hu>2013-10-11 16:09:11 +0200
committerFerenc Wágner <wferi@niif.hu>2014-03-01 17:40:34 +0100
commit118294dc6676aa5ba1d798c4fa5646020e778dc1 (patch)
tree200940133d39746c13612096f06f8d38519b00b0
parent7de0fe31984d3ce56db6041e0cdf358936c1f583 (diff)
downloadsyslinux-118294dc6676aa5ba1d798c4fa5646020e778dc1.tar.gz
syslinux-118294dc6676aa5ba1d798c4fa5646020e778dc1.tar.xz
syslinux-118294dc6676aa5ba1d798c4fa5646020e778dc1.zip
lua: the COM32 API does not support freopen()
Nor the concept of text vs. binary open mode, so it does not matter.
-rw-r--r--com32/lua/src/lauxlib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/com32/lua/src/lauxlib.c b/com32/lua/src/lauxlib.c
index 2e989d66..07a9316c 100644
--- a/com32/lua/src/lauxlib.c
+++ b/com32/lua/src/lauxlib.c
@@ -644,11 +644,13 @@ LUALIB_API int luaL_loadfilex (lua_State *L, const char *filename,
}
if (skipcomment(&lf, &c)) /* read initial portion */
lf.buff[lf.n++] = '\n'; /* add line to correct line numbers */
+#ifndef SYSLINUX
if (c == LUA_SIGNATURE[0] && filename) { /* binary file? */
lf.f = freopen(filename, "rb", lf.f); /* reopen in binary mode */
if (lf.f == NULL) return errfile(L, "reopen", fnameindex);
skipcomment(&lf, &c); /* re-read initial portion */
}
+#endif
if (c != EOF)
lf.buff[lf.n++] = c; /* 'c' is the first character of the stream */
status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode);