From c14f36631cbda593fa79317449a1bfdd65b3004d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 31 Dec 2015 08:26:57 +0100 Subject: php-pecl-mongodb: fix for 32bits --- mongodb-pr185.patch | 38 ++++++++++++++++++++++++++++++++++++++ php-pecl-mongodb-dev.spec | 6 +++++- php-pecl-mongodb.spec | 6 +++++- 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/mongodb-pr185.patch b/mongodb-pr185.patch index 592b4fe..1e07435 100644 --- a/mongodb-pr185.patch +++ b/mongodb-pr185.patch @@ -31,3 +31,41 @@ index da4aed1..adbf21c 100644 } else { \ add_assoc_long(zval, key, value); \ } +From 236e1670e12e527fe0c3ca36fe9fe11b22af9e2b Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 30 Dec 2015 17:53:38 +0100 +Subject: [PATCH] PHPC-527: fix call to add_index_stringl + +--- + phongo_compat.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/phongo_compat.h b/phongo_compat.h +index adbf21c..b865b88 100644 +--- a/phongo_compat.h ++++ b/phongo_compat.h +@@ -99,7 +99,7 @@ + int tmp_len; \ + mongoc_log(MONGOC_LOG_LEVEL_WARNING, MONGOC_LOG_DOMAIN, "Integer overflow detected on your platform: %lld", value); \ + tmp_len = spprintf(&tmp, 0, "%lld", value); \ +- ADD_ASSOC_STRINGL(zval, index, tmp, tmp_len); \ ++ ADD_INDEX_STRINGL(zval, index, tmp, tmp_len); \ + efree(tmp); \ + } else { \ + add_index_long(zval, index, val); \ +@@ -167,6 +167,7 @@ + # define ADD_ASSOC_ZVAL(_zv, _key, _value) add_assoc_zval(_zv, _key, _value); + # define ADD_ASSOC_NULL_EX(_zv, _key) add_assoc_null_ex(_zv, ZEND_STRL(_key)); + # define ADD_ASSOC_BOOL_EX(_zv, _key, _value) add_assoc_bool_ex(_zv, ZEND_STRL(_key), _value); ++# define ADD_INDEX_STRINGL(_zv, _ind, _value, _len) add_index_stringl(_zv, _ind, _value, _len); + # define phongo_free_object_arg zend_object + # define phongo_zpp_char_len size_t + # define ZEND_HASH_APPLY_COUNT(ht) (ht)->u.v.nApplyCount +@@ -193,6 +194,7 @@ + # define ADD_ASSOC_ZVAL(_zv, _key, _value) add_assoc_zval(_zv, _key, _value); + # define ADD_ASSOC_NULL_EX(_zv, _key) add_assoc_null_ex(_zv, ZEND_STRS(_key)); + # define ADD_ASSOC_BOOL_EX(_zv, _key, _value) add_assoc_bool_ex(_zv, ZEND_STRS(_key), _value); ++# define ADD_INDEX_STRINGL(_zv, _ind, _value, _len) add_index_stringl(_zv, _ind, _value, _len, 0); + # define Z_PHPDATE_P(object) zend_object_store_get_object(object TSRMLS_CC) + # define Z_ISUNDEF(x) !x + # define phongo_free_object_arg void diff --git a/php-pecl-mongodb-dev.spec b/php-pecl-mongodb-dev.spec index 285d743..b6da57d 100644 --- a/php-pecl-mongodb-dev.spec +++ b/php-pecl-mongodb-dev.spec @@ -25,7 +25,7 @@ Summary: MongoDB driver for PHP Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 1.1.1 -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -227,6 +227,10 @@ rm -rf %{buildroot} %changelog +* Thu Dec 31 2015 Remi Collet - 1.1.1-2 +- fix patch for 32bits build + open https://github.com/mongodb/mongo-php-driver/pull/191 + * Sat Dec 26 2015 Remi Collet - 1.1.1-1 - Update to 1.1.1 (stable) - add patch for 32bits build, diff --git a/php-pecl-mongodb.spec b/php-pecl-mongodb.spec index 862a2d9..3afc7d4 100644 --- a/php-pecl-mongodb.spec +++ b/php-pecl-mongodb.spec @@ -25,7 +25,7 @@ Summary: MongoDB driver for PHP Name: php-pecl-%{pecl_name} Version: 1.1.1 -Release: 1%{?dist} +Release: 3%{?dist} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -196,6 +196,10 @@ cd ../ZTS %changelog +* Thu Dec 31 2015 Remi Collet - 1.1.1-3 +- fix patch for 32bits build + open https://github.com/mongodb/mongo-php-driver/pull/191 + * Sat Dec 26 2015 Remi Collet - 1.1.1-1 - Update to 1.1.1 (stable) - add patch for 32bits build, -- cgit