Lua52 support was started with ac959fed00.
Compilation tested with Lua 5.2.1 and Lua 5.1.5.
The short typerror() snippet is taken from luaL_typerror in Lua 5.1.5
(MIT license)
Signed-off-by: Johannes Dewender <rpm@JonnyJD.net>
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Add compatibility support for both lua-5.1 and lua-5.2,
assuming that the LUA_COMPAT might have been disabled.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
- Track posix.fork() and only allow exit() and exec() if the script
has forked. There are other questionable items in posix extensions
too but these are the worst offenders.
- Using Lua registry for tracking forked status might be more Lua-way
option but this'll do for now.
- only the lua posix extension "uses" this by providing putenv()
to Lua, make it conditional and return error if not supported by
the underlying operating system
- don't build internal copy of Lua
- move 3rd party extensions (posix and rexlib) to toplevel luaext/
directory, built by default (unless --without-lua specified)
- auto*foo checks for external Lua
- minimal tweaks to lposix.c and rpmlua.c to get them build with Lua 5.1