* gnu/java/nio/channels/natFileChannelPosix.cc

(FileChannelImpl::available): Call FIONREAD ioctl with 'int *'
	argument instead of 'long *'.

From-SVN: r89391
This commit is contained in:
Ulrich Weigand 2004-10-21 18:21:00 +00:00 committed by Ulrich Weigand
parent ac746f1dbb
commit b228bf7fd2
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2004-10-21 Ulrich Weigand <uweigand@de.ibm.com>
* gnu/java/nio/channels/natFileChannelPosix.cc
(FileChannelImpl::available): Call FIONREAD ioctl with 'int *'
argument instead of 'long *'.
2004-10-21 Tom Tromey <tromey@redhat.com>
* java/util/ResourceBundle.java (tryBundle): Also ignore

View File

@ -380,7 +380,7 @@ jint
FileChannelImpl::available (void)
{
#if defined (FIONREAD) || defined (HAVE_SELECT) || defined (HAVE_FSTAT)
long num = 0;
int num = 0;
int r = 0;
bool num_set = false;
@ -423,7 +423,7 @@ FileChannelImpl::available (void)
&& S_ISREG (sb.st_mode)
&& (where = lseek (fd, 0, SEEK_CUR)) != (off_t) -1)
{
num = (long) (sb.st_size - where);
num = (int) (sb.st_size - where);
num_set = true;
}
}