Subject: Re: slight heads up: __syscall() prototype.
To: Chris G Demetriou <>
From: Chris G Demetriou <>
List: current-users
Date: 12/20/1996 20:34:11
> So, i added a __syscall() prototype to unistd.h (because that's where
> syscall() is), and, as described in the manual, it returns 'int'.
> lseek() casts that to off_t.  J.T. says that because of the calling
> conventions on the ports we currently support, that should "just
> work."
> However, i thought i'd give you all a heads-up about it.  If you see
> any weirdness with lseek() return values, please tell me about them...

So, after more extensive testing (after prodding from John F. Woods),
it turns out that since 64 bits of return value from __syscall() are
used, it does in fact need to be declared as returning quad_t (or
another 64-bit type).  This has been fixed, and you should never even
see the broken version.  8-)

As before, if you notice any new problems with lseek(), truncate(),
ftruncate(), or mmap() (the 4 syscalls that use __syscall()), please
get in touch with me ASAP.

Really, i think syscall() should have its return type changed to
quad_t, as well, since it returns data in exactly the same way...
However, it's not _necessary_, since none of the syscalls that would
be invoked via syscall() return a 64-bit argument, anyway.