Date: Wed, 01 Aug 2001 23:45:25 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Chirag Kantharia <chyrag@yahoo.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Finding filesizes in C++ for files greater than 4gb Message-ID: <3B68F705.9815A930@mindspring.com> References: <00b201c11af3$4fef1c10$0a2d2d0a@battleship> <3B68F264.BC1FEE21@mindspring.com> <20010802115844.A29064@epigonaudio.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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... > > <going off-topic> why should it be `signed' 64 bit and not unsigned? Return value for lseek is off_t. -1 indicates error, therefore the sign bit is reserved. This is a historical UNIX-ism, having to do with functions not taking the addresses of their return values as parameters, so that the actual return value could be a pure success/failure code (e.g. like VMS, where you will get SYS$SUCCESS on success, and the actual error code on an error -- this also does away with the need for an errno, which has historically been a huge pain, particularly in threaded programs). -- 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?3B68F705.9815A930>