> I'm now getting to the 386 syscalls.  The following comment in the
> mkfile needs addressing.  Suggestions?

Change the loop to rename the generated assembly
stub __seek and treat it like any other system call
(no special code; just the name change).

Then add this C function:

        int _seek(vlong*, int, vlong, int);
        
        vlong
        seek(int fd, vlong off, int whence)
        {
                vlong ret;
                if(_seek(&ret, fd, off, whence) == -1)
                        return -1;
                return ret;
        }

You should never ask "how do I write this in assembly?"
You should ask "how do I *not* write this in assembly?"

Russ

P. S.  You might also change gcc not to prefix all the
C functions with underscores.  (I'm sure there's an option.)
Real systems gave that up a long time ago.

Reply via email to