From owner-svn-ports-head@freebsd.org Tue Oct 9 12:44:07 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B22F10CD960; Tue, 9 Oct 2018 12:44:07 +0000 (UTC) (envelope-from vanilla@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2400A86BD3; Tue, 9 Oct 2018 12:44:07 +0000 (UTC) (envelope-from vanilla@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1964B1240A; Tue, 9 Oct 2018 12:44:07 +0000 (UTC) (envelope-from vanilla@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w99Ci6Wo063342; Tue, 9 Oct 2018 12:44:06 GMT (envelope-from vanilla@FreeBSD.org) Received: (from vanilla@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w99Ci6Q8063338; Tue, 9 Oct 2018 12:44:06 GMT (envelope-from vanilla@FreeBSD.org) Message-Id: <201810091244.w99Ci6Q8063338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vanilla set sender to vanilla@FreeBSD.org using -f From: "Vanilla I. Shu" Date: Tue, 9 Oct 2018 12:44:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r481629 - in head/devel/pecl-swoole: . files X-SVN-Group: ports-head X-SVN-Commit-Author: vanilla X-SVN-Commit-Paths: in head/devel/pecl-swoole: . files X-SVN-Commit-Revision: 481629 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 12:44:07 -0000 Author: vanilla Date: Tue Oct 9 12:44:06 2018 New Revision: 481629 URL: https://svnweb.freebsd.org/changeset/ports/481629 Log: Fix building with php73. Added: head/devel/pecl-swoole/files/patch-php7__wrapper.h (contents, props changed) head/devel/pecl-swoole/files/patch-swoole__serialize.c (contents, props changed) Modified: head/devel/pecl-swoole/Makefile head/devel/pecl-swoole/files/patch-config.m4 Modified: head/devel/pecl-swoole/Makefile ============================================================================== --- head/devel/pecl-swoole/Makefile Tue Oct 9 12:37:49 2018 (r481628) +++ head/devel/pecl-swoole/Makefile Tue Oct 9 12:44:06 2018 (r481629) @@ -3,7 +3,7 @@ PORTNAME= swoole PORTVERSION= 1.10.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel net MAINTAINER= vanilla@FreeBSD.org Modified: head/devel/pecl-swoole/files/patch-config.m4 ============================================================================== --- head/devel/pecl-swoole/files/patch-config.m4 Tue Oct 9 12:37:49 2018 (r481628) +++ head/devel/pecl-swoole/files/patch-config.m4 Tue Oct 9 12:44:06 2018 (r481629) @@ -1,6 +1,6 @@ ---- config.m4.orig 2017-09-26 08:30:45 UTC +--- config.m4.orig 2018-05-14 10:43:31 UTC +++ config.m4 -@@ -255,7 +255,7 @@ if test "$PHP_SWOOLE" != "no"; then +@@ -278,7 +278,7 @@ if test "$PHP_SWOOLE" != "no"; then AC_CHECK_LIB(c, poll, AC_DEFINE(HAVE_POLL, 1, [have poll])) AC_CHECK_LIB(c, sendfile, AC_DEFINE(HAVE_SENDFILE, 1, [have sendfile])) AC_CHECK_LIB(c, kqueue, AC_DEFINE(HAVE_KQUEUE, 1, [have kqueue])) Added: head/devel/pecl-swoole/files/patch-php7__wrapper.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/pecl-swoole/files/patch-php7__wrapper.h Tue Oct 9 12:44:06 2018 (r481629) @@ -0,0 +1,14 @@ +--- php7_wrapper.h.orig 2018-10-09 11:57:28 UTC ++++ php7_wrapper.h +@@ -456,7 +456,11 @@ static inline int sw_zend_register_class + + zend_string *_interned_name = zend_new_interned_string(_name); + ++#if PHP_VERSION_ID >= 70300 ++ return zend_register_class_alias_ex(_interned_name->val, _interned_name->len, ce, 1); ++#else + return zend_register_class_alias_ex(_interned_name->val, _interned_name->len, ce); ++#endif + } + + static inline char* sw_http_build_query(zval *data, zend_size_t *length, smart_str *formstr TSRMLS_DC) Added: head/devel/pecl-swoole/files/patch-swoole__serialize.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/pecl-swoole/files/patch-swoole__serialize.c Tue Oct 9 12:44:06 2018 (r481629) @@ -0,0 +1,67 @@ +--- swoole_serialize.c.orig 2018-05-14 10:43:31 UTC ++++ swoole_serialize.c +@@ -658,11 +658,17 @@ static void* swoole_unserialize_arr(void + ht->nNumUsed = nNumOfElements; + ht->nNumOfElements = nNumOfElements; + ht->nNextFreeElement = 0; ++#ifdef HASH_FLAG_APPLY_PROTECTION + ht->u.flags = HASH_FLAG_APPLY_PROTECTION; ++#endif + ht->nTableMask = -(ht->nTableSize); + ht->pDestructor = ZVAL_PTR_DTOR; + ++#if PHP_VERSION_ID < 70300 + GC_REFCOUNT(ht) = 1; ++#else ++ GC_SET_REFCOUNT(ht, 1); ++#endif + GC_TYPE_INFO(ht) = IS_ARRAY; + // if (ht->nNumUsed) + //{ +@@ -985,8 +991,9 @@ try_again: + { + zend_array *ht = Z_ARRVAL_P(data); + +- if (ZEND_HASH_GET_APPLY_COUNT(ht) > 1) ++ if (GC_IS_RECURSIVE(ht)) + { ++ ((SBucketType*) (buffer->buffer + p))->data_type = IS_NULL; //reset type null + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "you array have cycle ref"); + } + else +@@ -994,9 +1001,9 @@ try_again: + seria_array_type(ht, buffer, p, buffer->offset); + if (ZEND_HASH_APPLY_PROTECTION(ht)) + { +- ZEND_HASH_INC_APPLY_COUNT(ht); ++ GC_PROTECT_RECURSION(ht); + swoole_serialize_arr(buffer, ht); +- ZEND_HASH_DEC_APPLY_COUNT(ht); ++ GC_UNPROTECT_RECURSION(ht); + } + else + { +@@ -1022,9 +1029,9 @@ try_again: + + if (ZEND_HASH_APPLY_PROTECTION(Z_OBJPROP_P(data))) + { +- ZEND_HASH_INC_APPLY_COUNT(Z_OBJPROP_P(data)); ++ GC_PROTECT_RECURSION(Z_OBJPROP_P(data)); + swoole_serialize_object(buffer, data, p); +- ZEND_HASH_DEC_APPLY_COUNT(Z_OBJPROP_P(data)); ++ GC_UNPROTECT_RECURSION(Z_OBJPROP_P(data)); + } + else + { +@@ -1405,7 +1412,11 @@ PHPAPI zend_string* php_swoole_serialize + z_str->val[str.offset] = '\0'; + z_str->len = str.offset - _STR_HEADER_SIZE; + z_str->h = 0; ++#if PHP_VERSION_ID < 70300 + GC_REFCOUNT(z_str) = 1; ++#else ++ GC_SET_REFCOUNT(z_str, 1); ++#endif + GC_TYPE_INFO(z_str) = IS_STRING_EX; + + return z_str;