]> granicus.if.org Git - apache/commitdiff
Make mod_lua compile with lua 5.2.x.
authorGuenter Knauf <fuankg@apache.org>
Tue, 20 Dec 2011 11:27:43 +0000 (11:27 +0000)
committerGuenter Knauf <fuankg@apache.org>
Tue, 20 Dec 2011 11:27:43 +0000 (11:27 +0000)
MOdified patch submitted by NormW (nornw gknw net).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1221205 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/NWGNUmakefile
modules/lua/mod_lua.h

index dcff6679c4228e6d1c488bf6ea09741b58206699..36d0a699b489416cd3f35f597a38e2f66df8c1c1 100644 (file)
@@ -44,6 +44,7 @@ XCFLAGS               += \
 # These defines will come after DEFINES
 #
 XDEFINES       += \
+                       -DLUA_COMPAT_ALL \
                        $(EOLIST)
 
 #
index 16627240eb2341d359d84f813e85a03b578793a3..29ab38afe3ae8e1b932c19eb6058331aadb9892c 100644 (file)
 #include "lauxlib.h"
 #include "lualib.h"
 
+#if LUA_VERSION_NUM > 501
+/* Load mode for lua_load() */
+#define DFLT_LUA_LOAD_MODE "bt"
+#define lua_load(a,b,c,d) lua_load(a,b,c,d,DFLT_LUA_LOAD_MODE)
+#define luaL_reg luaL_Reg
+#endif
+
 /* Create a set of AP_LUA_DECLARE(type), AP_LUA_DECLARE_NONSTD(type) and
  * AP_LUA_DECLARE_DATA with appropriate export and import tags for the platform
  */