Sat Mar 3 09:23:40 2018 UTC ()
Pullup ticket #5717 - requested by taca
lang/php71: security update

Revisions pulled up:
- lang/php71/buildlink3.mk                                      1.5
- lang/php71/distinfo                                           1.32-1.33,1.33-1.34
- lang/php71/patches/patch-configure                            1.4
- lang/php71/patches/patch-ext_standard_uniqid.c                1.3

-------------------------------------------------------------------
   Module Name:	pkgsrc
   Committed By:	jperkin
   Date:		Tue Jan 16 11:04:54 UTC 2018

   Modified Files:
   	pkgsrc/lang/php71: distinfo
   	pkgsrc/lang/php71/patches: patch-configure patch-ext_standard_uniqid.c

   Log Message:
   php71: Don't automatically add libgcc on SunOS.

   To generate a diff of this commit:
   cvs rdiff -u -r1.31 -r1.32 pkgsrc/lang/php71/distinfo
   cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/php71/patches/patch-configure
   cvs rdiff -u -r1.2 -r1.3 \
       pkgsrc/lang/php71/patches/patch-ext_standard_uniqid.c

-------------------------------------------------------------------
   Module Name:	pkgsrc
   Committed By:	jdolecek
   Date:		Fri Feb  2 12:53:39 UTC 2018

   Modified Files:
   	pkgsrc/lang/php: phpversion.mk
   	pkgsrc/lang/php71: distinfo

   Log Message:
   Update lang/php71 to php 7.1.14

   Changes since 7.1.13:

   Core:
   Fixed bug #75679 (Path 260 character problem).
   Fixed bug #75786 (segfault when using spread operator on generator passed by reference).
   Fixed bug #75799 (arg of get_defined_functions is optional).
   Fixed bug #75396 (Exit inside generator finally results in fatal error).
   Fixed bug #75079 (self keyword leads to incorrectly generated TypeError when in closure in trait).

   FCGI:
   Fixed bug #75794 (getenv() crashes on Windows 7.2.1 when second parameter is false).

   IMAP:
   Fixed bug #75774 (imap_append HeapCorruction).

   Opcache:
   Fixed bug #75720 (File cache not populated after SHM runs full).
   Fixed bug #75579 (Interned strings buffer overflow may cause crash).

   PGSQL:
   Fixed bug #75671 (pg_version() crashes when called on a connection to cockroach).
   Readline:
   Fixed bug #75775 (readline_read_history segfaults with empty file).

   SAPI:
   Fixed bug #75735 ([embed SAPI] Segmentation fault in sapi_register_post_entry).

   SOAP:
   Fixed bug #70469 (SoapClient generates E_ERROR even if exceptions=1 is used).
   Fixed bug #75502 (Segmentation fault in zend_string_release).

   SPL:
   Fixed bug #75717 (RecursiveArrayIterator does not traverse arrays by reference).
   Fixed bug #75242 (RecursiveArrayIterator doesn't have constants from parent class).
   Fixed bug #73209 (RecursiveArrayIterator does not iterate object properties).

   Standard:
   Fixed bug #75781 (substr_count incorrect result).

   To generate a diff of this commit:
   cvs rdiff -u -r1.32 -r1.33 pkgsrc/lang/php71/distinfo

-------------------------------------------------------------------
   Module Name:	pkgsrc
   Committed By:	jdolecek
   Date:		Fri Feb  2 12:53:39 UTC 2018

   Modified Files:
   	pkgsrc/lang/php: phpversion.mk
   	pkgsrc/lang/php71: distinfo

   Log Message:
   Update lang/php71 to php 7.1.14

   Changes since 7.1.13:

   Core:
   Fixed bug #75679 (Path 260 character problem).
   Fixed bug #75786 (segfault when using spread operator on generator passed by reference).
   Fixed bug #75799 (arg of get_defined_functions is optional).
   Fixed bug #75396 (Exit inside generator finally results in fatal error).
   Fixed bug #75079 (self keyword leads to incorrectly generated TypeError when in closure in trait).

   FCGI:
   Fixed bug #75794 (getenv() crashes on Windows 7.2.1 when second parameter is false).

   IMAP:
   Fixed bug #75774 (imap_append HeapCorruction).

   Opcache:
   Fixed bug #75720 (File cache not populated after SHM runs full).
   Fixed bug #75579 (Interned strings buffer overflow may cause crash).

   PGSQL:
   Fixed bug #75671 (pg_version() crashes when called on a connection to cockroach).
   Readline:
   Fixed bug #75775 (readline_read_history segfaults with empty file).

   SAPI:
   Fixed bug #75735 ([embed SAPI] Segmentation fault in sapi_register_post_entry).

   SOAP:
   Fixed bug #70469 (SoapClient generates E_ERROR even if exceptions=1 is used).
   Fixed bug #75502 (Segmentation fault in zend_string_release).

   SPL:
   Fixed bug #75717 (RecursiveArrayIterator does not traverse arrays by reference).
   Fixed bug #75242 (RecursiveArrayIterator doesn't have constants from parent class).
   Fixed bug #73209 (RecursiveArrayIterator does not iterate object properties).

   Standard:
   Fixed bug #75781 (substr_count incorrect result).

   To generate a diff of this commit:
   cvs rdiff -u -r1.32 -r1.33 pkgsrc/lang/php71/distinfo

-------------------------------------------------------------------
   Module Name:	pkgsrc
   Committed By:	jperkin
   Date:		Mon Feb  5 11:21:56 UTC 2018

   Modified Files:
   	pkgsrc/lang/php70: buildlink3.mk
   	pkgsrc/lang/php71: buildlink3.mk
   	pkgsrc/lang/php72: buildlink3.mk

   Log Message:
   php7*: Standardise on major.minor.99 usage in buildlink3.mk

   With the introduction of beta and rc releases of php7* into pkgsrc the pattern
   matching is often incorrect (for example the current version of php-7.1.0rc6
   breaks both <7.1.0 and >=7.1.0).  Using .99 is not ideal but does at least
   avoid the confusion developers seem to be having with the pmatch ordering.

   To generate a diff of this commit:
   cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/php71/buildlink3.mk

-------------------------------------------------------------------
   Module Name:	pkgsrc
   Committed By:	taca
   Date:		Fri Mar  2 02:09:48 UTC 2018

   Modified Files:
   	pkgsrc/lang/php: phpversion.mk
   	pkgsrc/lang/php71: distinfo

   Log Message:
   lang/php71: update to 7.1.15

   01 Mar 2018, PHP 7.1.15

   - Apache2Handler:
     . Fixed bug #75882 (a simple way for segfaults in threadsafe php just with
       configuration). (Anatol)

   - Date:
     . Fixed bug #75857 (Timezone gets truncated when formatted). (carusogabriel)
     . Fixed bug #75928 (Argument 2 for `DateTimeZone::listIdentifiers()` should
       accept `null`). (Pedro Lacerda)
     . Fixed bug #68406 (calling var_dump on a DateTimeZone object modifies it).
       (jhdxr)

   - PGSQL:
     . Fixed #75838 (Memory leak in pg_escape_bytea()). (ard_1 at mail dot ru)

   - ODBC:
     . Fixed bug #73725 (Unable to retrieve value of varchar(max) type). (Anatol)

   - LDAP:
     . Fixed bug #49876 (Fix LDAP path lookup on 64-bit distros). (dzuelke)

   - libxml2:
     . Fixed bug #75871 (use pkg-config where available). (pmmaga)

   - Phar:
     . Fixed bug #65414 (deal with leading slash when adding files correctly).
       (bishopb)

   - SPL:
     . Fixed bug #74519 (strange behavior of AppendIterator). (jhdxr)

   - Standard:
     . Fixed bug #75916 (DNS_CAA record results contain garbage). (Mike,
       Philip Sharp)
     . Fixed bug #75981 (stack-buffer-overflow while parsing HTTP response). (Stas)

   To generate a diff of this commit:
   cvs rdiff -u -r1.33 -r1.34 pkgsrc/lang/php71/distinfo


(spz)
diff -r1.4 -r1.4.2.1 pkgsrc/lang/php71/buildlink3.mk
diff -r1.30.2.1 -r1.30.2.2 pkgsrc/lang/php71/distinfo
diff -r1.3 -r1.3.8.1 pkgsrc/lang/php71/patches/patch-configure
diff -r1.2 -r1.2.6.1 pkgsrc/lang/php71/patches/patch-ext_standard_uniqid.c

cvs diff -r1.4 -r1.4.2.1 pkgsrc/lang/php71/Attic/buildlink3.mk (expand / switch to unified diff)

--- pkgsrc/lang/php71/Attic/buildlink3.mk 2017/11/26 19:14:34 1.4
+++ pkgsrc/lang/php71/Attic/buildlink3.mk 2018/03/03 09:23:40 1.4.2.1
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1# $NetBSD: buildlink3.mk,v 1.4 2017/11/26 19:14:34 wiz Exp $ 1# $NetBSD: buildlink3.mk,v 1.4.2.1 2018/03/03 09:23:40 spz Exp $
2 2
3BUILDLINK_TREE+= php 3BUILDLINK_TREE+= php
4 4
5.if !defined(PHP_BUILDLINK3_MK) 5.if !defined(PHP_BUILDLINK3_MK)
6PHP_BUILDLINK3_MK:= 6PHP_BUILDLINK3_MK:=
7 7
8BUILDLINK_API_DEPENDS.php+= php>=7.1.0<7.1.99 8BUILDLINK_API_DEPENDS.php+= php>=7.0.99<7.1.99
9BUILDLINK_ABI_DEPENDS.php+= php>=7.1.0<7.1.99 9BUILDLINK_ABI_DEPENDS.php+= php>=7.0.99<7.1.99
10BUILDLINK_PKGSRCDIR.php?= ../../lang/php71 10BUILDLINK_PKGSRCDIR.php?= ../../lang/php71
11 11
12.include "../../textproc/libxml2/buildlink3.mk" 12.include "../../textproc/libxml2/buildlink3.mk"
13.endif # PHP_BUILDLINK3_MK 13.endif # PHP_BUILDLINK3_MK
14 14
15BUILDLINK_TREE+= -php 15BUILDLINK_TREE+= -php

cvs diff -r1.30.2.1 -r1.30.2.2 pkgsrc/lang/php71/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/lang/php71/Attic/distinfo 2018/01/07 17:39:56 1.30.2.1
+++ pkgsrc/lang/php71/Attic/distinfo 2018/03/03 09:23:40 1.30.2.2
@@ -1,29 +1,29 @@ @@ -1,29 +1,29 @@
1$NetBSD: distinfo,v 1.30.2.1 2018/01/07 17:39:56 bsiegert Exp $ 1$NetBSD: distinfo,v 1.30.2.2 2018/03/03 09:23:40 spz Exp $
2 2
3SHA1 (php-7.1.13.tar.bz2) = 117306b9e66db0e651c3f7a77c60c3b9cfe3b111 3SHA1 (php-7.1.15.tar.bz2) = 857aad496a14505ad5f61617621a2e35100a3758
4RMD160 (php-7.1.13.tar.bz2) = a8851a06c7e86bd4ad3f2c39de7337b271c429fe 4RMD160 (php-7.1.15.tar.bz2) = 5b84646a2cbfd3cc90dfa1709aa94df3a1b3f1b9
5SHA512 (php-7.1.13.tar.bz2) = dbab037b5e7c60877f46a201e1712000ba14ae2a984d4f4d4e752c6e1b2797b0f67fbb0b10c69fea77e27cc64c27222459a26772c9a51e8c760ceab1433dc60a 5SHA512 (php-7.1.15.tar.bz2) = db10c0138a74165c6373f0d6cc7f5ca1f6b1ae26359cc2e2a9dec8895a491b8adccee59601cb9325e54768e9cca643e9f73858fef5cbe6502c683131f9cc8ccf
6Size (php-7.1.13.tar.bz2) = 14960544 bytes 6Size (php-7.1.15.tar.bz2) = 15116603 bytes
7SHA1 (patch-acinclude.m4) = b682280fd89950c082c2226bdb7364b0dc475bad 7SHA1 (patch-acinclude.m4) = b682280fd89950c082c2226bdb7364b0dc475bad
8SHA1 (patch-configure) = a129e19ef87338f6e53ccc967c40ddcde7c7357c 8SHA1 (patch-configure) = 862707ff3fd8b8d7312104bb44a48fe8379951bd
9SHA1 (patch-ext_gd_config.m4) = 93b62daad93b9ee6dc28e06016f739bc26b0dc9f 9SHA1 (patch-ext_gd_config.m4) = 93b62daad93b9ee6dc28e06016f739bc26b0dc9f
10SHA1 (patch-ext_imap_config.m4) = f4e10ab81697b72019313f63bc630627a08efd92 10SHA1 (patch-ext_imap_config.m4) = f4e10ab81697b72019313f63bc630627a08efd92
11SHA1 (patch-ext_intl_config.m4) = 1ea3d3e6f05d5fed0bd4ca4518440199aec0954d 11SHA1 (patch-ext_intl_config.m4) = 1ea3d3e6f05d5fed0bd4ca4518440199aec0954d
12SHA1 (patch-ext_pcre_pcrelib_config.h) = c5fba95856628f68639fe63feeef04a5f83d3916 12SHA1 (patch-ext_pcre_pcrelib_config.h) = c5fba95856628f68639fe63feeef04a5f83d3916
13SHA1 (patch-ext_pdo__mysql_config.m4) = b1ef91be5a729040197e9af50da0f5fd1f6c90a8 13SHA1 (patch-ext_pdo__mysql_config.m4) = b1ef91be5a729040197e9af50da0f5fd1f6c90a8
14SHA1 (patch-ext_pdo_config.m4) = 522281775cc0e70a135b1f813158988ef1f3e244 14SHA1 (patch-ext_pdo_config.m4) = 522281775cc0e70a135b1f813158988ef1f3e244
15SHA1 (patch-ext_phar_Makefile.frag) = 558869b60f8ed6674a3ba1d595a65f010df4c426 15SHA1 (patch-ext_phar_Makefile.frag) = 558869b60f8ed6674a3ba1d595a65f010df4c426
16SHA1 (patch-ext_phar_phar_phar.php) = f630e3946b21b76d4fe857a43e00e25c9445f2c8 16SHA1 (patch-ext_phar_phar_phar.php) = f630e3946b21b76d4fe857a43e00e25c9445f2c8
17SHA1 (patch-ext_recode_recode.c) = a97a1815d6a41410f68c289debbb9396128a2159 17SHA1 (patch-ext_recode_recode.c) = a97a1815d6a41410f68c289debbb9396128a2159
18SHA1 (patch-ext_sqlite3_libsqlite_sqlite3.c) = 8a529a1b3f7c97731f2e719d006f67c3a7259bb5 18SHA1 (patch-ext_sqlite3_libsqlite_sqlite3.c) = 8a529a1b3f7c97731f2e719d006f67c3a7259bb5
19SHA1 (patch-ext_standard_basic__functions.c) = f97a2748c7b15fbd9a2d3c21e56079088cc05d56 19SHA1 (patch-ext_standard_basic__functions.c) = f97a2748c7b15fbd9a2d3c21e56079088cc05d56
20SHA1 (patch-ext_standard_uniqid.c) = 154ed6e6d4796a52c6664b52994d6cad4ed22f30 20SHA1 (patch-ext_standard_uniqid.c) = a13b951cef823172bc61a1d1f964fc8725188a2c
21SHA1 (patch-ext_xsl_php__xsl.h) = a9877bff7bacc77926a4541a0ac171c00ad1a627 21SHA1 (patch-ext_xsl_php__xsl.h) = a9877bff7bacc77926a4541a0ac171c00ad1a627
22SHA1 (patch-makedist) = 2ac0e0391c031c4fcf4993e2269cde4c6bfddfd5 22SHA1 (patch-makedist) = 2ac0e0391c031c4fcf4993e2269cde4c6bfddfd5
23SHA1 (patch-php.ini-development) = dd65962000ec06439fae3c9bf252fa46be4e33fd 23SHA1 (patch-php.ini-development) = dd65962000ec06439fae3c9bf252fa46be4e33fd
24SHA1 (patch-php.ini-production) = ae61dffedf574b688fe576b0b2af748b7a28cd89 24SHA1 (patch-php.ini-production) = ae61dffedf574b688fe576b0b2af748b7a28cd89
25SHA1 (patch-run-tests.php) = 86c4d3f03eb8e31b5a35820f426533c9478571fb 25SHA1 (patch-run-tests.php) = 86c4d3f03eb8e31b5a35820f426533c9478571fb
26SHA1 (patch-sapi_cgi_Makefile.frag) = 18769900f588ff81cc34474542afa1d65c070e65 26SHA1 (patch-sapi_cgi_Makefile.frag) = 18769900f588ff81cc34474542afa1d65c070e65
27SHA1 (patch-sapi_cli_Makefile.frag) = 1cd29d09042863acbf5330e406410fdcf75d06b3 27SHA1 (patch-sapi_cli_Makefile.frag) = 1cd29d09042863acbf5330e406410fdcf75d06b3
28SHA1 (patch-sapi_fpm_fpm_events_port.c) = 0f10fdb32fb7cab58e2abda49fb1fc658c410150 28SHA1 (patch-sapi_fpm_fpm_events_port.c) = 0f10fdb32fb7cab58e2abda49fb1fc658c410150
29SHA1 (patch-sapi_fpm_php-fpm.conf.in) = b3c4fd499cbfd2dffd9176abb54e298ea542a5d7 29SHA1 (patch-sapi_fpm_php-fpm.conf.in) = b3c4fd499cbfd2dffd9176abb54e298ea542a5d7

cvs diff -r1.3 -r1.3.8.1 pkgsrc/lang/php71/patches/Attic/patch-configure (expand / switch to unified diff)

--- pkgsrc/lang/php71/patches/Attic/patch-configure 2017/05/03 11:45:25 1.3
+++ pkgsrc/lang/php71/patches/Attic/patch-configure 2018/03/03 09:23:40 1.3.8.1
@@ -1,18 +1,30 @@ @@ -1,18 +1,30 @@
1$NetBSD: patch-configure,v 1.3 2017/05/03 11:45:25 maya Exp $ 1$NetBSD: patch-configure,v 1.3.8.1 2018/03/03 09:23:40 spz Exp $
2 2
3--- configure.orig 2016-04-28 18:12:26.000000000 +0000 3Don't automatically add libgcc on SunOS.
 4
 5--- configure.orig 2018-01-03 02:32:21.000000000 +0000
4+++ configure 6+++ configure
5@@ -6930,27 +6930,6 @@ EOF 7@@ -5436,9 +5436,6 @@ fi
 8 case $host_alias in
 9 *solaris*)
 10 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
 11- if test "${enable_libgcc+set}" != "set" && test "$GCC" = "yes"; then
 12- enable_libgcc=yes
 13- fi
 14 ;;
 15 *dgux*)
 16 CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR"
 17@@ -6909,27 +6906,6 @@ EOF
6 ;; 18 ;;
7 esac 19 esac
8  20
9- if test "$APACHE_VERSION" -lt 2004001; then 21- if test "$APACHE_VERSION" -lt 2004001; then
10- APXS_MPM=`$APXS -q MPM_NAME` 22- APXS_MPM=`$APXS -q MPM_NAME`
11- if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then 23- if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
12- 24-
13- enable_maintainer_zts=yes 25- enable_maintainer_zts=yes
14- if test "$pthreads_working" != "yes"; then 26- if test "$pthreads_working" != "yes"; then
15- as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5 27- as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
16- fi 28- fi
17- 29-
18- fi 30- fi
@@ -20,72 +32,72 @@ $NetBSD: patch-configure,v 1.3 2017/05/0 @@ -20,72 +32,72 @@ $NetBSD: patch-configure,v 1.3 2017/05/0
20- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'` 32- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
21- if test -n "$APACHE_THREADED_MPM"; then 33- if test -n "$APACHE_THREADED_MPM"; then
22- 34-
23- enable_maintainer_zts=yes 35- enable_maintainer_zts=yes
24- if test "$pthreads_working" != "yes"; then 36- if test "$pthreads_working" != "yes"; then
25- as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5 37- as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
26- fi 38- fi
27- 39-
28- fi 40- fi
29- fi 41- fi
30 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 42 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31 $as_echo "yes" >&6; } 43 $as_echo "yes" >&6; }
32  44
33@@ -18408,7 +18387,7 @@ fi 45@@ -18391,7 +18367,7 @@ fi
34 if test "$found_openssl" = "no"; then 46 if test "$found_openssl" = "no"; then
35  47
36 if test "$PHP_OPENSSL_DIR" = "yes"; then 48 if test "$PHP_OPENSSL_DIR" = "yes"; then
37- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl" 49- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
38+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /" 50+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
39 fi 51 fi
40  52
41 for i in $PHP_OPENSSL_DIR; do 53 for i in $PHP_OPENSSL_DIR; do
42@@ -20572,7 +20551,7 @@ $as_echo "yes" >&6; } 54@@ -20745,7 +20721,7 @@ $as_echo "#define HAVE_SQLITE3_ERRSTR 1"
43 PHP_SQLITE3_CFLAGS="-I@ext_srcdir@/libsqlite $other_flags $threadsafe_flags $debug_flags" 55 PHP_SQLITE3_CFLAGS="-I@ext_srcdir@/libsqlite $other_flags $threadsafe_flags $debug_flags"
44  56
45  57
46- for header_file in ext/sqlite3/libsqlite/sqlite3.h; do 58- for header_file in ext/sqlite3/libsqlite/sqlite3.h; do
47+ for header_file; do 59+ for header_file; do
48  60
49  61
50 unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'` 62 unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'`
51@@ -31742,7 +31721,7 @@ fi 63@@ -31966,7 +31942,7 @@ fi
52 if test "$found_openssl" = "no"; then 64 if test "$found_openssl" = "no"; then
53  65
54 if test "$PHP_OPENSSL_DIR" = "yes"; then 66 if test "$PHP_OPENSSL_DIR" = "yes"; then
55- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl" 67- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
56+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /" 68+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
57 fi 69 fi
58  70
59 for i in $PHP_OPENSSL_DIR; do 71 for i in $PHP_OPENSSL_DIR; do
60@@ -42631,7 +42610,7 @@ fi 72@@ -42858,7 +42834,7 @@ fi
61 if test "$found_openssl" = "no"; then 73 if test "$found_openssl" = "no"; then
62  74
63 if test "$PHP_OPENSSL_DIR" = "yes"; then 75 if test "$PHP_OPENSSL_DIR" = "yes"; then
64- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl" 76- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
65+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /" 77+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
66 fi 78 fi
67  79
68 for i in $PHP_OPENSSL_DIR; do 80 for i in $PHP_OPENSSL_DIR; do
69@@ -92806,7 +92785,7 @@ fi 81@@ -93979,7 +93955,7 @@ fi
70 if test "$found_openssl" = "no"; then 82 if test "$found_openssl" = "no"; then
71  83
72 if test "$PHP_OPENSSL_DIR" = "yes"; then 84 if test "$PHP_OPENSSL_DIR" = "yes"; then
73- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl" 85- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
74+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /" 86+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
75 fi 87 fi
76  88
77 for i in $PHP_OPENSSL_DIR; do 89 for i in $PHP_OPENSSL_DIR; do
78@@ -96439,12 +96418,7 @@ old_CC=$CC 90@@ -97605,12 +97581,7 @@ old_CC=$CC
79 if test "$PHP_THREAD_SAFETY" = "yes" && test -n "$ac_cv_pthreads_cflags"; then 91 if test "$PHP_THREAD_SAFETY" = "yes" && test -n "$ac_cv_pthreads_cflags"; then
80 CXXFLAGS="$CXXFLAGS $ac_cv_pthreads_cflags" 92 CXXFLAGS="$CXXFLAGS $ac_cv_pthreads_cflags"
81 INLINE_CFLAGS="$INLINE_CFLAGS $ac_cv_pthreads_cflags" 93 INLINE_CFLAGS="$INLINE_CFLAGS $ac_cv_pthreads_cflags"
82- cat >meta_ccld<<EOF 94- cat >meta_ccld<<EOF
83-#! /bin/sh 95-#! /bin/sh
84-exec $CC $ac_cv_pthreads_cflags \$@ 96-exec $CC $ac_cv_pthreads_cflags \$@
85-EOF 97-EOF
86- CC="$abs_builddir/meta_ccld" 98- CC="$abs_builddir/meta_ccld"
87- chmod +x meta_ccld 99- chmod +x meta_ccld
88+ CPPFLAGS="$CPPFLAGS $ac_cv_pthreads_cflags" 100+ CPPFLAGS="$CPPFLAGS $ac_cv_pthreads_cflags"
89 fi 101 fi
90  102
91 if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then 103 if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then

cvs diff -r1.2 -r1.2.6.1 pkgsrc/lang/php71/patches/Attic/patch-ext_standard_uniqid.c (expand / switch to unified diff)

--- pkgsrc/lang/php71/patches/Attic/patch-ext_standard_uniqid.c 2017/07/19 02:44:45 1.2
+++ pkgsrc/lang/php71/patches/Attic/patch-ext_standard_uniqid.c 2018/03/03 09:23:40 1.2.6.1
@@ -1,36 +1,35 @@ @@ -1,36 +1,35 @@
1$NetBSD: patch-ext_standard_uniqid.c,v 1.2 2017/07/19 02:44:45 manu Exp $ 1$NetBSD: patch-ext_standard_uniqid.c,v 1.2.6.1 2018/03/03 09:23:40 spz Exp $
2 2
3PHP uniqid() relies on microsecond-precise system clock to produce an 3PHP uniqid() relies on microsecond-precise system clock to produce an
4unique identifier. In order to avoid using the same value, it first 4unique identifier. In order to avoid using the same value, it first
5calls usleep(1) to wait for the next microsecond.  5calls usleep(1) to wait for the next microsecond.
6 6
7Unfortunately, usleep() specification says "The suspension time may be  7Unfortunately, usleep() specification says "The suspension time may be
8longer than requested due to the scheduling of other activity by the  8longer than requested due to the scheduling of other activity by the
9system." Indeed, the pause may as as long as an entire execution slice,  9system." Indeed, the pause may as as long as an entire execution slice,
10causing a uniqid() call to last more than 10 ms. 10causing a uniqid() call to last more than 10 ms.
11 11
12This is fixed by replacing the usleep() call by time polling using 12This is fixed by replacing the usleep() call by time polling using
13gettimeofday() until the microscecond change. Since the getttimeoday() 13gettimeofday() until the microscecond change. Since the getttimeoday()
14system call lasts around a microsecond, only a small time is wasted 14system call lasts around a microsecond, only a small time is wasted
15calling multiple gettimeofday. On the benefit side, uniqid() performance 15calling multiple gettimeofday. On the benefit side, uniqid() performance
16in increased 10000 fold without changing its behavior. 16in increased 10000 fold without changing its behavior.
17 17
18Submitted upstream as https://bugs.php.net/bug.php?id=74851 18Submitted upstream as https://bugs.php.net/bug.php?id=74851
19 19
20--- ext/standard/uniqid.c.orig 2017-06-07 10:09:31.000000000 +0200 20--- ext/standard/uniqid.c.orig 2018-01-03 02:32:25.000000000 +0000
21+++ ext/standard/uniqid.c 2017-07-08 08:24:24.000000000 +0200 21+++ ext/standard/uniqid.c
22@@ -52,25 +52,31 @@ 22@@ -53,23 +53,29 @@ PHP_FUNCTION(uniqid)
23 zend_string *uniqid; 
24 int sec, usec; 23 int sec, usec;
25 size_t prefix_len = 0; 24 size_t prefix_len = 0;
26 struct timeval tv; 25 struct timeval tv;
27+ ZEND_TLS struct timeval prev_tv = { 0, 0 }; 26+ ZEND_TLS struct timeval prev_tv = { 0, 0 };
28  27
29 if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sb", &prefix, &prefix_len, 28 if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sb", &prefix, &prefix_len,
30 &more_entropy)) { 29 &more_entropy)) {
31 return; 30 return;
32 } 31 }
33  32
34-#if HAVE_USLEEP && !defined(PHP_WIN32) 33-#if HAVE_USLEEP && !defined(PHP_WIN32)
35 if (!more_entropy) { 34 if (!more_entropy) {
36-#if defined(__CYGWIN__) 35-#if defined(__CYGWIN__)
@@ -49,14 +48,13 @@ Submitted upstream as https://bugs.php.n @@ -49,14 +48,13 @@ Submitted upstream as https://bugs.php.n
49+ (struct timezone *) NULL); 48+ (struct timezone *) NULL);
50+ } while (tv.tv_sec == prev_tv.tv_sec &&  49+ } while (tv.tv_sec == prev_tv.tv_sec &&
51+ tv.tv_usec == prev_tv.tv_usec);  50+ tv.tv_usec == prev_tv.tv_usec);
52+ 51+
53+ prev_tv.tv_sec = tv.tv_sec; 52+ prev_tv.tv_sec = tv.tv_sec;
54+ prev_tv.tv_usec = tv.tv_usec; 53+ prev_tv.tv_usec = tv.tv_usec;
55 } 54 }
56-#endif 55-#endif
57- gettimeofday((struct timeval *) &tv, (struct timezone *) NULL); 56- gettimeofday((struct timeval *) &tv, (struct timezone *) NULL);
58+ 57+
59 sec = (int) tv.tv_sec; 58 sec = (int) tv.tv_sec;
60 usec = (int) (tv.tv_usec % 0x100000); 59 usec = (int) (tv.tv_usec % 0x100000);
61  60
62 /* The max value usec can have is 0xF423F, so we use only five hex