On Wed, Aug 01, 2001 at 10:29:39PM -0500, Jim Bryant wrote:
> Kent, my point is that the manual page should specify this. I think
> that's the point the original poster was trying to make once he was
> told.
Well, either of you two submit a diff to the manpage and I'll commit it.
It really isn't
In message <00b201c11af3$4fef1c10$0a2d2d0a@battleship> "Joseph Gleason" writes:
: In FreeBSD, how can I determine the size of a file in C++ when the file is
: greater than 4gb?
stat(2).
Warner
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the m
Chirag Kantharia wrote:
>
> On Wed, Aug 01, 2001 at 11:25:40PM -0700, Terry Lambert wrote:
> | Uh, st_size is an off_t, which is a signed 64 bit value,
> | not an unsigned 32 bit vale...
>
> why should it be `signed' 64 bit and not unsigned?
Return value for lseek is off_t. -1 indicates error
Chirag Kantharia wrote:
| On Wed, Aug 01, 2001 at 11:25:40PM -0700, Terry Lambert wrote:
| | Uh, st_size is an off_t, which is a signed 64 bit value,
| | not an unsigned 32 bit vale...
|
| why should it be `signed' 64 bit and not unsigned?
So that things like lseek(2) can return -1 as an error
On Wed, Aug 01, 2001 at 11:25:40PM -0700, Terry Lambert wrote:
| Uh, st_size is an off_t, which is a signed 64 bit value,
| not an unsigned 32 bit vale...
why should it be `signed' 64 bit and not unsigned?
chyrag.
--
Chirag Kantharia, slashetc.net/chyrag/
To Unsubscribe: send mail to [EMAIL
Joseph Gleason wrote:
> Alright, I made a mistake. But I did read the man page. Where does it say
> off_t is 64bits?
The same place it says char is 8 bits, short is 16 bits, and int
and long are 32 bits: in your assumptions.
It might be useful (for some definitions of "useful") to have a
man p
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 va
On Wed, Aug 01, 2001 at 10:31:22PM -0400, Joseph Gleason wrote:
> Alright, I made a mistake. But I did read the man page. Where does it say
> off_t is 64bits?
>
> My mistake was not digging through the include files enough to see what was
> going on.
off_t st_size; /
t;; <[EMAIL PROTECTED]>
> > > Sent: Wednesday, August 01, 2001 21:45
> > > Subject: Re: Finding filesizes in C++ for files greater than 4gb
> > >
> > > > On Wed, Aug 01, 2001 at 09:34:43PM -0400, Joseph Gleason wrote:
> > > >
> > > > >
Jim Bryant wrote:
>
> Joseph Gleason wrote:
> >
> > - Original Message -
> > From: "Alex Zepeda" <[EMAIL PROTECTED]>
> > To: "Joseph Gleason" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Wednesday, August
Joseph Gleason wrote:
>
> - Original Message -
> From: "Alex Zepeda" <[EMAIL PROTECTED]>
> To: "Joseph Gleason" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, August 01, 2001 21:45
> Subject: Re: Finding filesizes in C+
> :Alright, I made a mistake. But I did read the man page. Where does it
say
> :off_t is 64bits?
> :
> :My mistake was not digging through the include files enough to see what
was
> :going on.
> :
>
> The types(5) manpage will tell you this.
>
Ahh, thank you. I was not aware that existed.
On Wed, 1 Aug 2001, Joseph Gleason wrote:
:
:- Original Message -
:From: "Alex Zepeda" <[EMAIL PROTECTED]>
:> On Wed, Aug 01, 2001 at 09:34:43PM -0400, Joseph Gleason wrote:
:>
:> > In FreeBSD, how can I determine the size of a file in C++ when the file
:is
:> > greater than 4gb?
:> >
:>
- Original Message -
From: "Alex Zepeda" <[EMAIL PROTECTED]>
To: "Joseph Gleason" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, August 01, 2001 21:45
Subject: Re: Finding filesizes in C++ for files greater than 4gb
> On Wed, Aug 01,
On Wed, Aug 01, 2001 at 09:34:43PM -0400, 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)
You're wrong. Read the man page. No soup
On 02-Aug-2001 Joseph Gleason wrote:
> Currently, I use stat() and use st_size. That is limited to 4gb (32bit
> unsigned int)
>
> I could use st_blocks, but that wouldn't give me the exact size.
>
> (st_blocks -1) * 512 + (st_size % 512)
>
> This would make sense, but in tests st_bloc
On 02-Aug-01 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)
struct stat {
...
off_t st_size; /* fi
* 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
18 matches
Mail list logo