st_blocks incorrect for files larger than 2Gbytes
Wed Jul 26 10:58:00 GMT 2000
On Wed, Jul 26, 2000 at 01:50:17PM -0400, Chris Faylor wrote:
>On Wed, Jul 26, 2000 at 06:56:07PM +0400, Egor Duda wrote:
>>Wednesday, 26 July, 2000 DJ Delorie firstname.lastname@example.org wrote:
>>>> buf->st_blocks = (buf->st_size + S_BLKSIZE-1) / S_BLKSIZE;
>>>> which way is preferable?
>>DD>Casting buf->st_size to (unsigned long) before doing the math is.
>>DD>off_t is signed, but negative sizes are meaningless.
>>Wed Jul 26 14:32:38 2000 Egor Duda <email@example.com>
>> * syscalls.cc: Make stat return correct st_blocks for files
>> with size bigger than 2Gb and less than 4Gb
Btw, I applied this patch.
More information about the Cygwin-patches