diff --git a/lua/liolib.c b/lua/liolib.c index 213e5e9..9fc44ab 100644 --- a/lua/liolib.c +++ b/lua/liolib.c @@ -285,7 +285,7 @@ static int io_popen (lua_State *L) { static int io_tmpfile (lua_State *L) { LStream *p = newfile(L); - p->f = tmpfile(); + // p->f = tmpfile(); return (p->f == NULL) ? luaL_fileresult(L, 0, NULL) : 1; } diff --git a/lua/loslib.c b/lua/loslib.c index de590c6..397494d 100644 --- a/lua/loslib.c +++ b/lua/loslib.c @@ -164,12 +164,12 @@ static int os_rename (lua_State *L) { static int os_tmpname (lua_State *L) { - char buff[LUA_TMPNAMBUFSIZE]; - int err; - lua_tmpnam(buff, err); - if (err) - return luaL_error(L, "unable to generate a unique filename"); - lua_pushstring(L, buff); + // char buff[LUA_TMPNAMBUFSIZE]; + // int err; + // lua_tmpnam(buff, err); + // if (err) + // return luaL_error(L, "unable to generate a unique filename"); + // lua_pushstring(L, buff); return 1; } @@ -181,7 +181,7 @@ static int os_getenv (lua_State *L) { static int os_clock (lua_State *L) { - lua_pushnumber(L, ((lua_Number)clock())/(lua_Number)CLOCKS_PER_SEC); + lua_pushnumber(L, ((lua_Number)0)/(lua_Number)CLOCKS_PER_SEC); return 1; } diff --git a/lua/ltablib.c b/lua/ltablib.c index c534957..6e9979f 100644 --- a/lua/ltablib.c +++ b/lua/ltablib.c @@ -256,7 +256,7 @@ typedef unsigned int IdxT; ** is to copy them to an array of a known type and use the array values. */ static unsigned int l_randomizePivot (void) { - clock_t c = clock(); + clock_t c = 0; time_t t = time(NULL); unsigned int buff[sof(c) + sof(t)]; unsigned int i, rnd = 0;