Author: rjung
Date: Wed Feb 1 13:17:46 2012
New Revision: 1239120
URL: http://svn.apache.org/viewvc?rev=1239120&view=rev
Log:
Improve Lua 5.2.0 compatibility.
This is not yet complete. Building should
still work with Lua 5.1.4, but needs
-DLUA_COMPAT_ALL in CPPFLAGS when compiled
against 5.2.0. Automatically handling
this in configure is still a TODO.
Backport from trunk of the following revisions:
r1221205: Make mod_lua compile with lua 5.2.x.
MOdified patch submitted by NormW (nornw gknw net).
r1239029: luaL_reg was already deprecated in Lua 5.1.4.
It is gone in Lua 5.2.0 and was replaced by luaL_Reg
which already existed in 5.1.4. So use that one.
r1239030: Remove luaL_reg macro definition no longer needed
and simplify lua_load compatibility macro.
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/modules/lua/NWGNUmakefile
httpd/httpd/branches/2.4.x/modules/lua/lua_apr.c
httpd/httpd/branches/2.4.x/modules/lua/mod_lua.h
Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 1 13:17:46 2012
@@ -1,3 +1,3 @@
/httpd/httpd/branches/revert-ap-ldap:1150158-1150173
/httpd/httpd/branches/wombat-integration:723609-723841
-/httpd/httpd/trunk:1200496,1200556,1200702,1200955,1200968,1201032,1201042,1201111,1201194,1201198,1201202,1201450,1201956,1202236,1202453,1202456,1202886,1203400,1203714,1203859,1203980,1204630,1204968,1204990,1205061,1205075,1205379,1205885,1206291,1206472,1206587,1206850,1206940,1206978,1207719,1208753,1208835,1209053,1209085,1209417,1209432,1209461,1209601,1209603,1209618,1209623,1209741,1209754,1209766,1209776,1209797-1209798,1209811-1209812,1209814,1209908,1209910,1209913,1209916-1209917,1209947,1209952,1210067,1210080,1210120,1210124,1210130,1210148,1210219,1210221,1210252,1210284,1210336,1210378,1210725,1210892,1210951,1210954,1211351,1211364,1211490,1211495,1211528,1211663,1211680,1212872,1212883,1213338,1213381,1213391,1213567,1214003,1214005,1214015,1215514,1220462,1220467,1220493,1220524,1220570,1220768,1220794,1220826,1220846,1221292,1222335,1222370,1222473,1222915,1222917,1222921,1223048,1225060,1225197-1225199,1225223,1225380,1225476,1225478,1225791,1225795-12
25796,1226339,1226375,1227910,1228700,1228816,1229024,1229059,1229099,1229116,1229134,1229136,1229930,1230286,1231442,1231446,1231508,1231510,1231518,1232575,1232594,1232630,1232838,1234180,1234297,1234479,1234511,1234565,1234574,1234642-1234643,1234876,1234899,1236701,1237407,1238545,1238768,1239071
+/httpd/httpd/trunk:1200496,1200556,1200702,1200955,1200968,1201032,1201042,1201111,1201194,1201198,1201202,1201450,1201956,1202236,1202453,1202456,1202886,1203400,1203714,1203859,1203980,1204630,1204968,1204990,1205061,1205075,1205379,1205885,1206291,1206472,1206587,1206850,1206940,1206978,1207719,1208753,1208835,1209053,1209085,1209417,1209432,1209461,1209601,1209603,1209618,1209623,1209741,1209754,1209766,1209776,1209797-1209798,1209811-1209812,1209814,1209908,1209910,1209913,1209916-1209917,1209947,1209952,1210067,1210080,1210120,1210124,1210130,1210148,1210219,1210221,1210252,1210284,1210336,1210378,1210725,1210892,1210951,1210954,1211351,1211364,1211490,1211495,1211528,1211663,1211680,1212872,1212883,1213338,1213381,1213391,1213567,1214003,1214005,1214015,1215514,1220462,1220467,1220493,1220524,1220570,1220768,1220794,1220826,1220846,1221205,1221292,1222335,1222370,1222473,1222915,1222917,1222921,1223048,1225060,1225197-1225199,1225223,1225380,1225476,1225478,1225791,12
25795-1225796,1226339,1226375,1227910,1228700,1228816,1229024,1229059,1229099,1229116,1229134,1229136,1229930,1230286,1231442,1231446,1231508,1231510,1231518,1232575,1232594,1232630,1232838,1234180,1234297,1234479,1234511,1234565,1234574,1234642-1234643,1234876,1234899,1236701,1237407,1238545,1238768,1239029-1239030,1239071
Modified: httpd/httpd/branches/2.4.x/modules/lua/NWGNUmakefile
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/lua/NWGNUmakefile?rev=1239120&r1=1239119&r2=1239120&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/lua/NWGNUmakefile (original)
+++ httpd/httpd/branches/2.4.x/modules/lua/NWGNUmakefile Wed Feb 1 13:17:46 2012
@@ -44,6 +44,7 @@ XCFLAGS += \
# These defines will come after DEFINES
#
XDEFINES += \
+ -DLUA_COMPAT_ALL \
$(EOLIST)
#
Modified: httpd/httpd/branches/2.4.x/modules/lua/lua_apr.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/lua/lua_apr.c?rev=1239120&r1=1239119&r2=1239120&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/lua/lua_apr.c (original)
+++ httpd/httpd/branches/2.4.x/modules/lua/lua_apr.c Wed Feb 1 13:17:46 2012
@@ -65,7 +65,7 @@ static int lua_table_get(lua_State *L)
return 1;
}
-static const luaL_reg lua_table_methods[] = {
+static const luaL_Reg lua_table_methods[] = {
{"set", lua_table_set},
{"get", lua_table_get},
{0, 0}
Modified: httpd/httpd/branches/2.4.x/modules/lua/mod_lua.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/lua/mod_lua.h?rev=1239120&r1=1239119&r2=1239120&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/lua/mod_lua.h (original)
+++ httpd/httpd/branches/2.4.x/modules/lua/mod_lua.h Wed Feb 1 13:17:46 2012
@@ -44,6 +44,11 @@
#include "lauxlib.h"
#include "lualib.h"
+#if LUA_VERSION_NUM > 501
+/* Load mode for lua_load() */
+#define lua_load(a,b,c,d) lua_load(a,b,c,d,NULL)
+#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
*/
|