OSDN Git Service

For PR java/2812:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Jul 2001 17:18:55 +0000 (17:18 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Jul 2001 17:18:55 +0000 (17:18 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44120 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/Make-lang.in
gcc/java/lex.c
gcc/java/lex.h

index a22012a..b3e9a2a 100644 (file)
@@ -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.
index f1c00d7..5768225 100644 (file)
@@ -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 $@
index 35cd317..861b6eb 100644 (file)
@@ -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.  */
index e9c47de..e5d217d 100644 (file)
@@ -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 */