This is the mail archive of the cygwin-patches@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: st_blocks incorrect for files larger than 2Gbytes


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 dj@delorie.com 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 <deo@logos-m.ru>
>>
>>        * syscalls.cc: Make stat return correct st_blocks for files
>>          with size bigger than 2Gb and less than 4Gb

Btw, I applied this patch.

cgf

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]