Commit 6a65ea5b by Tom Tromey Committed by Tom Tromey

For PR java/2812:

	* lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
	* lex.c (java_new_lexer): Use ICONV_CONST.
	(java_read_char): Likewise.
	* Make-lang.in (jc1$(exeext)): Link against LIBICONV.
	(jv-scan$(exeext)): Likewise.

From-SVN: r44120
parent f91abfce
2001-07-18 Tom Tromey <tromey@redhat.com>
For PR java/2812:
* lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
* lex.c (java_new_lexer): Use ICONV_CONST.
(java_read_char): Likewise.
* Make-lang.in (jc1$(exeext)): Link against LIBICONV.
(jv-scan$(exeext)): Likewise.
2001-07-14 Tim Josling <tej@melbpc.org.au>
* check-init.c (check_init): Remove references to EXPON_EXPR.
......
......@@ -121,7 +121,7 @@ java-warn =
jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS)
rm -f $@
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
$(JAVA_OBJS) $(BACKEND) $(ZLIB) $(LIBS)
$(JAVA_OBJS) $(BACKEND) $(ZLIB) $(LIBICONV) $(LIBS)
gcjh$(exeext): $(GCJH_OBJS) $(LIBDEPS)
rm -f $@
......@@ -129,7 +129,7 @@ gcjh$(exeext): $(GCJH_OBJS) $(LIBDEPS)
jv-scan$(exeext): $(JVSCAN_OBJS) $(LIBDEPS)
rm -f $@
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVSCAN_OBJS) $(LIBS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVSCAN_OBJS) $(LIBICONV) $(LIBS)
jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIBDEPS)
rm -f $@
......
......@@ -268,7 +268,8 @@ java_new_lexer (finput, encoding)
outp = (char *) &result;
outc = 2;
r = iconv (handle, (const char **) &inp, &inc, &outp, &outc);
r = iconv (handle, (ICONV_CONST char **) &inp, &inc,
&outp, &outc);
iconv_close (handle);
/* Conversion must be complete for us to use the result. */
if (r != (size_t) -1 && inc == 0 && outc == 0)
......@@ -370,8 +371,8 @@ java_read_char (lex)
out_save = out_count;
inp = &lex->buffer[lex->first];
outp = &lex->out_buffer[lex->out_last];
ir = iconv (lex->handle, (const char **) &inp, &inbytesleft,
&outp, &out_count);
ir = iconv (lex->handle, (ICONV_CONST char **) &inp,
&inbytesleft, &outp, &out_count);
/* If we haven't read any bytes, then look to see if we
have read a BOM. */
......
/* Language lexer definitions for the GNU compiler for the Java(TM) language.
Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
This file is part of GNU CC.
......@@ -35,7 +35,7 @@ extern int lineno;
/* A Unicode character, as read from the input file */
typedef unsigned short unicode_t;
#ifdef HAVE_ICONV_H
#ifdef HAVE_ICONV
#include <iconv.h>
#endif /* HAVE_ICONV */
......
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