Commit 5beadb33 by Andrew Pinski Committed by Andreas Jaeger

cppcharset.c (ICONV_CONST): Define iff !HAVE_ICONV.

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.

From-SVN: r69029
parent 1dbb6ce8
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> 2003-07-06 Art Haas <ahaas@airmail.net>
* f/global.c (ffeglobal_type_string_): Fix obsolete GCC array * f/global.c (ffeglobal_type_string_): Fix obsolete GCC array
......
...@@ -691,7 +691,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) ...@@ -691,7 +691,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# How to link with both our special library facilities # How to link with both our special library facilities
# and the system's installed libraries. # and the system's installed libraries.
LIBS = $(INTLLIBS) @LIBS@ $(LIBIBERTY) LIBS = $(INTLLIBS) @LIBS@ $(LIBIBERTY) $(LIBICONV)
# Any system libraries needed just for GNAT. # Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@ SYSLIBS = @GNAT_LIBEXC@
......
...@@ -81,6 +81,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ...@@ -81,6 +81,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define iconv_open(x, y) (errno = EINVAL, (iconv_t)-1) #define iconv_open(x, y) (errno = EINVAL, (iconv_t)-1)
#define iconv(a,b,c,d,e) (errno = EINVAL, (size_t)-1) #define iconv(a,b,c,d,e) (errno = EINVAL, (size_t)-1)
#define iconv_close(x) 0 #define iconv_close(x) 0
#define ICONV_CONST
#endif #endif
#if HOST_CHARSET == HOST_CHARSET_ASCII #if HOST_CHARSET == HOST_CHARSET_ASCII
...@@ -210,14 +211,15 @@ convert_cset (iconv_t cd, const uchar *from, size_t flen, struct strbuf *to) ...@@ -210,14 +211,15 @@ convert_cset (iconv_t cd, const uchar *from, size_t flen, struct strbuf *to)
} }
else else
{ {
char *inbuf, *outbuf; ICONV_CONST char *inbuf;
char *outbuf;
size_t inbytesleft, outbytesleft; size_t inbytesleft, outbytesleft;
/* Reset conversion descriptor and check that it is valid. */ /* Reset conversion descriptor and check that it is valid. */
if (iconv (cd, 0, 0, 0, 0) == (size_t)-1) if (iconv (cd, 0, 0, 0, 0) == (size_t)-1)
return false; return false;
inbuf = (char *)from; inbuf = (ICONV_CONST char *)from;
inbytesleft = flen; inbytesleft = flen;
outbuf = (char *)to->text + to->len; outbuf = (char *)to->text + to->len;
outbytesleft = to->asize - to->len; outbytesleft = to->asize - to->len;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment