This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix FileChannelImpl::available failure on s390x
- From: Tom Tromey <tromey at redhat dot com>
- To: "Ulrich Weigand" <weigand at i1 dot informatik dot uni-erlangen dot de>
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: 21 Oct 2004 09:04:09 -0600
- Subject: Re: [PATCH] Fix FileChannelImpl::available failure on s390x
- References: <200410192146.i9JLk1Sd022297@faui1g.informatik.uni-erlangen.de>
- Reply-to: tromey at redhat dot com
>>>>> "Ulrich" == Ulrich Weigand <weigand@i1.informatik.uni-erlangen.de> writes:
Ulrich> I've found the cause of the intermittent Process_[123] test
Ulrich> case failures on s390x-ibm-linux (64-bit only). It turned out
Ulrich> to be a call to the FIONREAD ioctl using an incorrect
Ulrich> parameter: the Linux kernel assumes the argument is an 'int
Ulrich> *', not a 'long *'.
Good catch.
Ulrich> * gnu/java/nio/channels/natFileChannelPosix.cc
Ulrich> (FileChannelImpl::available): Call FIONREAD ioctl with 'int *'
Ulrich> argument instead of 'long *'.
Apparently the libstdc++ guys discovered that on Irix 6.5, this ioctl
takes an `off_t *'. They solved this with a host-specific
define... I'm not sure what we should do. Do we even build on this
platform any more?
Anyway, your patch is fine, as it is an improvement.
Tom