aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog9
-rw-r--r--gcc/java/Make-lang.in4
-rw-r--r--gcc/java/lex.c7
-rw-r--r--gcc/java/lex.h4
4 files changed, 17 insertions, 7 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index a22012a..b3e9a2a 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,12 @@
+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.
diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in
index f1c00d7..5768225 100644
--- a/gcc/java/Make-lang.in
+++ b/gcc/java/Make-lang.in
@@ -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 $@
diff --git a/gcc/java/lex.c b/gcc/java/lex.c
index 35cd317..861b6eb 100644
--- a/gcc/java/lex.c
+++ b/gcc/java/lex.c
@@ -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. */
diff --git a/gcc/java/lex.h b/gcc/java/lex.h
index e9c47de..e5d217d 100644
--- a/gcc/java/lex.h
+++ b/gcc/java/lex.h
@@ -1,5 +1,5 @@
/* 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 */