openbsd-ports/lang/php/5.3/patches/patch-ext_iconv_iconv_c
sthen 748511976d Use PATCHORIG, regen patches and rename the files which didn't match the
normal update-patches filenames. This avoids update-patches picking up the
.orig files in PHP distfiles and make it easier to keep in-sync. ok robert@
2011-06-18 19:49:22 +00:00

76 lines
3.0 KiB
Plaintext

$OpenBSD: patch-ext_iconv_iconv_c,v 1.3 2011/06/18 19:49:50 sthen Exp $
--- ext/iconv/iconv.c.orig.port Wed Dec 1 14:03:36 2010
+++ ext/iconv/iconv.c Sat Jun 18 12:14:49 2011
@@ -334,7 +334,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:
@@ -498,7 +498,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 (errno == E2BIG && in_left > 0) {
@@ -612,7 +612,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;
}
@@ -733,7 +733,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;
}
@@ -865,7 +865,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) {
@@ -1114,7 +1114,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:
@@ -1214,7 +1214,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:
@@ -2542,7 +2542,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: