From 316f490fb6fb836c7a0dc255f904ee6632012544 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 25 Jul 2014 16:54:24 +0200 Subject: php-pecl-sync: 1.0.1 (x86_64 only) --- REFLECTION | 2 +- php-pecl-sync.spec | 21 ++++++--------------- sync-build.patch | 55 ------------------------------------------------------ 3 files changed, 7 insertions(+), 71 deletions(-) delete mode 100644 sync-build.patch diff --git a/REFLECTION b/REFLECTION index eb24804..067a603 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #143 sync version 1.0.0 ] { +Extension [ extension #143 sync version 1.0.1 ] { - Classes [4] { Class [ class SyncMutex ] { diff --git a/php-pecl-sync.spec b/php-pecl-sync.spec index 5d8e314..734dc16 100644 --- a/php-pecl-sync.spec +++ b/php-pecl-sync.spec @@ -21,15 +21,13 @@ Summary: Named and unnamed synchronization objects Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 1.0.0 +Version: 1.0.1 Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: MIT Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -Patch0: %{pecl_name}-build.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel > 5.3 BuildRequires: %{?scl_prefix}php-pear @@ -79,9 +77,6 @@ and Windows platforms. mv %{pecl_name}-%{version} NTS cd NTS - -%patch0 -p1 - # Sanity check, really often broken extver=$(sed -n '/#define PHP_SYNC_VERSION/{s/.* "//;s/".*$//;p}' php_sync.h) if test "x${extver}" != "x%{version}"; then @@ -168,14 +163,7 @@ export TEST_PHP_EXECUTABLE=%{__php} export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" export NO_INTERACTION=1 export REPORT_EXIT_STATUS=1 -if ! %{__php} -n run-tests.php -then - for i in tests/*diff - do - cat $i - done - exit 1 -fi +%{__php} -n run-tests.php --show-diff %if %{with_zts} cd ../ZTS @@ -187,7 +175,7 @@ cd ../ZTS : Upstream test suite for ZTS extension export TEST_PHP_EXECUTABLE=%{_bindir}/zts-php export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" -%{_bindir}/zts-php -n run-tests.php +%{_bindir}/zts-php -n run-tests.php --show-diff %endif @@ -211,5 +199,8 @@ rm -rf %{buildroot} %changelog +* Fri Jul 25 2014 Remi Collet - 1.0.1-1 +- Update to 1.0.1 (stable) + * Tue Jul 8 2014 Remi Collet - 1.0.0-1 - initial package, version 1.0.0 (stable) \ No newline at end of file diff --git a/sync-build.patch b/sync-build.patch deleted file mode 100644 index 910c3f4..0000000 --- a/sync-build.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/sync.c b/sync.c -index 016c636..f8344bd 100644 ---- a/sync.c -+++ b/sync.c -@@ -22,5 +22,10 @@ - #include "php_sync.h" - -+/* PHP_FE_END not define in php < 5.3.7 */ -+#ifndef PHP_FE_END -+#define PHP_FE_END {NULL, NULL, NULL} -+#endif -+ - /* {{{ sync_module_entry - */ - zend_module_entry sync_module_entry = { -diff --git a/config.m4 b/config.m4 -index a386835..877bb61 100644 ---- a/config.m4 -+++ b/config.m4 -@@ -23,6 +23,9 @@ if test "$PHP_SYNC" != "no"; then - AC_MSG_ERROR([sem_open() is not available on this platform]) - ]) - -+ PHP_ADD_LIBRARY(rt,,SYNC_SHARED_LIBADD) -+ PHP_SUBST(SYNC_SHARED_LIBADD) -+ - dnl # Finish defining the basic extension support. - AC_DEFINE(HAVE_SYNC, 1, [Whether you have synchronization object support]) - PHP_NEW_EXTENSION(sync, sync.c, $ext_shared) -diff --git a/sync.c b/sync.c -index 529133a..40fe075 100644 ---- a/sync.c -+++ b/sync.c -@@ -1120,11 +1120,17 @@ int sync_ReaderWriter_readunlock_internal(sync_ReaderWriter_object *obj) - if (!sync_WaitForSemaphore(obj->MxSemRSemMutex, INFINITE)) return 0; - - /* Release the semaphore. */ -- Result = sem_post(obj->MxSemRSemaphore); -- -- /* Update the event state. */ - sem_getvalue(obj->MxSemRSemaphore, &Val); -- if (Val == SEM_VALUE_MAX) sem_post(obj->MxSemRWaitEvent); -+ if (Val == SEM_VALUE_MAX) { -+ Result = 1; -+ sem_post(obj->MxSemRWaitEvent); -+ } else { -+ Result = sem_post(obj->MxSemRSemaphore); -+ -+ /* Update the event state. */ -+ sem_getvalue(obj->MxSemRSemaphore, &Val); -+ if (Val == SEM_VALUE_MAX) sem_post(obj->MxSemRWaitEvent); -+ } - - if (obj->MxReadLocks) obj->MxReadLocks--; - -- cgit