From c19c096a1381da06d33b66ec326e4de2f45ffcf2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 10 Jun 2012 07:06:04 +0200 Subject: repo reorg --- gnupg-php54.patch | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 gnupg-php54.patch (limited to 'gnupg-php54.patch') diff --git a/gnupg-php54.patch b/gnupg-php54.patch new file mode 100644 index 0000000..47f7e95 --- /dev/null +++ b/gnupg-php54.patch @@ -0,0 +1,113 @@ +diff -up gnupg-1.3.2/gnupg.c.php54 gnupg-1.3.2/gnupg.c +--- gnupg-1.3.2/gnupg.c.php54 1970-01-01 10:13:08.000000000 +0100 ++++ gnupg-1.3.2/gnupg.c 2012-05-06 09:36:28.377935185 +0200 +@@ -18,6 +18,7 @@ + + #include "php.h" + #include "php_ini.h" ++#include "zend_exceptions.h" + #include "ext/standard/info.h" + #include "php_gnupg.h" + +@@ -53,7 +54,7 @@ static zend_object_handlers gnupg_object + php_error_docref(NULL TSRMLS_CC, E_WARNING, (char*)error); \ + break; \ + case 2: \ +- zend_throw_exception(zend_exception_get_default(), (char*) error, 0 TSRMLS_CC); \ ++ zend_throw_exception(zend_exception_get_default(TSRMLS_C), (char*) error, 0 TSRMLS_CC); \ + break; \ + default: \ + intern->errortxt = (char*)error; \ +@@ -170,7 +171,9 @@ static void gnupg_obj_dtor(gnupg_object + /* {{{ objects_new */ + zend_object_value gnupg_obj_new(zend_class_entry *class_type TSRMLS_DC){ + gnupg_object *intern; ++#if PHP_VERSION_ID < 50400 + zval *tmp; ++#endif + zend_object_value retval; + + intern = emalloc(sizeof(gnupg_object)); +@@ -179,7 +182,12 @@ zend_object_value gnupg_obj_new(zend_cla + + ALLOC_HASHTABLE (intern->zo.properties); + zend_hash_init (intern->zo.properties, 0, NULL, ZVAL_PTR_DTOR, 0); ++ ++#if PHP_VERSION_ID < 50400 + zend_hash_copy (intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); ++#else ++ object_properties_init( (zend_object*)intern, class_type ); ++#endif + + retval.handle = zend_objects_store_put(intern,NULL,(zend_objects_free_object_storage_t) gnupg_obj_dtor,NULL TSRMLS_CC); + retval.handlers = (zend_object_handlers *) & gnupg_object_handlers; +@@ -379,7 +387,7 @@ PHP_MINFO_FUNCTION(gnupg) + /* {{{ callback func for setting the passphrase */ + + gpgme_error_t passphrase_cb (gnupg_object *intern, const char *uid_hint, const char *passphrase_info,int last_was_bad, int fd TSRMLS_DC){ +- char uid[16]; ++ char uid[17]; + int idx; + char *passphrase = NULL; + zval *return_value = NULL; +@@ -407,7 +415,7 @@ gpgme_error_t passphrase_cb (gnupg_objec + } + + gpgme_error_t passphrase_decrypt_cb (gnupg_object *intern, const char *uid_hint, const char *passphrase_info,int last_was_bad, int fd TSRMLS_DC){ +- char uid[16]; ++ char uid[17]; + int idx; + char *passphrase = NULL; + zval *return_value = NULL; +@@ -1244,7 +1252,6 @@ PHP_FUNCTION(gnupg_decryptverify){ + gpgme_data_t in, out; + gpgme_decrypt_result_t decrypt_result; + gpgme_verify_result_t verify_result; +- gpgme_signature_t gpg_signatures; + + GNUPG_GETOBJ(); + +@@ -1472,13 +1479,12 @@ PHP_FUNCTION(gnupg_gettrustlist){ + /* {{{ proto array gnupg_listsignatures(string keyid) */ + PHP_FUNCTION(gnupg_listsignatures){ + char *keyid; +- char keyid_len; ++ int keyid_len; + + zval *sub_arr; + zval *sig_arr; + + gpgme_key_t gpgme_key; +- gpgme_subkey_t gpgme_subkey; + gpgme_user_id_t gpgme_userid; + gpgme_key_sig_t gpgme_signature; + +diff -up gnupg-1.3.2/gnupg_keylistiterator.c.php54 gnupg-1.3.2/gnupg_keylistiterator.c +--- gnupg-1.3.2/gnupg_keylistiterator.c.php54 1970-01-01 10:13:08.000000000 +0100 ++++ gnupg-1.3.2/gnupg_keylistiterator.c 2012-05-06 09:35:59.584823512 +0200 +@@ -23,6 +23,7 @@ + #include "php_ini.h" + #include "ext/standard/info.h" + #include "zend_interfaces.h" ++#include "zend_exceptions.h" + #include "php_gnupg.h" + #include "php_gnupg_keylistiterator.h" + +@@ -148,7 +149,7 @@ PHP_METHOD(gnupg_keylistiterator,next){ + gpgme_key_release(intern->gpgkey); + } + +- if(intern->err = gpgme_op_keylist_next(intern->ctx, &intern->gpgkey)){ ++ if((intern->err = gpgme_op_keylist_next(intern->ctx, &intern->gpgkey))){ + gpgme_key_release(intern->gpgkey); + intern->gpgkey = NULL; + } +@@ -159,7 +160,7 @@ PHP_METHOD(gnupg_keylistiterator,rewind) + GNUPG_GET_ITERATOR(); + + if((intern->err = gpgme_op_keylist_start(intern->ctx, Z_STRVAL(intern->pattern), 0)) != GPG_ERR_NO_ERROR){ +- zend_throw_exception(zend_exception_get_default(),gpg_strerror(intern->err),1 TSRMLS_CC); ++ zend_throw_exception(zend_exception_get_default(TSRMLS_C),gpg_strerror(intern->err),1 TSRMLS_CC); + } + if((intern->err = gpgme_op_keylist_next(intern->ctx, &intern->gpgkey))!=GPG_ERR_NO_ERROR){ + RETURN_FALSE; -- cgit