[syslinux:master] lua: the COM32 API does not support freopen()

syslinux-bot for Ferenc Wágner wferi at niif.hu
Sun Mar 2 13:48:18 PST 2014


Commit-ID:  118294dc6676aa5ba1d798c4fa5646020e778dc1
Gitweb:     http://www.syslinux.org/commit/118294dc6676aa5ba1d798c4fa5646020e778dc1
Author:     Ferenc Wágner <wferi at niif.hu>
AuthorDate: Fri, 11 Oct 2013 16:09:11 +0200
Committer:  Ferenc Wágner <wferi at niif.hu>
CommitDate: Sat, 1 Mar 2014 17:40:34 +0100

lua: the COM32 API does not support freopen()

Nor the concept of text vs. binary open mode, so it does not matter.

---
 com32/lua/src/lauxlib.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/com32/lua/src/lauxlib.c b/com32/lua/src/lauxlib.c
index 2e989d6..07a9316 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);


More information about the Syslinux-commits mailing list