* Joseph Gleason <[EMAIL PROTECTED]> [010801 20:35] 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)

No it's not:

     struct stat {
         dev_t     st_dev;               /* inode's device */
...
         off_t     st_size;              /* file size, in bytes */

off_t is 64 bits under FreeBSD.

A bunch of other unix systems have alternate system calls to get
64bit attributes for files.

-- 
-Alfred Perlstein [[EMAIL PROTECTED]]
Ok, who wrote this damn function called '??'?
And why do my programs keep crashing in it?

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to