Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fwd: Problem with SQLite 3.7.6



On Mon, Apr 18, 2011 at 11:35:26PM +0200, Alan Barrett wrote:
> However, the actual <fcntl.h> header declares open the varargs way:
> 
>     int     open(const char *, int, ...);

Which is actually bogus!
The system call stubs for open() and ioctl() assume the
non-varargs argument passing.
This is largely because (esp. for ioctl) the kernel has no was of
knowing the type of the 3rd argument.
Fortunately, on all current systems, it happens to work!
(On all 64bit systems the 3rd arg is always in a register.)

There are systems where the argument passing for varargs and non-varargs
functions differs enough to make it almost impossible to generate
the required syscall stubs for ioctl() and open().

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index