From: Tom Tromey Date: Wed, 18 Jul 2001 17:18:55 +0000 (+0000) Subject: For PR java/2812: X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a65ea5be3974fda8ad750906ae553914f1c5f0b;p=gcc.git 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 --- diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index a22012a5010..b3e9a2ad375 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,12 @@ +2001-07-18 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. + 2001-07-14 Tim Josling * 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 f1c00d7f938..57682253a1c 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 35cd31749ca..861b6eb54ef 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 e9c47ded8de..e5d217deb1e 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 #endif /* HAVE_ICONV */