Commit Graph

17 Commits

Author SHA1 Message Date
Johannes Dewender cd7ca60a6c Finish lua 5.2 support, trac #865
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>
2013-04-05 08:26:21 +03:00
Anders F Bjorklund ac959fed00 Add lua 5.2 support.
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>
2012-10-09 08:28:52 +03:00
Panu Matilainen f825911b73 Use pkg-config to find Lua + determine flags (ticket #88)
- Additionally clean up the logic a bit and dont bother building
  any lua-related bits if disabled
2011-03-28 12:54:42 +03:00
Panu Matilainen f8752d2ca3 Basic protection against Lua os.exit() and posix.exec() (ticket #167)
- 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.
2010-11-15 09:49:14 +02:00
Michael Schroeder 18c3e1a37c New gcc versions comlpain about undefined behaviour... 2010-04-12 12:11:05 +02:00
Panu Matilainen 53e3f65b8e Fix include path of luaext subdir 2010-01-27 15:23:46 +02:00
Panu Matilainen 580f9625e1 Remove largely unnecessary putenv() replacement
- 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
2010-01-04 14:15:20 +02:00
Panu Matilainen 05dcdf44d0 Use rpm's own strdup() clone everywhere 2010-01-04 13:30:14 +02:00
Panu Matilainen 6fb96f3847 Help compilers/analyzers a bit with luaL_error()
- luaL_error() never returns but as other tools dont know this it
  raises false alarms
2009-09-07 16:23:32 +03:00
Panu Matilainen a8abeef91f Use rpmConfigDir() instead of hardwired value in Lua initialization
- userconfig is actually unused
2008-11-22 18:09:23 +02:00
Panu Matilainen a8ba86f05b setenv() + unsetenv() are always available in rpm 2008-10-20 11:46:42 +03:00
Panu Matilainen f7707ad3ff Add posix.mkstemp() to Lua posix lib
- lifted from apt-rpm
2008-10-20 11:32:43 +03:00
Panu Matilainen fc9723a64c Reuse toplevel WITH_LUA_LIB setting instead of manual setting 2008-10-14 15:41:56 +03:00
Panu Matilainen a89c861a3d (char)NULL doesn't make much sense, use \0 instead
- shuts up another gcc warning
2008-06-30 15:13:54 +03:00
Panu Matilainen f829c42f07 Fixup leftovers from lua/local -> luaext/ move 2008-04-16 15:54:40 +03:00
Panu Matilainen 1c979525dc Add modemuncher + lua init stuff to extra dist
- modemuncher.c gets included from lposix.c, urks
2008-04-16 15:37:52 +03:00
Panu Matilainen d48e6c8380 Start phasing out internal copy of Lua
- 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
2008-04-16 15:37:52 +03:00