* gnu/java/nio/channels/natFileChannelPosix.cc
authorUlrich Weigand <uweigand@de.ibm.com>
Thu, 21 Oct 2004 18:21:00 +0000 (18:21 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Thu, 21 Oct 2004 18:21:00 +0000 (18:21 +0000)
(FileChannelImpl::available): Call FIONREAD ioctl with 'int *'
argument instead of 'long *'.

From-SVN: r89391

libjava/ChangeLog
libjava/gnu/java/nio/channels/natFileChannelPosix.cc

index 65ae5a1a5f0c6a1aa2534681bdbc6b42fafdff8d..3940353f2c7f53881a5ddc4c49df929eee9a3787 100644 (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
index a2c1c7962b0590f9449d8c1a34bc79387e090c96..edc843b903af7257e98cc325287a8ff80b632648 100644 (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;
        }
     }