+2003-07-07 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * cppcharset.c (ICONV_CONST): Define iff !HAVE_ICONV.
+ (convert_cset): Change inbuf to type ICONV_CONST char.
+ * Makefile.in (LIBS): Add LIBICONV.
+
2003-07-06 Art Haas <ahaas@airmail.net>
* f/global.c (ffeglobal_type_string_): Fix obsolete GCC array
# How to link with both our special library facilities
# and the system's installed libraries.
-LIBS = $(INTLLIBS) @LIBS@ $(LIBIBERTY)
+LIBS = $(INTLLIBS) @LIBS@ $(LIBIBERTY) $(LIBICONV)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
#define iconv_open(x, y) (errno = EINVAL, (iconv_t)-1)
#define iconv(a,b,c,d,e) (errno = EINVAL, (size_t)-1)
#define iconv_close(x) 0
+#define ICONV_CONST
#endif
#if HOST_CHARSET == HOST_CHARSET_ASCII
}
else
{
- char *inbuf, *outbuf;
+ ICONV_CONST char *inbuf;
+ char *outbuf;
size_t inbytesleft, outbytesleft;
/* Reset conversion descriptor and check that it is valid. */
if (iconv (cd, 0, 0, 0, 0) == (size_t)-1)
return false;
- inbuf = (char *)from;
+ inbuf = (ICONV_CONST char *)from;
inbytesleft = flen;
outbuf = (char *)to->text + to->len;
outbytesleft = to->asize - to->len;