mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Make fixes and improvements
- Polyfill UTIME_OMIT on XNU - Refactor Lua build code so it's better - Add unix module to lua.com (Discord request) - Add unix.utimensat() and unix.futimens() to redbean - Avoid creating double slash path in linenoise (#428) - Remove double slashes in NT paths automatically (#428) - Make strerror() smarter about showing NT errors (#428) Fixes #428
This commit is contained in:
parent
67b28b9af1
commit
c1cfca8ae1
18 changed files with 569 additions and 194 deletions
4
third_party/lua/lua.main.c
vendored
4
third_party/lua/lua.main.c
vendored
|
@ -30,7 +30,6 @@
|
|||
#include "libc/calls/struct/sigaction.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/runtime/gc.h"
|
||||
#include "libc/runtime/stack.h"
|
||||
|
@ -47,6 +46,7 @@
|
|||
#include "third_party/lua/lrepl.h"
|
||||
#include "third_party/lua/lua.h"
|
||||
#include "third_party/lua/lualib.h"
|
||||
#include "third_party/lua/lunix.h"
|
||||
#include "tool/args/args.h"
|
||||
// clang-format off
|
||||
|
||||
|
@ -364,6 +364,8 @@ static int pmain (lua_State *L) {
|
|||
lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV");
|
||||
}
|
||||
luaL_openlibs(L); /* open standard libraries */
|
||||
luaL_requiref(L, "unix", LuaUnix, 1);
|
||||
lua_pop(L, 1);
|
||||
createargtable(L, argv, argc, script); /* create table 'arg' */
|
||||
lua_gc(L, LUA_GCGEN, 0, 0); /* GC in generational mode */
|
||||
if (!(args & has_E)) { /* no option '-E'? */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue