From 0387fcbab1b308d7304f2b05939d9f87f8f3fbc9 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Fri, 3 Jul 2015 11:44:36 +0000 Subject: MFLua(JIT): Use lkpselib.c (from Akira) git-svn-id: svn://tug.org/texlive/trunk@37743 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/luatexdir/lua/lkpselib.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Build/source/texk/web2c/luatexdir/lua') diff --git a/Build/source/texk/web2c/luatexdir/lua/lkpselib.c b/Build/source/texk/web2c/luatexdir/lua/lkpselib.c index c29dbd8586f..d53c50426e4 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lkpselib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lkpselib.c @@ -17,8 +17,19 @@ You should have received a copy of the GNU General Public License along with LuaTeX; if not, see . */ +#ifdef MF_LUA +#define EXTERN extern +#if defined(JIT) +#include "mfluajitd.h" +#else +#include "mfluad.h" +#endif +#include +#define xfree(p) do { if (p != NULL) free(p); p = NULL; } while (0) +#else #include "ptexlib.h" #include "lua/luatex-api.h" +#endif #include #include #include @@ -151,11 +162,19 @@ static const char *const filetypenames[] = { }; +#ifdef MF +#define KPATHSEA_METATABLE "mflua.kpathsea" +#else #define KPATHSEA_METATABLE "luatex.kpathsea" +#endif /* set to 1 by the |program_name| function */ +#ifdef MF +int program_name_set = 1; +#else int program_name_set = 0; +#endif #define TEST_PROGRAM_NAME_SET do { \ if (! program_name_set) { \ -- cgit v1.2.3