This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] Fix FileChannelImpl::available failure on s390x
- From: "Ulrich Weigand" <weigand at i1 dot informatik dot uni-erlangen dot de>
- To: konqueror at gmx dot de (Michael Koch)
- Cc: java-patches at gcc dot gnu dot org, weigand at i1 dot informatik dot uni-erlangen dot de (Ulrich Weigand), tromey at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Fri, 22 Oct 2004 16:39:34 +0200 (CEST)
- Subject: Re: [PATCH] Fix FileChannelImpl::available failure on s390x
Michael Koch wrote:
> Am Donnerstag, 21. Oktober 2004 20:22 schrieb Ulrich Weigand:
> > Tom Tromey wrote:
> > > Anyway, your patch is fine, as it is an improvement.
> >
> > Committed. B.t.w. I've just noticed that
> > gnu::java::net::PlainSocketImpl::available
> > has similar code; should this be changed as well?
>
> Yes, please submit a patch for this too.
Like so. Tested on s390-ibm-linux and s390x-ibm-linux.
OK?
Bye,
Ulrich
ChangeLog:
* gnu/java/net/natPlainSocketImplPosix.cc
(gnu::java::net::PlainSocketImpl::available): Call FIONREAD ioctl
with 'int *' argument instead of 'long *'.
Index: libjava/gnu/java/net/natPlainSocketImplPosix.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/net/natPlainSocketImplPosix.cc,v
retrieving revision 1.9
diff -c -p -r1.9 natPlainSocketImplPosix.cc
*** libjava/gnu/java/net/natPlainSocketImplPosix.cc 11 May 2004 19:48:45 -0000 1.9
--- libjava/gnu/java/net/natPlainSocketImplPosix.cc 21 Oct 2004 23:38:51 -0000
*************** jint
*** 463,469 ****
gnu::java::net::PlainSocketImpl::available(void)
{
#if defined(FIONREAD) || defined(HAVE_SELECT)
! long num = 0;
int r = 0;
bool num_set = false;
--- 463,469 ----
gnu::java::net::PlainSocketImpl::available(void)
{
#if defined(FIONREAD) || defined(HAVE_SELECT)
! int num = 0;
int r = 0;
bool num_set = false;
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de