The following diff removes quite a few patches that are in my opinion
redundant. I motivation behind the removal is the following:
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_gdcache_h:
malloc.h is removed
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_sockets_sockaddr_conv_c:
proper HAVE_AI_V4MAPPED check
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
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.
patch-sapi_cli_php_cli_c:
adds unneeded char *ini
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__)
- #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
-+#endif
-+
- #if HAVE_IPV6
- /* Sets addr by hostname, or by ip in string form (AF_INET6) */
- int php_set_inet6_addr(struct sockaddr_in6 *sin6, char *string, php_socket
*php_sock TSRMLS_DC) /* {{{ */
Index: 5.6/patches/patch-ext_spl_php_spl_c
===================================================================
RCS file: 5.6/patches/patch-ext_spl_php_spl_c
diff -N 5.6/patches/patch-ext_spl_php_spl_c
--- 5.6/patches/patch-ext_spl_php_spl_c 6 May 2016 19:59:32 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-$OpenBSD: patch-ext_spl_php_spl_c,v 1.2 2016/05/06 19:59:32 sthen Exp $
---- ext/spl/php_spl.c.orig.port Thu Apr 28 01:33:49 2016
-+++ ext/spl/php_spl.c Fri Apr 29 14:02:27 2016
-@@ -788,7 +788,7 @@ PHP_FUNCTION(spl_object_hash)
-
- PHPAPI void php_spl_object_hash(zval *obj, char *result TSRMLS_DC) /* {{{*/
- {
-- intptr_t hash_handle, hash_handlers;
-+ zend_intptr_t hash_handle, hash_handlers;
- char *hex;
-
- if (!SPL_G(hash_mask_init)) {
-@@ -796,13 +796,13 @@ PHPAPI void php_spl_object_hash(zval *obj, char *resul
- php_mt_srand(GENERATE_SEED() TSRMLS_CC);
- }
-
-- SPL_G(hash_mask_handle) = (intptr_t)(php_mt_rand(TSRMLS_C) >>
1);
-- SPL_G(hash_mask_handlers) = (intptr_t)(php_mt_rand(TSRMLS_C) >>
1);
-+ SPL_G(hash_mask_handle) =
(zend_intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
-+ SPL_G(hash_mask_handlers) =
(zend_intptr_t)(php_mt_rand(TSRMLS_C) >> 1);
- SPL_G(hash_mask_init) = 1;
- }
-
-- hash_handle = SPL_G(hash_mask_handle)^(intptr_t)Z_OBJ_HANDLE_P(obj);
-- hash_handlers = SPL_G(hash_mask_handlers)^(intptr_t)Z_OBJ_HT_P(obj);
-+ hash_handle =
SPL_G(hash_mask_handle)^(zend_intptr_t)Z_OBJ_HANDLE_P(obj);
-+ hash_handlers =
SPL_G(hash_mask_handlers)^(zend_intptr_t)Z_OBJ_HT_P(obj);
-
- spprintf(&hex, 32, "%016lx%016lx", hash_handle, hash_handlers);
-
Index: 5.6/patches/patch-ext_spl_php_spl_h
===================================================================
RCS file: 5.6/patches/patch-ext_spl_php_spl_h
diff -N 5.6/patches/patch-ext_spl_php_spl_h
--- 5.6/patches/patch-ext_spl_php_spl_h 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_spl_php_spl_h,v 1.1 2014/11/15 13:43:01 robert Exp $
---- ext/spl/php_spl.h.orig.port Wed Nov 12 14:52:21 2014
-+++ ext/spl/php_spl.h Sat Nov 15 10:45:12 2014
-@@ -62,8 +62,8 @@ ZEND_BEGIN_MODULE_GLOBALS(spl)
- HashTable * autoload_functions;
- int autoload_running;
- int autoload_extensions_len;
-- intptr_t hash_mask_handle;
-- intptr_t hash_mask_handlers;
-+ zend_intptr_t hash_mask_handle;
-+ zend_intptr_t hash_mask_handlers;
- int hash_mask_init;
- ZEND_END_MODULE_GLOBALS(spl)
-
Index: 5.6/patches/patch-ext_xmlrpc_libxmlrpc_encodings_c
===================================================================
RCS file: 5.6/patches/patch-ext_xmlrpc_libxmlrpc_encodings_c
diff -N 5.6/patches/patch-ext_xmlrpc_libxmlrpc_encodings_c
--- 5.6/patches/patch-ext_xmlrpc_libxmlrpc_encodings_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_xmlrpc_libxmlrpc_encodings_c,v 1.1 2014/11/15 13:43:01
robert Exp $
---- ext/xmlrpc/libxmlrpc/encodings.c.orig.port Wed Sep 26 16:44:16 2007
-+++ ext/xmlrpc/libxmlrpc/encodings.c Sat Jun 18 12:14:51 2011
-@@ -78,7 +78,7 @@ static char* convert(const char* src, int src_len, int
- if(outbuf) {
- out_ptr = (char*)outbuf;
- while(inlenleft) {
-- st = iconv(ic, (char**)&src, &inlenleft, &out_ptr,
&outlenleft);
-+ st = iconv(ic, (const char**)&src, &inlenleft, &out_ptr,
&outlenleft);
- if(st == -1) {
- if(errno == E2BIG) {
- int diff = out_ptr - outbuf;
Index: 5.6/patches/patch-main_php_h
===================================================================
RCS file: 5.6/patches/patch-main_php_h
diff -N 5.6/patches/patch-main_php_h
--- 5.6/patches/patch-main_php_h 15 Nov 2014 13:43:01 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-main_php_h,v 1.1 2014/11/15 13:43:01 robert Exp $
---- main/php.h.orig.port Wed Nov 12 14:52:21 2014
-+++ main/php.h Sat Nov 15 10:45:12 2014
-@@ -146,7 +146,9 @@ END_EXTERN_C()
- # if PHP_WIN32
- typedef int socklen_t;
- # else
-+# if !defined(__OpenBSD__)
- typedef unsigned int socklen_t;
-+# endif
- # endif
- #endif
-
Index: 5.6/patches/patch-main_php_open_temporary_file_c
===================================================================
RCS file: 5.6/patches/patch-main_php_open_temporary_file_c
diff -N 5.6/patches/patch-main_php_open_temporary_file_c
--- 5.6/patches/patch-main_php_open_temporary_file_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-main_php_open_temporary_file_c,v 1.1 2014/11/15 13:43:01
robert Exp $
---- main/php_open_temporary_file.c.orig.port Wed Nov 12 14:52:21 2014
-+++ main/php_open_temporary_file.c Sat Nov 15 10:45:12 2014
-@@ -138,7 +138,7 @@ static int php_do_open_temporary_file(const char *path
- trailing_slash = "/";
- }
-
-- if (spprintf(&opened_path, 0, "%s%s%sXXXXXX", new_state.cwd,
trailing_slash, pfx) >= MAXPATHLEN) {
-+ if (spprintf(&opened_path, 0, "%s%s%sXXXXXXXXXX", new_state.cwd,
trailing_slash, pfx) >= MAXPATHLEN) {
- efree(opened_path);
- efree(new_state.cwd);
- return -1;
Index: 5.6/patches/patch-sapi_cli_php_cli_c
===================================================================
RCS file: 5.6/patches/patch-sapi_cli_php_cli_c
diff -N 5.6/patches/patch-sapi_cli_php_cli_c
--- 5.6/patches/patch-sapi_cli_php_cli_c 19 Dec 2016 20:35:09 -0000
1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-sapi_cli_php_cli_c,v 1.2 2016/12/19 20:35:09 martijn Exp $
---- sapi/cli/php_cli.c.orig.port Wed Nov 9 02:22:57 2016
-+++ sapi/cli/php_cli.c Thu Dec 8 10:55:27 2016
-@@ -677,6 +677,7 @@ static int do_cli(int argc, char **argv TSRMLS_DC) /*
- int lineno = 0;
- const char *param_error=NULL;
- int hide_argv = 0;
-+ char *ini;
-
- zend_try {
-
Index: 7.0/Makefile
===================================================================
RCS file: /cvs/ports/lang/php/7.0/Makefile,v
retrieving revision 1.55
diff -u -p -r1.55 Makefile
--- 7.0/Makefile 27 May 2018 22:05:50 -0000 1.55
+++ 7.0/Makefile 31 May 2018 10:38:43 -0000
@@ -2,7 +2,7 @@
PV= 7.0
V= ${PV}.30
-REVISION= 4
+REVISION= 5
BUILD_DEPENDS+= devel/bison
Index: 7.0/patches/patch-ext_gd_gdcache_h
===================================================================
RCS file: 7.0/patches/patch-ext_gd_gdcache_h
diff -N 7.0/patches/patch-ext_gd_gdcache_h
--- 7.0/patches/patch-ext_gd_gdcache_h 14 Dec 2015 17:58:45 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-ext_gd_gdcache_h,v 1.1.1.1 2015/12/14 17:58:45 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__)
- #include <malloc.h>
- #else
- #include <stdlib.h> /* BS2000/OSD defines malloc() & friends in stdlib.h */
Index: 7.0/patches/patch-ext_gd_libgd_gdkanji_c
===================================================================
RCS file: 7.0/patches/patch-ext_gd_libgd_gdkanji_c
diff -N 7.0/patches/patch-ext_gd_libgd_gdkanji_c
--- 7.0/patches/patch-ext_gd_libgd_gdkanji_c 14 Dec 2015 17:58:45 -0000
1.1.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.1.1 2015/12/14 17:58:45 robert
Exp $
---- ext/gd/libgd/gdkanji.c.orig.port Tue Dec 1 14:36:33 2015
-+++ ext/gd/libgd/gdkanji.c Sun Dec 6 14:04:50 2015
-@@ -361,7 +361,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: 7.0/patches/patch-ext_iconv_iconv_c
===================================================================
RCS file: 7.0/patches/patch-ext_iconv_iconv_c
diff -N 7.0/patches/patch-ext_iconv_iconv_c
--- 7.0/patches/patch-ext_iconv_iconv_c 14 Dec 2015 17:58:45 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,75 +0,0 @@
-$OpenBSD: patch-ext_iconv_iconv_c,v 1.1.1.1 2015/12/14 17:58:45 robert Exp $
---- ext/iconv/iconv.c.orig.port Tue Dec 1 14:36:40 2015
-+++ ext/iconv/iconv.c Sun Dec 6 14:04:50 2015
-@@ -471,7 +471,7 @@ static php_iconv_err_t _php_iconv_appendl(smart_str *d
-
- out_p = ZSTR_VAL((d)->s) + ZSTR_LEN((d)->s);
-
-- 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:
-@@ -651,7 +651,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const c
- out_p = ZSTR_VAL(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) {
-@@ -776,7 +776,7 @@ static php_iconv_err_t _php_iconv_strlen(size_t *pretv
-
- 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;
- }
-@@ -897,7 +897,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(size_t *pretv
-
- 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) {
-@@ -1275,7 +1275,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:
-@@ -1376,7 +1376,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:
-@@ -2626,7 +2626,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: 7.0/patches/patch-ext_mysqlnd_config9_m4
===================================================================
RCS file: 7.0/patches/patch-ext_mysqlnd_config9_m4
diff -N 7.0/patches/patch-ext_mysqlnd_config9_m4
--- 7.0/patches/patch-ext_mysqlnd_config9_m4 14 Dec 2015 17:58:45 -0000
1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-$OpenBSD: patch-ext_mysqlnd_config9_m4,v 1.1.1.1 2015/12/14 17:58:45 robert
Exp $
---- ext/mysqlnd/config9.m4.orig.port Tue Dec 1 14:36:42 2015
-+++ ext/mysqlnd/config9.m4 Sun Dec 6 14:08:19 2015
-@@ -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_charset.c
mysqlnd_wireprotocol.c \
-@@ -34,7 +35,7 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_E
- test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
-
- if test "$PHP_OPENSSL" != "no" || test "$PHP_OPENSSL_DIR" != "no"; then
-- 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]))
-
- PHP_SETUP_OPENSSL(MYSQLND_SHARED_LIBADD,
[AC_DEFINE(MYSQLND_HAVE_SSL,1,[Enable mysqlnd code that uses OpenSSL
directly])])
Index: 7.0/patches/patch-ext_sockets_sockaddr_conv_c
===================================================================
RCS file: 7.0/patches/patch-ext_sockets_sockaddr_conv_c
diff -N 7.0/patches/patch-ext_sockets_sockaddr_conv_c
--- 7.0/patches/patch-ext_sockets_sockaddr_conv_c 14 Dec 2015 17:58:45
-0000 1.1.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.1.1 2015/12/14 17:58:45
robert Exp $
---- ext/sockets/sockaddr_conv.c.orig.port Tue Dec 1 14:36:34 2015
-+++ ext/sockets/sockaddr_conv.c Sun Dec 6 14:04:50 2015
-@@ -11,6 +11,10 @@
-
- extern int php_string_to_if_index(const char *val, unsigned *out);
-
-+#if defined(__OpenBSD__)
-+#define AI_V4MAPPED 0
-+#endif
-+
- #if HAVE_IPV6
- /* Sets addr by hostname, or by ip in string form (AF_INET6) */
- int php_set_inet6_addr(struct sockaddr_in6 *sin6, char *string, php_socket
*php_sock) /* {{{ */
Index: 7.0/patches/patch-ext_spl_php_spl_c
===================================================================
RCS file: 7.0/patches/patch-ext_spl_php_spl_c
diff -N 7.0/patches/patch-ext_spl_php_spl_c
--- 7.0/patches/patch-ext_spl_php_spl_c 1 Sep 2017 08:25:02 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
-$OpenBSD: patch-ext_spl_php_spl_c,v 1.5 2017/09/01 08:25:02 sthen Exp $
-Index: ext/spl/php_spl.c
---- ext/spl/php_spl.c.orig
-+++ ext/spl/php_spl.c
-@@ -780,19 +780,19 @@ PHP_FUNCTION(spl_object_hash)
-
- PHPAPI zend_string *php_spl_object_hash(zval *obj) /* {{{*/
- {
-- intptr_t hash_handle, hash_handlers;
-+ zend_intptr_t hash_handle, hash_handlers;
-
- if (!SPL_G(hash_mask_init)) {
- if (!BG(mt_rand_is_seeded)) {
- php_mt_srand((uint32_t)GENERATE_SEED());
- }
-
-- SPL_G(hash_mask_handle) = (intptr_t)(php_mt_rand() >> 1);
-- SPL_G(hash_mask_handlers) = (intptr_t)(php_mt_rand() >> 1);
-+ SPL_G(hash_mask_handle) = (zend_intptr_t)(php_mt_rand() >> 1);
-+ SPL_G(hash_mask_handlers) = (zend_intptr_t)(php_mt_rand() >> 1);
- SPL_G(hash_mask_init) = 1;
- }
-
-- hash_handle = SPL_G(hash_mask_handle)^(intptr_t)Z_OBJ_HANDLE_P(obj);
-+ hash_handle =
SPL_G(hash_mask_handle)^(zend_intptr_t)Z_OBJ_HANDLE_P(obj);
- hash_handlers = SPL_G(hash_mask_handlers);
-
- return strpprintf(32, "%016lx%016lx", hash_handle, hash_handlers);
Index: 7.0/patches/patch-ext_spl_php_spl_h
===================================================================
RCS file: 7.0/patches/patch-ext_spl_php_spl_h
diff -N 7.0/patches/patch-ext_spl_php_spl_h
--- 7.0/patches/patch-ext_spl_php_spl_h 14 Dec 2015 17:58:45 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-ext_spl_php_spl_h,v 1.1.1.1 2015/12/14 17:58:45 robert Exp $
---- ext/spl/php_spl.h.orig.port Sun Dec 6 14:09:13 2015
-+++ ext/spl/php_spl.h Sun Dec 6 14:09:25 2015
-@@ -62,8 +62,8 @@ PHP_MINFO_FUNCTION(spl);
- ZEND_BEGIN_MODULE_GLOBALS(spl)
- zend_string *autoload_extensions;
- HashTable *autoload_functions;
-- intptr_t hash_mask_handle;
-- intptr_t hash_mask_handlers;
-+ zend_intptr_t hash_mask_handle;
-+ zend_intptr_t hash_mask_handlers;
- int hash_mask_init;
- int autoload_running;
- ZEND_END_MODULE_GLOBALS(spl)
Index: 7.0/patches/patch-ext_xmlrpc_libxmlrpc_encodings_c
===================================================================
RCS file: 7.0/patches/patch-ext_xmlrpc_libxmlrpc_encodings_c
diff -N 7.0/patches/patch-ext_xmlrpc_libxmlrpc_encodings_c
--- 7.0/patches/patch-ext_xmlrpc_libxmlrpc_encodings_c 14 Dec 2015 17:58:45
-0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-ext_xmlrpc_libxmlrpc_encodings_c,v 1.1.1.1 2015/12/14 17:58:45
robert Exp $
---- ext/xmlrpc/libxmlrpc/encodings.c.orig.port Tue Dec 1 14:36:35 2015
-+++ ext/xmlrpc/libxmlrpc/encodings.c Sun Dec 6 14:04:50 2015
-@@ -79,7 +79,7 @@ static char* convert(const char* src, int src_len, int
- if(outbuf) {
- out_ptr = (char*)outbuf;
- while(inlenleft) {
-- st = iconv(ic, (char**)&src, &inlenleft, &out_ptr,
&outlenleft);
-+ st = iconv(ic, (const char**)&src, &inlenleft, &out_ptr,
&outlenleft);
- if(st == -1) {
- if(errno == E2BIG) {
- int diff = out_ptr - outbuf;
Index: 7.0/patches/patch-main_php_h
===================================================================
RCS file: 7.0/patches/patch-main_php_h
diff -N 7.0/patches/patch-main_php_h
--- 7.0/patches/patch-main_php_h 12 Jun 2017 11:48:34 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-main_php_h,v 1.2 2017/06/12 11:48:34 sthen Exp $
-Index: main/php.h
---- main/php.h.orig
-+++ main/php.h
-@@ -146,7 +146,9 @@ END_EXTERN_C()
- # ifdef PHP_WIN32
- typedef int socklen_t;
- # else
-+# if !defined(__OpenBSD__)
- typedef unsigned int socklen_t;
-+# endif
- # endif
- #endif
-
Index: 7.0/patches/patch-main_php_open_temporary_file_c
===================================================================
RCS file: 7.0/patches/patch-main_php_open_temporary_file_c
diff -N 7.0/patches/patch-main_php_open_temporary_file_c
--- 7.0/patches/patch-main_php_open_temporary_file_c 14 Dec 2015 17:58:46
-0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-main_php_open_temporary_file_c,v 1.1.1.1 2015/12/14 17:58:46
robert Exp $
---- main/php_open_temporary_file.c.orig.port Tue Dec 1 14:36:43 2015
-+++ main/php_open_temporary_file.c Sun Dec 13 17:06:18 2015
-@@ -138,7 +138,7 @@ static int php_do_open_temporary_file(const char *path
- trailing_slash = "/";
- }
-
-- if (snprintf(opened_path, MAXPATHLEN, "%s%s%sXXXXXX", new_state.cwd,
trailing_slash, pfx) >= MAXPATHLEN) {
-+ if (snprintf(opened_path, MAXPATHLEN, "%s%s%sXXXXXXXXXX", new_state.cwd,
trailing_slash, pfx) >= MAXPATHLEN) {
- efree(new_state.cwd);
- return -1;
- }
Index: 7.0/patches/patch-sapi_cli_php_cli_c
===================================================================
RCS file: 7.0/patches/patch-sapi_cli_php_cli_c
diff -N 7.0/patches/patch-sapi_cli_php_cli_c
--- 7.0/patches/patch-sapi_cli_php_cli_c 24 Feb 2017 09:13:12 -0000
1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-sapi_cli_php_cli_c,v 1.2 2017/02/24 09:13:12 robert Exp $
---- sapi/cli/php_cli.c.orig.port Tue Feb 14 14:51:10 2017
-+++ sapi/cli/php_cli.c Thu Feb 23 18:50:47 2017
-@@ -666,6 +666,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
- int lineno = 0;
- const char *param_error=NULL;
- int hide_argv = 0;
-+ char *ini;
-
- zend_try {
-