external/lua: update to Lua 5.4.7

Update the version of Lua included with Callisto to Lua 5.4.7.
Re-generate patches to apply cleanly on top of Lua 5.4.7 sources.

Fixes: https://todo.sr.ht/~jeremy/callisto/8
This commit is contained in:
Jeremy Baxter 2024-07-01 08:51:36 +12:00
parent 045cb437ba
commit cdae936548
33 changed files with 371 additions and 266 deletions

View file

@ -21,7 +21,7 @@
#include "lua.h"
@@ -723,8 +730,25 @@
@@ -732,6 +739,23 @@
return luaL_fileresult(L, res == 0, NULL);
}
@ -41,13 +41,11 @@
+ lua_pushboolean(L, isatty(fd));
+ return 1;
+}
+
static int io_flush (lua_State *L) {
return luaL_fileresult(L, fflush(getiofile(L, IO_OUTPUT)) == 0, NULL);
}
@@ -765,6 +789,7 @@
@@ -778,6 +802,7 @@
{"seek", f_seek},
{"close", f_close},
{"setvbuf", f_setvbuf},

View file

@ -21,14 +21,14 @@
#include <time.h>
#include "lua.h"
@@ -401,7 +408,28 @@
@@ -403,6 +410,27 @@
return 0;
}
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 256 /* according to POSIX */
+#endif
+
+/***
+ * Returns the system hostname.
+ *
@ -46,11 +46,10 @@
+ return 1;
+}
+
+
static const luaL_Reg syslib[] = {
{"clock", os_clock},
{"date", os_date},
@@ -409,6 +435,7 @@
@@ -411,6 +439,7 @@
{"execute", os_execute},
{"exit", os_exit},
{"getenv", os_getenv},