On May 5, 2:00 pm, Robert Spykerman <robert.spyker...@[EMAIL PROTECTED]
>
wrote:
<SNIP>
> The test suite has uncovered at least one problem with CREATE-FILE.
> (Wow, that test suite is pretty rigorous).
>
> I will be checking this out. No doubt this is related to syscalls. Oh
> what fun :)
Yep, syscalls. What fun.
OSX does not have creat anymore. So I've added functionality via the
open syscall. This appears to work now. Will test more.
Also, the open syscall behaves slightly differently on OSX cmp linux.
For example, if you try and open a non-existent file on linux you get
a negative return (error). On osx, you get a 2 returned in EAX when
you open a non-existent file or if you try and open a directory. I
assume it means stderr. Any file that exists appears to get a fid >=
4.
Now of course, one could add some extra cheat logic to cope for the
difference, like I did for the fork syscall. This however means less
genericity in the syscall words, as each substantially different
syscall will have to have a word of its own.
Alternatively have a jumptable in just one word ie XOS which will
dispatch the syscall to its appropriate patch within just to mantain
lina compatibility (ie so the forth.lab syscalls don't break).
It sure looks like the only way to get consistency here may be
ultimately to call c and abandon syscalls altogether. Linux may be
consistent with linux, but OS X and linux.... OS X is certaintly
turning out to be quite the black box at syscall level and I have been
warned by a guy at apple not to do this. hmmm....
I'll stick at this for a while, but I'll aim to link to c down the
line. From what I know the big *nix forths, gforth, iForth (I think -
have't got a copy yet) and VFX link to c libs.
Robert Spykerman


|