]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gnu/gcj/convert/natIconv.cc (done): Use HAVE_ICONV.
authorLoren J. Rittle <ljrittle@acm.org>
Fri, 10 Aug 2001 17:39:34 +0000 (17:39 +0000)
committerLoren J. Rittle <ljrittle@gcc.gnu.org>
Fri, 10 Aug 2001 17:39:34 +0000 (17:39 +0000)
From-SVN: r44772

libjava/ChangeLog
libjava/gnu/gcj/convert/natIconv.cc

index fa6381ae8314bfdc84fc76fccc798a6b74303282..1421e4c910db20d70f8e0898890062c1b258a33b 100644 (file)
@@ -1,6 +1,7 @@
 2001-08-10  Loren J. Rittle  <ljrittle@acm.org>
 
        * java/lang/natObject.cc (is_mp): Protect use of _SC_NPROCESSORS_ONLN.
+       * gnu/gcj/convert/natIconv.cc (done): Use HAVE_ICONV.
 
 2001-08-06  Tom Tromey  <tromey@redhat.com>
 
index 1eb869dd0f19f06b82f3e0b012728966f125311f..03fad96f1f35353c2d05b2c2af619e734c5ecdfa 100644 (file)
@@ -118,6 +118,7 @@ gnu::gcj::convert::Input_iconv::read (jcharArray outbuffer,
 void
 gnu::gcj::convert::Input_iconv::done ()
 {
+#ifdef HAVE_ICONV
   // 50 bytes should be enough for any reset sequence.
   size_t avail = 50;
   char tmp[avail];
@@ -127,6 +128,9 @@ gnu::gcj::convert::Input_iconv::done ()
   // might be generated in that situation.
   iconv_adapter (iconv, (iconv_t) handle, NULL, NULL, &p, &avail);
   BytesToUnicode::done ();
+#else /* HAVE_ICONV */
+  // If no iconv, do nothing
+#endif /* HAVE_ICONV */
 }
 
 void
@@ -269,6 +273,7 @@ gnu::gcj::convert::IOConverter::iconv_init (void)
 void
 gnu::gcj::convert::Output_iconv::done ()
 {
+#ifdef HAVE_ICONV
   // 50 bytes should be enough for any reset sequence.
   size_t avail = 50;
   char tmp[avail];
@@ -278,4 +283,7 @@ gnu::gcj::convert::Output_iconv::done ()
   // might be generated in that situation.
   iconv_adapter (iconv, (iconv_t) handle, NULL, NULL, &p, &avail);
   UnicodeToBytes::done ();
+#else /* HAVE_ICONV */
+  // If no iconv, do nothing
+#endif /* HAVE_ICONV */
 }