This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
I have been looking at getting libjava working on *-*-freebsd* again. We don't define HAVE_ICONV. It appears some uses of iconv were unprotected. Based upon the calling protocol, it appears that doing nothing is OK in this case. * gnu/gcj/convert/natIconv.cc (done): Use HAVE_ICONV. Index: gnu/gcj/convert/natIconv.cc =================================================================== RCS file: /cvs/gcc/egcs/libjava/gnu/gcj/convert/natIconv.cc,v retrieving revision 1.10 diff -c -r1.10 natIconv.cc *** natIconv.cc 2001/07/30 20:24:18 1.10 --- natIconv.cc 2001/08/09 23:26:42 *************** *** 118,123 **** --- 118,124 ---- 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,132 **** --- 128,136 ---- // 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,274 **** --- 273,279 ---- 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,281 **** --- 283,289 ---- // 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 */ }
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |