Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Aug 2001 23:25:40 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Joseph Gleason <clash@tasam.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Finding filesizes in C++ for files greater than 4gb
Message-ID:  <3B68F264.BC1FEE21@mindspring.com>
References:  <00b201c11af3$4fef1c10$0a2d2d0a@battleship>

next in thread | previous in thread | raw e-mail | index | archive | help
Joseph Gleason wrote:
> 
> In FreeBSD, how can I determine the size of a file in C++ when the file is
> greater than 4gb?
> 
> Currently, I use stat() and use st_size.  That is limited to 4gb (32bit
> unsigned int)

Uh, st_size is an off_t, which is a signed 64 bit value,
not an unsigned 32 bit vale...

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B68F264.BC1FEE21>