+2009-03-23 Tom Tromey <tromey@redhat.com>
+
+ * charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
+ (iconv): Make 'inbuf' argument const.
+ (convert_between_encodings): Use ICONV_CONST.
+ (wchar_iterate): Likewise.
+
2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
* windows-nat.c (AdjustTokenPrivileges): Implement macro wraparound for
#undef iconv
#undef iconv_close
+#undef ICONV_CONST
+#define ICONV_CONST const
+
iconv_t
iconv_open (const char *to, const char *from)
{
}
size_t
-iconv (iconv_t ucs_flag, char **inbuf, size_t *inbytesleft,
+iconv (iconv_t ucs_flag, const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
if (ucs_flag)
outp = obstack_base (output) + old_size;
outleft = space_request;
- r = iconv (desc, &inp, &inleft, &outp, &outleft);
+ r = iconv (desc, (ICONV_CONST char **) &inp, &inleft, &outp, &outleft);
/* Now make sure that the object on the obstack only includes
bytes we have converted. */
size_t num;
gdb_wchar_t result;
- size_t r = iconv (iter->desc, (char **) &iter->input, &iter->bytes,
+ size_t r = iconv (iter->desc,
+ (ICONV_CONST char **) &iter->input, &iter->bytes,
&outptr, &out_avail);
if (r == (size_t) -1)
{