summarylogtreecommitdiffstats
path: root/0028-Enable-and-fix-use-of-iconv.patch
diff options
context:
space:
mode:
Diffstat (limited to '0028-Enable-and-fix-use-of-iconv.patch')
-rw-r--r--0028-Enable-and-fix-use-of-iconv.patch47
1 files changed, 21 insertions, 26 deletions
diff --git a/0028-Enable-and-fix-use-of-iconv.patch b/0028-Enable-and-fix-use-of-iconv.patch
index 6d387654154..da8f6d75246 100644
--- a/0028-Enable-and-fix-use-of-iconv.patch
+++ b/0028-Enable-and-fix-use-of-iconv.patch
@@ -1,33 +1,19 @@
-From 5872f3ae8556fa1dfd4be8155db37a86db715e20 Mon Sep 17 00:00:00 2001
+From 94bf26c2b8ae87dc5add63ef4df8b765e4067651 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 21:08:20 +0100
-Subject: [PATCH 28/33] Enable and fix use of iconv
+Subject: [PATCH 28/34] Enable and fix use of iconv
Change-Id: I5f0ab27afca0800dec11c7af74d196190820ae5c
---
- config.tests/gnu-libiconv/gnu-libiconv.cpp | 2 +-
- src/corelib/codecs/qiconvcodec.cpp | 7 +++----
- src/corelib/configure.json | 4 ++--
- 3 files changed, 6 insertions(+), 7 deletions(-)
+ src/corelib/codecs/qiconvcodec.cpp | 7 +++----
+ src/corelib/configure.json | 6 +++---
+ 2 files changed, 6 insertions(+), 7 deletions(-)
-diff --git a/config.tests/gnu-libiconv/gnu-libiconv.cpp b/config.tests/gnu-libiconv/gnu-libiconv.cpp
-index fe4b87b923..be4236436f 100644
---- a/config.tests/gnu-libiconv/gnu-libiconv.cpp
-+++ b/config.tests/gnu-libiconv/gnu-libiconv.cpp
-@@ -43,7 +43,7 @@ int main(int, char **)
- {
- iconv_t x = iconv_open("", "");
-
-- const char *inp;
-+ char *inp;
- char *outp;
- size_t inbytes, outbytes;
- iconv(x, &inp, &inbytes, &outp, &outbytes);
diff --git a/src/corelib/codecs/qiconvcodec.cpp b/src/corelib/codecs/qiconvcodec.cpp
-index 330eb7c038..88a782b863 100644
+index 9c39727946..cc14036b25 100644
--- a/src/corelib/codecs/qiconvcodec.cpp
+++ b/src/corelib/codecs/qiconvcodec.cpp
-@@ -49,7 +49,6 @@ QT_REQUIRE_CONFIG(iconv);
+@@ -47,7 +47,6 @@
#include <errno.h>
#include <locale.h>
#include <stdio.h>
@@ -35,7 +21,7 @@ index 330eb7c038..88a782b863 100644
// unistd.h is needed for the _XOPEN_UNIX macro
#include <unistd.h>
-@@ -182,7 +181,7 @@ QString QIconvCodec::convertToUnicode(const char* chars, int len, ConverterState
+@@ -180,7 +179,7 @@ QString QIconvCodec::convertToUnicode(const char* chars, int len, ConverterState
IconvState *state = *pstate;
size_t inBytesLeft = len;
// best case assumption, each byte is converted into one UTF-16 character, plus 2 bytes for the BOM
@@ -44,7 +30,7 @@ index 330eb7c038..88a782b863 100644
// GNU doesn't disagree with POSIX :/
const char *inBytes = chars;
#else
-@@ -281,7 +280,7 @@ static bool setByteOrder(iconv_t cd)
+@@ -279,7 +278,7 @@ static bool setByteOrder(iconv_t cd)
size_t outBytesLeft = sizeof buf;
size_t inBytesLeft = sizeof bom;
@@ -53,7 +39,7 @@ index 330eb7c038..88a782b863 100644
const char **inBytesPtr = const_cast<const char **>(&inBytes);
#else
char **inBytesPtr = &inBytes;
-@@ -303,7 +302,7 @@ QByteArray QIconvCodec::convertFromUnicode(const QChar *uc, int len, ConverterSt
+@@ -301,7 +300,7 @@ QByteArray QIconvCodec::convertFromUnicode(const QChar *uc, int len, ConverterSt
char *outBytes;
size_t inBytesLeft;
@@ -63,10 +49,19 @@ index 330eb7c038..88a782b863 100644
#else
char **inBytesPtr = &inBytes;
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
-index 183eb3a13e..a4560d5a60 100644
+index a22a7459bd..b7ed2f7281 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
-@@ -532,9 +532,9 @@
+@@ -71,7 +71,7 @@
+ "test": {
+ "main": [
+ "iconv_t x = iconv_open(\"\", \"\");",
+- "const char *inp;",
++ "char *inp;",
+ "char *outp;",
+ "size_t inbytes, outbytes;",
+ "iconv(x, &inp, &inbytes, &outp, &outbytes);",
+@@ -615,9 +615,9 @@
},
"gnu-libiconv": {
"label": "GNU iconv",