Revert "php7: Fix compilation without deprecated OpenSSL APIs"

This reverts commit a176ffa0a1.
I just noticed that I accidentally used wrong openwrt branch
to compile this, with 18.09 branch the compilation fails.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This commit is contained in:
Michael Heimpold
2019-06-21 10:29:04 +02:00
parent 115f72fc48
commit 7879bbdb4b
9 changed files with 38 additions and 184 deletions
@@ -1,3 +1,26 @@
commit 31e53f07c26e5ac75ec2c2d99497439323dbdaf7
Author: Philip Prindeville <philipp@redfish-solutions.com>
Date: Wed Jan 24 18:47:19 2018 -0700
Be consistent in clearing out in php_iconv_string()
Also, don't bother checking returned point in error case since it
will always be NULL (and not require free()ing, obviously).
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 35dafd4..4289242 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -559,6 +559,8 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
size_t result;
zend_string *ret, *out_buffer;
+ *out = NULL;
+
/*
This is not the right way to get output size...
This is not space efficient for large text.
commit 3763c8f1645983b5abc37c60597e1ecc1bf89019
Author: Philip Prindeville <philipp@redfish-solutions.com>
Date: Thu Jan 25 14:18:00 2018 -0700
@@ -8,7 +31,7 @@ diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 4289242..807bb14 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -699,6 +699,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
@@ -697,6 +697,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
iconv_close(cd);
if (result == (size_t)(-1)) {
@@ -16,7 +39,7 @@ index 4289242..807bb14 100644
switch (errno) {
case EINVAL:
retval = PHP_ICONV_ERR_ILLEGAL_CHAR;
@@ -715,7 +716,6 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
@@ -713,7 +714,6 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
default:
/* other error */
@@ -24,7 +47,7 @@ index 4289242..807bb14 100644
return PHP_ICONV_ERR_UNKNOWN;
}
}
@@ -988,9 +988,6 @@ static php_iconv_err_t _php_iconv_strpos(size_t *pretval,
@@ -986,9 +986,6 @@ static php_iconv_err_t _php_iconv_strpos(size_t *pretval,
err = php_iconv_string(ndl, ndl_nbytes, &ndl_buf, GENERIC_SUPERSET_NAME, enc);
if (err != PHP_ICONV_ERR_SUCCESS) {
@@ -34,7 +57,7 @@ index 4289242..807bb14 100644
return err;
}
@@ -2494,9 +2491,6 @@ PHP_NAMED_FUNCTION(php_if_iconv)
@@ -2465,9 +2462,6 @@ PHP_NAMED_FUNCTION(php_if_iconv)
if (err == PHP_ICONV_ERR_SUCCESS && out_buffer != NULL) {
RETVAL_STR(out_buffer);
} else {