diff --git a/lua/lualdap/config-no-compat-5.1.patch b/lua/lualdap/config-no-compat-5.1.patch index 4abade54f..9f8dfd3d3 100644 --- a/lua/lualdap/config-no-compat-5.1.patch +++ b/lua/lualdap/config-no-compat-5.1.patch @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../lualdap/config-no-compat-5.1.patch -# Copyright (C) 2006 The OpenSDE Project +# Copyright (C) 2006 - 2007 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -59,13 +59,3 @@ CFLAGS= $(WARN) $(INCS) CC= gcc ---- ./src/lualdap.c.orig 2006-10-09 14:35:48.000000000 +0200 -+++ ./src/lualdap.c 2006-10-09 14:35:11.000000000 +0200 -@@ -16,7 +16,6 @@ - - #include "lua.h" - #include "lauxlib.h" --#include "compat-5.1.h" - - - #define LUALDAP_PREFIX "LuaLDAP: " diff --git a/lua/lualdap/lualdap-5.1-compat.patch b/lua/lualdap/lualdap-5.1-compat.patch new file mode 100644 index 000000000..ed14b5e39 --- /dev/null +++ b/lua/lualdap/lualdap-5.1-compat.patch @@ -0,0 +1,39 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../lualdap/lualdap-5.1-compat.patch +# Copyright (C) 2007 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +--- lualdap/src/lualdap.c 2006/04/04 20:11:51 1.44 ++++ lualdap/src/lualdap.c 2006/07/24 01:36:51 1.45 +@@ -1,7 +1,7 @@ + /* + ** LuaLDAP + ** See Copyright Notice in license.html +-** $Id: lualdap.c,v 1.44 2006/04/04 20:11:51 carregal Exp $ ++** $Id: lualdap.c,v 1.45 2006/07/24 01:36:51 tomas Exp $ + */ + + #include +@@ -16,8 +16,9 @@ + + #include "lua.h" + #include "lauxlib.h" ++#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 + #include "compat-5.1.h" +- ++#endif + + #define LUALDAP_PREFIX "LuaLDAP: " + #define LUALDAP_TABLENAME "lualdap" + diff --git a/lua/lualdap/lualdap-5.1.1-compat.patch b/lua/lualdap/lualdap-5.1.1-compat.patch new file mode 100644 index 000000000..12c4bbbe6 --- /dev/null +++ b/lua/lualdap/lualdap-5.1.1-compat.patch @@ -0,0 +1,83 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../lualdap/lualdap-5.1.1-compat.patch +# Copyright (C) 2007 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +Description: Updating to run also on Lua 5.1.1 +Origin: see upstream cvs (Revision 1.46) + +--- lualdap/src/lualdap.c 2006/07/24 01:36:51 1.45 ++++ lualdap/src/lualdap.c 2007/02/07 15:05:48 1.46 +@@ -463,7 +463,7 @@ static int lualdap_close (lua_State *L) + */ + static int lualdap_add (lua_State *L) { + conn_data *conn = getconnection (L); +- const char *dn = luaL_check_string (L, 2); ++ const char *dn = luaL_checkstring (L, 2); + attrs_data attrs; + int rc, msgid; + A_init (&attrs); +@@ -485,11 +485,11 @@ static int lualdap_add (lua_State *L) { + */ + static int lualdap_compare (lua_State *L) { + conn_data *conn = getconnection (L); +- const char *dn = luaL_check_string (L, 2); +- const char *attr = luaL_check_string (L, 3); ++ const char *dn = luaL_checkstring (L, 2); ++ const char *attr = luaL_checkstring (L, 3); + BerValue bvalue; + int rc, msgid; +- bvalue.bv_val = (char *)luaL_check_string (L, 4); ++ bvalue.bv_val = (char *)luaL_checkstring (L, 4); + bvalue.bv_len = lua_strlen (L, 4); + rc = ldap_compare_ext (conn->ld, dn, attr, &bvalue, NULL, NULL, &msgid); + return create_future (L, rc, 1, msgid, LDAP_RES_COMPARE); +@@ -504,7 +504,7 @@ static int lualdap_compare (lua_State *L + */ + static int lualdap_delete (lua_State *L) { + conn_data *conn = getconnection (L); +- const char *dn = luaL_check_string (L, 2); ++ const char *dn = luaL_checkstring (L, 2); + int rc, msgid; + rc = ldap_delete_ext (conn->ld, dn, NULL, NULL, &msgid); + return create_future (L, rc, 1, msgid, LDAP_RES_DELETE); +@@ -539,7 +539,7 @@ static int op2code (const char *s) { + */ + static int lualdap_modify (lua_State *L) { + conn_data *conn = getconnection (L); +- const char *dn = luaL_check_string (L, 2); ++ const char *dn = luaL_checkstring (L, 2); + attrs_data attrs; + int rc, msgid, param = 3; + A_init (&attrs); +@@ -565,8 +565,8 @@ static int lualdap_modify (lua_State *L) + */ + static int lualdap_rename (lua_State *L) { + conn_data *conn = getconnection (L); +- const char *dn = luaL_check_string (L, 2); +- const char *rdn = luaL_check_string (L, 3); ++ const char *dn = luaL_checkstring (L, 2); ++ const char *rdn = luaL_checkstring (L, 3); + const char *par = luaL_optlstring (L, 4, NULL, NULL); + const int del = luaL_optnumber (L, 5, 0); + int msgid; +@@ -915,7 +915,7 @@ static int lualdap_createmeta (lua_State + ** @return #1 Userdata with connection structure. + */ + static int lualdap_open_simple (lua_State *L) { +- const char *host = luaL_check_string (L, 1); ++ const char *host = luaL_checkstring (L, 1); + const char *who = luaL_optstring (L, 2, NULL); + const char *password = luaL_optstring (L, 3, NULL); + int use_tls = lua_toboolean (L, 4);