> OS: FreeBSD 4.0
> I have a ported pascal compiler that doesn't work yet.
It does now work now, except for some minor details, and haven't worked on
libc linking yet. Am already subscribing to ports :-)
> I use ktrace (great tool btw) to find the problem, mainly because the differences
> between the linux and FreeBSD version are only in about 50 syscall calling
> routines.
>
> Now the program terminates with the following sequence, which makes me
> wonder.
>
> - A fstat (handle,buffer) with handle = 0x4 and buffer the right value.
> returns 0. (success). I checked, and the file does exist.
> - then a lseek on the same handle (0x4, so not overwritten by a dangling pointer ),
> returns -1 (I forgot the errno, but ktrace says bad filedescriptor)
I replaced lseek with the asm code of an objdumped libc program, and found
that libc calls lseek via syscall 198 (___syscall), and NOT 199. (lseek self)
This probably has to do with lseek returning 64-bits values, but I don't see the
exact humour here.
Can somebody explain this to me? (specially because I had to code a specific
assembler function for lseek this way, instead of using my generic interface
routines, which increases asm%)
Marco van de Voort ([EMAIL PROTECTED])
<http://www.stack.nl/~marcov/xtdlib.htm>
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message