Thursday, May 31, 2018

Re: PHP removal of old patches

On 2018/05/31 12:40, Martijn van Duren wrote:
> patch-ext_gd_gdcache_h:
> malloc.h is removed

OK. doesn't need a bump.

> patch-ext_sockets_sockaddr_conv_c:
> proper HAVE_AI_V4MAPPED check

OK.

> patch-main_php_open_temporary_file_c:
> Worth the patch for mkstemp? Note that by examining the binary there's
> also other places where we don't add the extra Xs.

OK.


> patch-sapi_cli_php_cli_c:
> adds unneeded char *ini

looks like this patch lost some pieces, they went astray between 5.3 and 5.4
c.f. patch-sapi_apache_mod_php5_c, patch-sapi_cgi_cgi_main_c

will try to look at the rest some other time.

> patch-acinclude_m4:
> 1st section: Doesn't seem to do anything (I might have missed something)
> 2nd section: Doesn't seem logical to disable an enabled check
> 3rd section: PHP_OPENSSL is set lines before
>
> patch-ext_gd_libgd_gdkanji_c, patch-ext_iconv_iconv_c,
> patch-ext_xmlrpc_libxmlrpc_encodings_c:
> convert to const seems useless
>
> patch-ext_mysqlnd_config9_m4:
> mysqlnd is enabled via configure
>
> patch-ext_openssl_config0_m4:
> libssl already links to libcrypto. Also the check is not there in 7.0.
>
>
> patch-ext_spl_php_spl_c, patch-ext_spl_php_spl_h:
> pointer type doesn't seem to matter
>
> patch-main_php_h:
> proper HAVE_SOCKLEN_T check
>
>
> martijn@
>
> Index: 5.6/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/php/5.6/Makefile,v
> retrieving revision 1.72
> diff -u -p -r1.72 Makefile
> --- 5.6/Makefile 27 May 2018 22:05:50 -0000 1.72
> +++ 5.6/Makefile 31 May 2018 10:38:43 -0000
> @@ -4,7 +4,7 @@ BROKEN-alpha= pcre_jit_compile.c:65:2: e
>
> PV= 5.6
> V= ${PV}.36
> -REVISION= 4
> +REVISION= 5
>
> MASTER_SITES0= https://download.suhosin.org/
>
> Index: 5.6/patches/patch-ext_gd_gdcache_h
> ===================================================================
> RCS file: 5.6/patches/patch-ext_gd_gdcache_h
> diff -N 5.6/patches/patch-ext_gd_gdcache_h
> --- 5.6/patches/patch-ext_gd_gdcache_h 15 Nov 2014 13:43:01 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,11 +0,0 @@
> -$OpenBSD: patch-ext_gd_gdcache_h,v 1.1 2014/11/15 13:43:01 robert Exp $
> ---- ext/gd/gdcache.h.orig.port Wed Sep 26 16:44:16 2007
> -+++ ext/gd/gdcache.h Sat Jun 18 12:14:48 2011
> -@@ -41,6 +41,7 @@
> - /*********************************************************/
> -
> - #if (!defined(_OSD_POSIX) && !defined(__FreeBSD__)) && HAVE_MALLOC_H
> -+#elif !defined(__OpenBSD__)
/php_c> - #include <malloc.h>
> - #else
> - #include <stdlib.h> /* BS2000/OSD defines malloc() & friends in stdlib.h */
> Index: 5.6/patches/patch-ext_gd_libgd_gdkanji_c
> ===================================================================
> RCS file: 5.6/patches/patch-ext_gd_libgd_gdkanji_c
> diff -N 5.6/patches/patch-ext_gd_libgd_gdkanji_c
> --- 5.6/patches/patch-ext_gd_libgd_gdkanji_c 15 Nov 2014 13:43:01 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,12 +0,0 @@
> -$OpenBSD: patch-ext_gd_libgd_gdkanji_c,v 1.1 2014/11/15 13:43:01 robert Exp $
> ---- ext/gd/libgd/gdkanji.c.orig.port Wed Sep 26 16:44:16 2007
> -+++ ext/gd/libgd/gdkanji.c Sat Jun 18 12:14:49 2011
> -@@ -362,7 +362,7 @@ do_convert (unsigned char *to, unsigned char *from, co
> - from_len = strlen ((const char *) from) + 1;
> - to_len = BUFSIZ;
> -
> -- if ((int) iconv(cd, (char **) &from, &from_len, (char **) &to, &to_len) == -1)
> -+ if ((int) iconv(cd, (const char **) &from, &from_len, (char **) &to, &to_len) == -1)
> - {
> - #ifdef HAVE_ERRNO_H
> - if (errno == EINVAL)
> Index: 5.6/patches/patch-ext_iconv_iconv_c
> ===================================================================
> RCS file: 5.6/patches/patch-ext_iconv_iconv_c
> diff -N 5.6/patches/patch-ext_iconv_iconv_c
> --- 5.6/patches/patch-ext_iconv_iconv_c 12 Jul 2015 14:06:23 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,75 +0,0 @@
> -$OpenBSD: patch-ext_iconv_iconv_c,v 1.2 2015/07/12 14:06:23 robert Exp $
> ---- ext/iconv/iconv.c.orig.port Fri Jul 10 02:33:32 2015
> -+++ ext/iconv/iconv.c Sun Jul 12 16:05:11 2015
> -@@ -463,7 +463,7 @@ static php_iconv_err_t _php_iconv_appendl(smart_str *d
> -
> - out_p = (d)->c + (d)->len;
> -
> -- if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
> -+ if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
> - #if ICONV_SUPPORTS_ERRNO
> - switch (errno) {
> - case EINVAL:
> -@@ -650,7 +650,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const c
> - out_p = out_buf;
> -
> - while (in_left > 0) {
> -- result = iconv(cd, (char **) &in_p, &in_left, (char **) &out_p, &out_left);
> -+ result = iconv(cd, (const char **) &in_p, &in_left, (char **) &out_p, &out_left);
> - out_size = bsz - out_left;
> - if (result == (size_t)(-1)) {
> - if (ignore_ilseq && errno == EILSEQ) {
> -@@ -775,7 +775,7 @@ static php_iconv_err_t _php_iconv_strlen(unsigned int
> -
> - prev_in_left = in_left;
> -
> -- if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
> -+ if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
> - if (prev_in_left == in_left) {
> - break;
> - }
> -@@ -896,7 +896,7 @@ static php_iconv_err_t _php_iconv_substr(smart_str *pr
> -
> - prev_in_left = in_left;
> -
> -- if (iconv(cd1, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
> -+ if (iconv(cd1, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
> - if (prev_in_left == in_left) {
> - break;
> - }
> -@@ -1028,7 +1028,7 @@ static php_iconv_err_t _php_iconv_strpos(unsigned int
> -
> - prev_in_left = in_left;
> -
> -- if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
> -+ if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
> - if (prev_in_left == in_left) {
> - #if ICONV_SUPPORTS_ERRNO
> - switch (errno) {
> -@@ -1277,7 +1277,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_st
> -
> - out_left = out_size - out_reserved;
> -
> -- if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
> -+ if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
> - #if ICONV_SUPPORTS_ERRNO
> - switch (errno) {
> - case EINVAL:
> -@@ -1377,7 +1377,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_st
> - out_p = buf;
> - out_left = out_size;
> -
> -- if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
> -+ if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
> - #if ICONV_SUPPORTS_ERRNO
> - switch (errno) {
> - case EINVAL:
> -@@ -2650,7 +2650,7 @@ static int php_iconv_stream_filter_append_bucket(
> - tcnt = self->stub_len;
> -
> - while (tcnt > 0) {
> -- if (iconv(self->cd, &pt, &tcnt, &pd, &ocnt) == (size_t)-1) {
> -+ if (iconv(self->cd, (const char **)&pt, &tcnt, &pd, &ocnt) == (size_t)-1) {
> - #if ICONV_SUPPORTS_ERRNO
> - switch (errno) {
> - case EILSEQ:
> Index: 5.6/patches/patch-ext_mysqlnd_config9_m4
> ===================================================================
> RCS file: 5.6/patches/patch-ext_mysqlnd_config9_m4
> diff -N 5.6/patches/patch-ext_mysqlnd_config9_m4
> --- 5.6/patches/patch-ext_mysqlnd_config9_m4 15 Nov 2014 13:43:01 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,11 +0,0 @@
> -$OpenBSD: patch-ext_mysqlnd_config9_m4,v 1.1 2014/11/15 13:43:01 robert Exp $
> ---- ext/mysqlnd/config9.m4.orig.port Wed Jul 3 08:10:53 2013
> -+++ ext/mysqlnd/config9.m4 Sat Jul 27 18:39:50 2013
> -@@ -16,6 +16,7 @@ if test -z "$PHP_ZLIB_DIR"; then
> - fi
> -
> - dnl If some extension uses mysqlnd it will get compiled in PHP core
> -+PHP_MYSQLND_ENABLED="yes"
> - if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
> - mysqlnd_ps_sources="mysqlnd_ps.c mysqlnd_ps_codec.c"
> - mysqlnd_base_sources="mysqlnd.c mysqlnd_alloc.c mysqlnd_bt.c mysqlnd_charset.c mysqlnd_wireprotocol.c \
> Index: 5.6/patches/patch-ext_openssl_config0_m4
> ===================================================================
> RCS file: 5.6/patches/patch-ext_openssl_config0_m4
> diff -N 5.6/patches/patch-ext_openssl_config0_m4
> --- 5.6/patches/patch-ext_openssl_config0_m4 25 May 2018 13:59:19 -0000 1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,12 +0,0 @@
> -$OpenBSD: patch-ext_openssl_config0_m4,v 1.3 2018/05/25 13:59:19 sthen Exp $
> ---- ext/openssl/config0.m4.orig.port Wed Apr 15 20:05:57 2015
> -+++ ext/openssl/config0.m4 Sat Apr 25 18:10:11 2015
> -@@ -19,7 +19,7 @@ if test "$PHP_OPENSSL" != "no"; then
> - PHP_SETUP_KERBEROS(OPENSSL_SHARED_LIBADD)
> - fi
> -
> -- AC_CHECK_LIB(ssl, DSA_get_default_method, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]))
> -+ AC_CHECK_LIB(ssl, DSA_get_default_method, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]),, [-lcrypto])
> - AC_CHECK_LIB(crypto, X509_free, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]))
> - AC_CHECK_FUNCS([RAND_egd])
> -
> Index: 5.6/patches/patch-ext_sockets_sockaddr_conv_c
> ===================================================================
> RCS file: 5.6/patches/patch-ext_sockets_sockaddr_conv_c
> diff -N 5.6/patches/patch-ext_sockets_sockaddr_conv_c
> --- 5.6/patches/patch-ext_sockets_sockaddr_conv_c 15 Nov 2014 13:43:01 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,14 +0,0 @@
> -$OpenBSD: patch-ext_sockets_sockaddr_conv_c,v 1.1 2014/11/15 13:43:01 robert Exp $
> ---- ext/sockets/sockaddr_conv.c.orig.port Wed Mar 5 10:18:00 2014
> -+++ ext/sockets/sockaddr_conv.c Mon Mar 24 22:53:00 2014
> -@@ -11,6 +11,10 @@
> -
> - extern int php_string_to_if_index(const char *val, unsigned *out TSRMLS_DC);
> -
> -+#if defined(__OpenBSD__)
> -+#define AI_V4MAPPED 0
> -+

No comments:

Post a Comment