]> 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:56:39 +0000 (10:56 +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 ed63398f8cc738445c72ca17461f46c4ca017e86..3a1a13fcaf803878a18c8ed3ed94a0dff1ea3192 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 4558f9288e0634486db6ef640283209d9935b9e8..b51a571f272fdabb8a182daa83cd5cebe213b8dd 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion between the current locale's character encoding and Unicode.
-   Copyright (C) 2023-2024 Free Software Foundation, Inc.
+   Copyright (C) 2023-2025 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
@@ -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.  */