Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Sep 2021 14:42:48 GMT
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: efe014e6b177 - main - iconv: Make it possible to build iconv(3) test suite.
Message-ID:  <202109061442.186Egm1Q073031@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by trasz:

URL: https://cgit.FreeBSD.org/src/commit/?id=efe014e6b177ba1b0d70f7df751f5066d4eafe9b

commit efe014e6b177ba1b0d70f7df751f5066d4eafe9b
Author:     Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2021-09-06 14:41:06 +0000
Commit:     Edward Tomasz Napierala <trasz@FreeBSD.org>
CommitDate: 2021-09-06 14:41:26 +0000

    iconv: Make it possible to build iconv(3) test suite.
    
    It was broken after 1243a98e38a5.
    
    Reviewed By:    allanjude
    Sponsored by:   Klara, Inc.
    Differential Revision:  https://reviews.freebsd.org/D31816
---
 tools/test/iconv/gnu/gnu.c           | 16 ++++++++--------
 tools/test/iconv/posix/posix.c       | 16 ++++++++--------
 tools/test/iconv/tablegen/tablegen.c |  4 ++--
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/tools/test/iconv/gnu/gnu.c b/tools/test/iconv/gnu/gnu.c
index 47e83ec3ae3d..ecf180d23b98 100644
--- a/tools/test/iconv/gnu/gnu.c
+++ b/tools/test/iconv/gnu/gnu.c
@@ -243,8 +243,8 @@ ctl_uc_hook(void)
 	struct iconv_hooks hooks;
 	iconv_t cd;
 	size_t inbytesleft = 15, outbytesleft = 40;
-	const char **inptr;
-	const char *s = "Hello World!";
+	char **inptr;
+	char *s = "Hello World!";
 	char **outptr;
 	char *outbuf;
 
@@ -273,8 +273,8 @@ ctl_wc_hook(void)
 	struct iconv_hooks hooks;
 	iconv_t cd;
 	size_t inbytesleft, outbytesleft = 40;
-	const char **inptr;
-	const char *s = "Hello World!";
+	char **inptr;
+	char *s = "Hello World!";
 	char **outptr;
 	char *outbuf;
 
@@ -350,7 +350,7 @@ ctl_mb_to_uc_fb(void)
 	size_t inbytesleft, outbytesleft;
 	uint16_t inbuf[1] = { 0xF187 };
 	uint8_t outbuf[4] = { 0x00, 0x00, 0x00, 0x00 };
-	const char *inptr;
+	char *inptr;
 	char *outptr;
 	int ret;
 
@@ -366,7 +366,7 @@ ctl_mb_to_uc_fb(void)
 	if (iconvctl(cd, ICONV_SET_FALLBACKS, (void *)&fb) != 0)
 		return (1);
 
-	inptr = (const char *)inbuf;
+	inptr = (char *)inbuf;
 	outptr = (char *)outbuf;
 	inbytesleft = 2;
 	outbytesleft = 4;
@@ -389,7 +389,7 @@ gnu_openinto(void)
 {
 	iconv_allocation_t *myspace;
 	size_t inbytesleft, outbytesleft;
-	const char *inptr;
+	char *inptr;
 	char *inbuf = "works!", *outptr;
 	char outbuf[6];
 
@@ -398,7 +398,7 @@ gnu_openinto(void)
 	if (iconv_open_into("ASCII", "ASCII", myspace) == -1)
 		return (1);
 
-	inptr = (const char *)inbuf;
+	inptr = (char *)inbuf;
 	outptr = (char *)outbuf;
 	inbytesleft = 6;
 	outbytesleft = 6;
diff --git a/tools/test/iconv/posix/posix.c b/tools/test/iconv/posix/posix.c
index 2502393b5509..7faed92416a3 100644
--- a/tools/test/iconv/posix/posix.c
+++ b/tools/test/iconv/posix/posix.c
@@ -108,7 +108,7 @@ conv_ret(void)
 {
 	iconv_t cd;
 	size_t inbytesleft, outbytesleft;
-	const char *inptr;
+	char *inptr;
 	char *outptr;
 	uint32_t outbuf[4];
 	uint32_t inbuf[2] = { 0x00000151, 0x00000171 };
@@ -116,7 +116,7 @@ conv_ret(void)
 	if ((cd = iconv_open("ASCII", "UTF-32LE")) == (iconv_t)-1)
 		return (1);
 
-	inptr = (const char *)inbuf;
+	inptr = (char *)inbuf;
 	outptr = (char *)outbuf;
 	inbytesleft = 8;
 	outbytesleft = 16;
@@ -129,7 +129,7 @@ conv_2big(void)
 {
 	iconv_t cd;
 	size_t inbytesleft, outbytesleft;
-	const char *inptr;
+	char *inptr;
 	char *outptr;
 	uint32_t inbuf[4];
 	uint32_t outbuf[2];
@@ -138,7 +138,7 @@ conv_2big(void)
 	if ((cd = iconv_open("ASCII", "ASCII")) == (iconv_t)-1)
 		return (1);
 
-	inptr = (const char *)inbuf;
+	inptr = (char *)inbuf;
 	outptr = (char *)outbuf;
 	inbytesleft = 16;
 	outbytesleft = 8;
@@ -168,7 +168,7 @@ conv_einval(void)
 {
 	iconv_t	 cd;
 	size_t inbytesleft, outbytesleft;
-	const char *inptr;
+	char *inptr;
 	char *outptr;
 	uint32_t outbuf[4];
         uint16_t inbuf[1] = { 0xEA42 };
@@ -177,7 +177,7 @@ conv_einval(void)
 	if ((cd = iconv_open("UTF-32", "BIG5")) == (iconv_t)-1)
 		return (1);
 
-	inptr = (const char *)inbuf;
+	inptr = (char *)inbuf;
 	outptr = (char *)outbuf;
 	inbytesleft = 2;
 	outbytesleft = 16;
@@ -207,7 +207,7 @@ conv_eilseq(void)
 {
 	iconv_t cd;
 	size_t inbytesleft, outbytesleft;
-	const char *inptr;
+	char *inptr;
 	char *outptr;
 	uint32_t outbuf[4];
 	uint16_t inbuf[1] = { 0x8AC0 };
@@ -216,7 +216,7 @@ conv_eilseq(void)
 	if ((cd = iconv_open("Latin2", "UTF-16LE")) == (iconv_t)-1)
 		return (1);
 
-	inptr = (const char *)inbuf;
+	inptr = (char *)inbuf;
 	outptr = (char *)outbuf;
 	inbytesleft = 4;
 	outbytesleft = 16;
diff --git a/tools/test/iconv/tablegen/tablegen.c b/tools/test/iconv/tablegen/tablegen.c
index ee8cecad70d8..a67de54ff310 100644
--- a/tools/test/iconv/tablegen/tablegen.c
+++ b/tools/test/iconv/tablegen/tablegen.c
@@ -287,7 +287,7 @@ do_conv(iconv_t cd, bool uniinput) {
 	size_t inbytesleft, outbytesleft, ret;
 	uint32_t outbuf;
 	uint32_t inbuf;
-	const char *inbuf_;
+	char *inbuf_;
 	char *outbuf_;
 
 	for (inbuf = 0; inbuf < (lflag ? 0x100000 : 0x10000); inbuf += 1) {
@@ -297,7 +297,7 @@ do_conv(iconv_t cd, bool uniinput) {
 		outbytesleft = 4;
 		outbuf = 0x00000000;
 		outbuf_ = (char *)&outbuf;
-		inbuf_ = (const char *)&inbuf;
+		inbuf_ = (char *)&inbuf;
 		iconv(cd, NULL, NULL, NULL, NULL);
 		fb_flags = 0;
 		errno = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109061442.186Egm1Q073031>