OSDN Git Service

* fhandler.cc (fhandler_disk_file::fstat): Allow block calculation to succeed
authorcgf <cgf>
Thu, 27 Jul 2000 14:26:03 +0000 (14:26 +0000)
committercgf <cgf>
Thu, 27 Jul 2000 14:26:03 +0000 (14:26 +0000)
for files >= 2GB and <= 4GB.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler.cc

index ab42b75..fec3580 100644 (file)
@@ -1,3 +1,8 @@
+Thu Jul 27 10:24:36 2000  Egor Duda <deo@logos-m.ru>
+
+       * fhandler.cc (fhandler_disk_file::fstat): Allow block calculation to
+       succeed for files >= 2GB and <= 4GB.
+
 Wed Jul 26 16:05:04 2000  Christopher Faylor <cgf@cygnus.com>
 
        * exceptions.cc (signal_exit): Renamed from "really_exit".  Always sets
index 35da0d8..fc1451c 100644 (file)
@@ -946,7 +946,7 @@ fhandler_disk_file::fstat (struct stat *buf)
     }
 
   buf->st_blksize = S_BLKSIZE;
-  buf->st_blocks  = (buf->st_size + S_BLKSIZE-1) / S_BLKSIZE;
+  buf->st_blocks  = ((unsigned long) buf->st_size + S_BLKSIZE-1) / S_BLKSIZE;
 
   /* Using a side effect: get_file_attibutes checks for
      directory. This is used, to set S_ISVTX, if needed.  */