diff options
Diffstat (limited to 'intl')
-rw-r--r-- | intl/dcigettext.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/intl/dcigettext.c b/intl/dcigettext.c index cd3392128b..dcdc93c25d 100644 --- a/intl/dcigettext.c +++ b/intl/dcigettext.c @@ -339,7 +339,7 @@ typedef struct transmem_list } transmem_block_t; static struct transmem_list *transmem_list; #else -typedef char transmem_block_t; +typedef unsigned char transmem_block_t; #endif @@ -793,7 +793,7 @@ _nl_find_msg (domain_file, msgid, lengthp) __libc_lock_lock (lock); - inbuf = result; + inbuf = (const unsigned char *) result; outbuf = freemem + sizeof (size_t); malloc_count = 0; @@ -834,7 +834,9 @@ _nl_find_msg (domain_file, msgid, lengthp) goto resize_freemem; outleft = freemem_size - sizeof (size_t); - if (iconv (domain->conv, &inptr, &inleft, &outptr, &outleft) + if (iconv (domain->conv, + (ICONV_CONST char **) &inptr, &inleft, + &outptr, &outleft) != (size_t) (-1)) { outbuf = (unsigned char *) outptr; @@ -901,7 +903,7 @@ _nl_find_msg (domain_file, msgid, lengthp) /* We have now in our buffer a converted string. Put this into the table of conversions. */ *(size_t *) freemem = outbuf - freemem - sizeof (size_t); - domain->conv_tab[act] = freemem; + domain->conv_tab[act] = (char *) freemem; /* Shrink freemem, but keep it aligned. */ freemem_size -= outbuf - freemem; freemem = outbuf; |