making it Lua 5.2 (and 5.1) compatible

This commit is contained in:
Axel Kittenberger 2012-09-25 17:29:12 +02:00
parent b6fa608787
commit ab36ab7823
3 changed files with 5 additions and 3 deletions

View File

@ -129,7 +129,7 @@ l_rmwatch(lua_State *L)
/** /**
* Cores inotify functions. * Cores inotify functions.
*/ */
static const luaL_reg linotfylib[] = { static const luaL_Reg linotfylib[] = {
{"addwatch", l_addwatch }, {"addwatch", l_addwatch },
{"rmwatch", l_rmwatch }, {"rmwatch", l_rmwatch },
{NULL, NULL} {NULL, NULL}

View File

@ -1263,7 +1263,7 @@ l_nonobserve_fd(lua_State *L)
return 0; return 0;
} }
static const luaL_reg lsyncdlib[] = { static const luaL_Reg lsyncdlib[] = {
{"configure", l_configure }, {"configure", l_configure },
{"exec", l_exec }, {"exec", l_exec },
{"log", l_log }, {"log", l_log },
@ -1676,7 +1676,7 @@ main1(int argc, char *argv[])
int argp = 1; int argp = 1;
// load Lua // load Lua
L = lua_open(); L = luaL_newstate();
luaL_openlibs(L); luaL_openlibs(L);
{ {
// checks the lua version // checks the lua version

View File

@ -16,6 +16,8 @@
#define _XOPEN_SOURCE 700 #define _XOPEN_SOURCE 700
#define _DARWIN_C_SOURCE 1 #define _DARWIN_C_SOURCE 1
#define LUA_COMPAT_ALL
// includes needed for headerfile // includes needed for headerfile
#include "config.h" #include "config.h"