Index: main/streams/streams.c =================================================================== RCS file: /repository/php-src/main/streams/streams.c,v retrieving revision 1.82.2.2 diff -u -p -d -r1.82.2.2 streams.c --- main/streams/streams.c 20 Dec 2005 09:47:57 -0000 1.82.2.2 +++ main/streams/streams.c 23 Dec 2005 12:30:16 -0000 @@ -442,7 +442,7 @@ static void php_stream_fill_read_buffer( /* read a chunk into a bucket */ justread = stream->ops->read(stream, chunk_buf, stream->chunk_size TSRMLS_CC); - if (justread > 0) { + if (justread != (size_t)-1) { bucket = php_stream_bucket_new(stream, chunk_buf, justread, 0, 0 TSRMLS_CC); /* after this call, bucket is owned by the brigade */ @@ -511,7 +511,7 @@ static void php_stream_fill_read_buffer( break; } - if (justread == 0) { + if (justread == 0 || justread == (size_t)-1) { break; } } Index: main/streams/plain_wrapper.c =================================================================== RCS file: /repository/php-src/main/streams/plain_wrapper.c,v retrieving revision 1.52.2.2 diff -u -p -d -r1.52.2.2 plain_wrapper.c --- main/streams/plain_wrapper.c 17 Nov 2005 14:19:40 -0000 1.52.2.2 +++ main/streams/plain_wrapper.c 23 Dec 2005 12:30:16 -0000 @@ -316,7 +316,7 @@ static size_t php_stdiop_read(php_stream if (data->fd >= 0) { ret = read(data->fd, buf, count); - stream->eof = (ret == 0 || (ret == -1 && errno != EWOULDBLOCK)); + stream->eof = (ret == 0 || (ret == (size_t)-1 && errno != EWOULDBLOCK)); } else { #if HAVE_FLUSHIO