On Cygwin (on X86) ioctl on FIONREAD returns EINVAL on the errno variable instead of ENOTTY. So on the file native/jni/java-nio/gnu_java_nio_VMChannel.c the function Java_gnu_java_nio_VMChannel_available (JNIEnv *env, jclass c __attribute__((unused)), jint fd) should control also for EINVAL on errno variable. For example, starting from line 1601 (from today cvs): if (ioctl (fd, FIONREAD, &avail) == -1) { #if defined(ENOTTY) && defined(HAVE_FSTAT) if (errno == ENOTTY) the last line on cygwin should be if (errno == ENOTTY || errno = EINVAL) The configure string is : ./configure --without-x --disable-gtk-peer --disable-gconf-peer --disable-plugin
Thank you! Now I understand why GNU classpath I/O wasn't working quite right on Cygwin. While perhaps this should be changed in Cygwin, in the meantime I am incorporating this fix into the Cygwin Ports classpath package and I'll try to let the gcc4 maintainer know about this as well.
(In reply to comment #1) > Thank you! Now I understand why GNU classpath I/O wasn't working quite right > on Cygwin. While perhaps this should be changed in Cygwin, in the meantime I > am incorporating this fix into the Cygwin Ports classpath package and I'll try > to let the gcc4 maintainer know about this as well. Sorry to answer too late, I was trying to port classpath on wince (if I remeber well, it has passed too much time and I work no more on that project) and I found this problem. Anyway, I'm happy to see that this report helped to solve another problem.