natPlainSocketImplPosix.cc (read_helper): Handle count == 0 case.

2005-03-15  David Daney  <ddaney@avtrex.com>

	* gnu/java/net/natPlainSocketImplPosix.cc (read_helper): Handle
	count == 0 case.

2005-03-15  David Daney  <ddaney@avtrex.com>

	* java/io/BufferedInputStream.java (available): Use 'in' instead
	of 'super' for underlying stream access.
	(close): Ditto.
	(read(byte[], int, int)): Ditto.
	(refill): Ditto.
	(skip): Call skip on underlying stream when possible.

From-SVN: r96516
This commit is contained in:
David Daney 2005-03-15 16:46:51 +00:00 committed by David Daney
parent 4f51c6e7ca
commit 6dcd18b9aa
3 changed files with 36 additions and 7 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2003, 2004 Free Software Foundation
/* Copyright (C) 2003, 2004, 2005 Free Software Foundation
This file is part of libgcj.
@ -405,6 +405,11 @@ gnu::java::net::PlainSocketImpl$SocketInputStream::read(jbyteArray buffer, jint
static jint
read_helper (jint native_fd, jint timeout, jbyte *bytes, jint count)
{
// If zero bytes were requested, short circuit so that recv
// doesn't signal EOF.
if (count == 0)
return 0;
// Do timeouts via select.
if (timeout > 0 && native_fd >= 0 && native_fd < FD_SETSIZE)
{