]> Savannah Git Hosting - gnulib.git/commitdiff
uchar-h-c23: Fix compilation error on OmniOS.
authorCollin Funk <collin.funk1@gmail.com>
Fri, 24 Jan 2025 05:14:43 +0000 (21:14 -0800)
committerBruno Haible <bruno@clisp.org>
Sun, 2 Feb 2025 09:42:30 +0000 (10:42 +0100)
* lib/lc-charset-unicode.c (locale_encoding_to_unicode)
(unicode_to_locale_encoding): Cast the argument to iconv with
ICONV_CONST.

ChangeLog
lib/lc-charset-unicode.c

index 7af1c0bfe4027189aa54d05d0de85683d12ec942..36851200d446474e7257023de15d693f7087c1f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-01-23  Collin Funk  <collin.funk1@gmail.com>
+
+       uchar-h-c23: Fix compilation error on OmniOS.
+       * lib/lc-charset-unicode.c (locale_encoding_to_unicode)
+       (unicode_to_locale_encoding): Cast the argument to iconv with
+       ICONV_CONST.
+
 2025-01-18  Paul Eggert  <eggert@cs.ucla.edu>
 
        flexmember: port to IBM XL C 16.1
index 9542873609b222410f8e553682c9b9a98992a7bc..448619b68741a8352deb57666cfea1ff509cdff9 100644 (file)
@@ -175,7 +175,7 @@ locale_encoding_to_unicode (wchar_t wc)
     char *utf8ptr = utf8buf;
     size_t utf8size = sizeof (utf8buf);
     size_t ret = iconv (conv->cd_locale_to_utf8,
-                        &mbptr, &mbsize,
+                        (ICONV_CONST char **) &mbptr, &mbsize,
                         &utf8ptr, &utf8size);
     if (ret == (size_t)(-1))
       /* Conversion error.  */
@@ -234,7 +234,7 @@ unicode_to_locale_encoding (char32_t uc)
     char *mbptr = mbbuf;
     size_t mbsize = sizeof (mbbuf);
     size_t ret = iconv (conv->cd_utf8_to_locale,
-                        &utf8ptr, &utf8size,
+                        (ICONV_CONST char **) &utf8ptr, &utf8size,
                         &mbptr, &mbsize);
     if (ret == (size_t)(-1))
       /* Conversion error.  */