summaryrefslogtreecommitdiffstats
path: root/lua-build.patch
blob: fbdcbbbe568faebcff3ec3e5e81b5b8dd3852db9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
diff -ru lua-1.1.0.old/config.m4 lua-1.1.0/config.m4
--- lua-1.1.0.old/config.m4	2013-10-23 06:21:11.000000000 +0200
+++ lua-1.1.0/config.m4	2013-10-24 07:46:14.000000000 +0200
@@ -21,7 +21,7 @@
     AC_MSG_ERROR(Please reinstall the lua distribution - lua.h should be in <lua-dir>/include/)
   fi
 
-  LUA_LIB_NAME=liblua.a
+  LUA_LIB_NAME=liblua.so
 
   if test -r $PHP_LUA/$PHP_LIBDIR/${LUA_LIB_NAME}; then
     LUA_LIB_DIR=$PHP_LUA/$PHP_LIBDIR
diff -ru lua-1.1.0.old/lua.c lua-1.1.0/lua.c
--- lua-1.1.0.old/lua.c	2013-10-23 06:21:11.000000000 +0200
+++ lua-1.1.0/lua.c	2013-10-24 07:46:40.000000000 +0200
@@ -892,7 +892,9 @@
 	REGISTER_LONG_CONSTANT("LUA_ERRRUN", LUA_ERRRUN, CONST_PERSISTENT | CONST_CS);
 	REGISTER_LONG_CONSTANT("LUA_ERRSYNTAX", LUA_ERRSYNTAX, CONST_PERSISTENT | CONST_CS);
 	REGISTER_LONG_CONSTANT("LUA_ERRMEM", LUA_ERRMEM, CONST_PERSISTENT | CONST_CS);
+#ifdef LUA_ERRGCMM
 	REGISTER_LONG_CONSTANT("LUA_ERRGCMM", LUA_ERRGCMM, CONST_PERSISTENT | CONST_CS);
+#endif
 	REGISTER_LONG_CONSTANT("LUA_ERRERR", LUA_ERRERR, CONST_PERSISTENT | CONST_CS);
 	REGISTER_LONG_CONSTANT("LUA_ERRFILE", LUA_ERRFILE, CONST_PERSISTENT | CONST_CS);
 
diff -ru lua-1.1.0.old/php_lua.h lua-1.1.0/php_lua.h
--- lua-1.1.0.old/php_lua.h	2013-10-23 06:21:11.000000000 +0200
+++ lua-1.1.0/php_lua.h	2013-10-24 07:46:58.000000000 +0200
@@ -24,6 +24,10 @@
 #include "lauxlib.h"
 #include "lualib.h"
 
+#ifndef LUA_OK
+#define LUA_OK 0
+#endif
+
 extern zend_module_entry lua_module_entry;
 #define phpext_lua_ptr &lua_module_entry
 
diff -ru lua-1.1.0.old/tests/001.phpt lua-1.1.0/tests/001.phpt
--- lua-1.1.0.old/tests/001.phpt	2013-10-23 06:21:11.000000000 +0200
+++ lua-1.1.0/tests/001.phpt	2013-10-24 07:48:03.000000000 +0200
@@ -18,4 +18,4 @@
 --EXPECTF--
 12
 -0.53657291800043
-[string "line"]:1: syntax error near 'code'
+[string "line"]:1: %s near 'code'
diff -ru lua-1.1.0.old/tests/006.phpt lua-1.1.0/tests/006.phpt
--- lua-1.1.0.old/tests/006.phpt	2013-10-23 06:21:11.000000000 +0200
+++ lua-1.1.0/tests/006.phpt	2013-10-24 07:48:12.000000000 +0200
@@ -32,7 +32,7 @@
 Hello PHP
 Testing broken
 
-%s:%d: syntax error near 'fdrg'
+%s:%d: %s near 'fdrg'
 Testing return
 Array
 (
From d893cd58c24ef96c931f68c7060818ed7c7d6124 Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Wed, 6 Nov 2013 14:11:45 +0100
Subject: [PATCH] zval_copy_property_ctor have been added in 5.3.4 (so not in
 5.3.3)

---
 lua.c         | 2 +-
 lua_closure.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lua.c b/lua.c
index 9a0c18a..3c9b5ba 100644
--- a/lua.c
+++ b/lua.c
@@ -212,7 +212,7 @@ static zend_object_value php_lua_create_object(zend_class_entry *ce TSRMLS_DC) {
 
 #if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 4)
 	zend_hash_copy(lua_obj->obj.properties, &ce->default_properties,
-#if (PHP_MINOR_VERSION < 3)
+#if (PHP_MINOR_VERSION < 4)
 			(copy_ctor_func_t) zval_add_ref,
 #else
 			zval_copy_property_ctor(ce),
diff --git a/lua_closure.c b/lua_closure.c
index ac17206..24346dd 100644
--- a/lua_closure.c
+++ b/lua_closure.c
@@ -203,7 +203,7 @@ static zend_object_value php_lua_closure_create_object(zend_class_entry *ce TSRM
 	zend_object_std_init(lua_closure_obj, ce TSRMLS_CC);
 #if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 4)
 	zend_hash_copy(lua_closure_obj->properties, &ce->default_properties, 
-#if (PHP_MINOR_VERSION < 3) 
+#if (PHP_MINOR_VERSION < 4)
 			(copy_ctor_func_t) zval_add_ref,
 #else
 			zval_copy_property_ctor(ce), 
-- 
1.8.4