patch-ext_iconv_iconv_c 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. $OpenBSD: patch-ext_iconv_iconv_c,v 1.2 2015/07/12 14:06:23 robert Exp $
  2. --- ext/iconv/iconv.c.orig.port Fri Jul 10 02:33:32 2015
  3. +++ ext/iconv/iconv.c Sun Jul 12 16:05:11 2015
  4. @@ -463,7 +463,7 @@ static php_iconv_err_t _php_iconv_appendl(smart_str *d
  5. out_p = (d)->c + (d)->len;
  6. - if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
  7. + if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
  8. #if ICONV_SUPPORTS_ERRNO
  9. switch (errno) {
  10. case EINVAL:
  11. @@ -650,7 +650,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const c
  12. out_p = out_buf;
  13. while (in_left > 0) {
  14. - result = iconv(cd, (char **) &in_p, &in_left, (char **) &out_p, &out_left);
  15. + result = iconv(cd, (const char **) &in_p, &in_left, (char **) &out_p, &out_left);
  16. out_size = bsz - out_left;
  17. if (result == (size_t)(-1)) {
  18. if (ignore_ilseq && errno == EILSEQ) {
  19. @@ -775,7 +775,7 @@ static php_iconv_err_t _php_iconv_strlen(unsigned int
  20. prev_in_left = in_left;
  21. - if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
  22. + if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
  23. if (prev_in_left == in_left) {
  24. break;
  25. }
  26. @@ -896,7 +896,7 @@ static php_iconv_err_t _php_iconv_substr(smart_str *pr
  27. prev_in_left = in_left;
  28. - if (iconv(cd1, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
  29. + if (iconv(cd1, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
  30. if (prev_in_left == in_left) {
  31. break;
  32. }
  33. @@ -1028,7 +1028,7 @@ static php_iconv_err_t _php_iconv_strpos(unsigned int
  34. prev_in_left = in_left;
  35. - if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
  36. + if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
  37. if (prev_in_left == in_left) {
  38. #if ICONV_SUPPORTS_ERRNO
  39. switch (errno) {
  40. @@ -1277,7 +1277,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_st
  41. out_left = out_size - out_reserved;
  42. - if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
  43. + if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
  44. #if ICONV_SUPPORTS_ERRNO
  45. switch (errno) {
  46. case EINVAL:
  47. @@ -1377,7 +1377,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_st
  48. out_p = buf;
  49. out_left = out_size;
  50. - if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
  51. + if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
  52. #if ICONV_SUPPORTS_ERRNO
  53. switch (errno) {
  54. case EINVAL:
  55. @@ -2650,7 +2650,7 @@ static int php_iconv_stream_filter_append_bucket(
  56. tcnt = self->stub_len;
  57. while (tcnt > 0) {
  58. - if (iconv(self->cd, &pt, &tcnt, &pd, &ocnt) == (size_t)-1) {
  59. + if (iconv(self->cd, (const char **)&pt, &tcnt, &pd, &ocnt) == (size_t)-1) {
  60. #if ICONV_SUPPORTS_ERRNO
  61. switch (errno) {
  62. case EILSEQ: