1 |
hoffie 09/12/29 21:16:55 |
2 |
|
3 |
Modified: pecl-ssh2-0.11.0-php-5.3-compat.patch |
4 |
Log: |
5 |
new attempt at getting a version which works with 5.2 and 5.3 |
6 |
(Portage version: 2.1.7.15/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.2 dev-php5/pecl-ssh2/files/pecl-ssh2-0.11.0-php-5.3-compat.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-php5/pecl-ssh2/files/pecl-ssh2-0.11.0-php-5.3-compat.patch?rev=1.2&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-php5/pecl-ssh2/files/pecl-ssh2-0.11.0-php-5.3-compat.patch?rev=1.2&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-php5/pecl-ssh2/files/pecl-ssh2-0.11.0-php-5.3-compat.patch?r1=1.1&r2=1.2 |
14 |
|
15 |
Index: pecl-ssh2-0.11.0-php-5.3-compat.patch |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo-x86/dev-php5/pecl-ssh2/files/pecl-ssh2-0.11.0-php-5.3-compat.patch,v |
18 |
retrieving revision 1.1 |
19 |
retrieving revision 1.2 |
20 |
diff -u -r1.1 -r1.2 |
21 |
--- pecl-ssh2-0.11.0-php-5.3-compat.patch 24 Dec 2009 12:13:11 -0000 1.1 |
22 |
+++ pecl-ssh2-0.11.0-php-5.3-compat.patch 29 Dec 2009 21:16:55 -0000 1.2 |
23 |
@@ -3,10 +3,11 @@ |
24 |
Inspired by http://osdir.com/ml/fedora-extras-commits/2009-07/msg03478.html |
25 |
and http://github.com/php/pecl-gearman/commit/e8e4579406d6b324caf0e0d4c0fcfffa0b68e8be |
26 |
|
27 |
-diff -Naur ssh2-0.11.0.orig/ssh2.c ssh2-0.11.0/ssh2.c |
28 |
---- ssh2-0.11.0.orig/ssh2.c 2008-12-02 22:50:10.000000000 +0100 |
29 |
-+++ ssh2-0.11.0/ssh2.c 2009-12-24 13:03:13.000000000 +0100 |
30 |
-@@ -48,7 +48,6 @@ |
31 |
+Index: ssh2-0.11.0/ssh2.c |
32 |
+=================================================================== |
33 |
+--- ssh2-0.11.0.orig/ssh2.c |
34 |
++++ ssh2-0.11.0/ssh2.c |
35 |
+@@ -48,7 +48,6 @@ int le_ssh2_pkey_subsys; |
36 |
#endif |
37 |
|
38 |
#ifdef ZEND_ENGINE_2 |
39 |
@@ -14,7 +15,20 @@ |
40 |
ZEND_BEGIN_ARG_INFO(php_ssh2_first_arg_force_ref, 0) |
41 |
ZEND_ARG_PASS_INFO(1) |
42 |
ZEND_END_ARG_INFO() |
43 |
-@@ -252,12 +251,13 @@ |
44 |
+@@ -56,6 +55,12 @@ static |
45 |
+ static unsigned char php_ssh2_first_arg_force_ref[] = { 1, BYREF_FORCE }; |
46 |
+ #endif |
47 |
+ |
48 |
++#if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 3) |
49 |
++# define SSH2_IS_CALLABLE(callable, check_flags, callable_name) zend_is_callable(callable, check_flags, callable_name) |
50 |
++#else |
51 |
++# define SSH2_IS_CALLABLE(callable, check_flags, callable_name) zend_is_callable(callable, check_flags, callable_name TSRMLS_CC) |
52 |
++#endif |
53 |
++ |
54 |
+ /* ************* |
55 |
+ * Callbacks * |
56 |
+ ************* */ |
57 |
+@@ -252,12 +257,13 @@ static int php_ssh2_set_callback(LIBSSH2 |
58 |
{ |
59 |
zval **handler, *copyval; |
60 |
void *internal_handler; |
61 |
@@ -25,7 +39,7 @@ |
62 |
} |
63 |
|
64 |
- if (!handler || !*handler || !zend_is_callable(*handler, 0, NULL)) { |
65 |
-+ if (!handler || !*handler || !zend_is_callable(*handler, 0, NULL TSRMLS_CC)) { |
66 |
++ if (!handler || !*handler || !SSH2_IS_CALLABLE(*handler, 0, NULL)) { |
67 |
return -1; |
68 |
} |