diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-06-27 11:13:18 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-06-27 11:13:18 +0000 |
commit | 7048633b31b18592617a18d671e2e604b2c5c516 (patch) | |
tree | 3695d4e33e820106dfedb9cc31a6c65eb40b1e17 /Build | |
parent | 25294ae42e3432e23c96b636ff87fe687bb4a0bb (diff) |
luatexdir/lua/liolibext.c: Use binary mode on windows since fseek and ftell don't work in text mode. See http://tug.org/pipermail/luatex/2015-June/005306.html
git-svn-id: svn://tug.org/texlive/trunk@37691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/liolibext.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/liolibext.c b/Build/source/texk/web2c/luatexdir/lua/liolibext.c index 7d99b7968ff..edf094d4187 100644 --- a/Build/source/texk/web2c/luatexdir/lua/liolibext.c +++ b/Build/source/texk/web2c/luatexdir/lua/liolibext.c @@ -193,6 +193,9 @@ static void opencheck (lua_State *L, const char *fname, const char *mode) { if (p->f == NULL) { luaL_error(L, "cannot open file " LUA_QS " (%s)", fname, strerror(errno)); } else { +#ifdef WIN32 + _setmode (fileno (p->f), _O_BINARY); +#endif if (mode[0]=='r') recorder_record_input(fname); else @@ -217,6 +220,9 @@ static int io_open (lua_State *L) { if (p->f == NULL) { return luaL_fileresult(L, 0, filename) ; } else { +#ifdef WIN32 + _setmode (fileno (p->f), _O_BINARY); +#endif if (mode[0]=='r') recorder_record_input(filename); else |