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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to