12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- $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:
|