summaryrefslogtreecommitdiff
path: root/Build/source/libs/lua53/TLpatches
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
committerKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
commitad547a6b5986815fda458221149728d9d9ab1d87 (patch)
tree16296910eb3eca724371474ea9aea3994dc69614 /Build/source/libs/lua53/TLpatches
parent947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff)
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/lua53/TLpatches')
-rw-r--r--Build/source/libs/lua53/TLpatches/ChangeLog45
-rw-r--r--Build/source/libs/lua53/TLpatches/patch-01-utf-827
-rw-r--r--Build/source/libs/lua53/TLpatches/patch-02-FreeBSD13
-rw-r--r--Build/source/libs/lua53/TLpatches/patch-03-export36
4 files changed, 121 insertions, 0 deletions
diff --git a/Build/source/libs/lua53/TLpatches/ChangeLog b/Build/source/libs/lua53/TLpatches/ChangeLog
new file mode 100644
index 00000000000..4de12857918
--- /dev/null
+++ b/Build/source/libs/lua53/TLpatches/ChangeLog
@@ -0,0 +1,45 @@
+2020-10-04 Luigi Scarso <luigi.scarso@gmail.com>
+ Adapted for lua 5.3.6
+
+2018-07-21 Luigi Scarso <luigi.scarso@gmail.com>
+ Adapted for lua 5.3.5
+
+2017-10-24 Luigi Scarso <luigi.scarso@gmail.com>
+ Adapted for lua 5.3.4
+
+2015-03-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Import lua-5.2.4/ from http://www.lua.org/ftp/lua-5.2.4.tar.gz.
+
+ * patch-01-utf-8, patch-02-FreeBSD, patch-03-export: Adapted.
+
+2014-10-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-03-export (new): Export symbols for LuaTeX (from Luigi).
+
+2014-02-13 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-02-FreeBSD (new): Required for FreeBSD.
+ From Nikola Lecic <nikola.lecic@anthesphoria.net>.
+
+2014-02-13 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-01-utf-8 (new): Allow utf-8 chars in identifiers.
+ From Luigi Scarso <luigi.scarso@gmail.com>.
+
+2012-12-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Import lua-5.2.3/ from http://www.lua.org/ftp/lua-5.2.3.tar.gz.
+
+2012-06-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Import lua-5.2.2/ from http://www.lua.org/ftp/lua-5.2.2.tar.gz.
+
+ * patch-01-const (removed): Now included upstream.
+
+2012-06-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Import lua-5.2.1/ from http://www.lua.org/ftp/lua-5.2.1.tar.gz.
+
+ * patch-01-const (new): Add const to avoid warning.
+
diff --git a/Build/source/libs/lua53/TLpatches/patch-01-utf-8 b/Build/source/libs/lua53/TLpatches/patch-01-utf-8
new file mode 100644
index 00000000000..69f07417699
--- /dev/null
+++ b/Build/source/libs/lua53/TLpatches/patch-01-utf-8
@@ -0,0 +1,27 @@
+diff -u lctype.h.orig lctype.h
+--- lctype.h.orig 2020-10-04 12:05:56.139893521 +0200
++++ lctype.h 2020-10-04 12:21:33.348948021 +0200
+@@ -7,6 +7,8 @@
+ #ifndef lctype_h
+ #define lctype_h
+
++#include <ctype.h>
++
+ #include "lua.h"
+
+
+@@ -53,9 +55,11 @@
+
+ /*
+ ** 'lalpha' (Lua alphabetic) and 'lalnum' (Lua alphanumeric) both include '_'
++**
++** all utf-8 chars (greater than 0x7f) are always alphabetic
+ */
+-#define lislalpha(c) testprop(c, MASK(ALPHABIT))
+-#define lislalnum(c) testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT)))
++#define lislalpha(c) (isalpha(c) || (c) == '_' || (c) > 0x7f)
++#define lislalnum(c) (isalnum(c) || (c) == '_' || (c) > 0x7f)
+ #define lisdigit(c) testprop(c, MASK(DIGITBIT))
+ #define lisspace(c) testprop(c, MASK(SPACEBIT))
+ #define lisprint(c) testprop(c, MASK(PRINTBIT))
+
diff --git a/Build/source/libs/lua53/TLpatches/patch-02-FreeBSD b/Build/source/libs/lua53/TLpatches/patch-02-FreeBSD
new file mode 100644
index 00000000000..c197854cbd4
--- /dev/null
+++ b/Build/source/libs/lua53/TLpatches/patch-02-FreeBSD
@@ -0,0 +1,13 @@
+diff -u liolib.c.orig liolib.c
+--- liolib.c.orig 2020-10-04 12:06:03.579772529 +0200
++++ liolib.c 2020-10-04 12:12:12.061843306 +0200
+@@ -16,6 +16,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_UNISTD_H)
++#include <unistd.h>
++#endif
+
+ #include "lua.h"
+
diff --git a/Build/source/libs/lua53/TLpatches/patch-03-export b/Build/source/libs/lua53/TLpatches/patch-03-export
new file mode 100644
index 00000000000..1da523bc755
--- /dev/null
+++ b/Build/source/libs/lua53/TLpatches/patch-03-export
@@ -0,0 +1,36 @@
+diff -u lopcodes.h.orig lopcodes.h
+--- lopcodes.h.orig 2020-10-04 12:06:08.639690280 +0200
++++ lopcodes.h 2020-10-04 12:10:02.143921798 +0200
+@@ -278,7 +278,7 @@
+ OpArgK /* argument is a constant or register/constant */
+ };
+
+-LUAI_DDEC const lu_byte luaP_opmodes[NUM_OPCODES];
++LUA_API const lu_byte luaP_opmodes[NUM_OPCODES];
+
+ #define getOpMode(m) (cast(enum OpMode, luaP_opmodes[m] & 3))
+ #define getBMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3))
+@@ -287,7 +287,7 @@
+ #define testTMode(m) (luaP_opmodes[m] & (1 << 7))
+
+
+-LUAI_DDEC const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */
++LUA_API const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */
+
+
+ /* number of list items to accumulate before a SETLIST instruction */
+
+
+diff -u lundump.h.orig lundump.h
+--- lundump.h.orig 2020-10-04 12:06:14.335597724 +0200
++++ lundump.h 2020-10-04 12:07:11.218675336 +0200
+@@ -26,7 +26,7 @@
+ LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name);
+
+ /* dump one chunk; from ldump.c */
+-LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
++LUAI_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
+ void* data, int strip);
+
+ #endif
+