[fpc-pascal] How to add new function related to MAC OS X
Marco van de Voort
marcov at stack.nl
Fri May 22 13:45:53 CEST 2009
In our previous episode, Roland Turcan said:
> I want to add new function for Mac OS X which calls FCNTL with
> F_FULLSYNC to the existing source tree, but I am really confused from
> the files to be changed/added. I see that there are many include files which
> declare functions for Mac OS X, but they come from *BSD directories. I
> know, that it is because of compatibility with *BSD, but the interface
> comes from BSD dir and implementation from FreeBSD dir.
The BSD dir contains the common part of the *BSD rtls + OS X. The Unix dir
contains all stuff common to all unices. The inc and objpas dirs contain
files common to all platforms.
Directories with an OS name (Darwin,FreeBSD) are for that specific target.
OS X stuff is in Darwin.
Maybe some of the confusion comes from the fact that Darwin is a strictly
libc port, while FreeBSD and Linux are dual ports (syscalls or libc, with
syscall as default)
> I want to use SysCall unit which is located in /rtl/unix, but it
> cannot find it. When I use Unix unit I have not problem. But they are
> in the same directory?!
It does not exist for OS X. The Mac OS X maintainer only supports the libc
interface, the headers of which are mostly the "c" and "cdecl" inc files in
unix/.
As far as I know the OS X syscall interface is nearly the same as FreeBSD's
for the base set.
More information about the fpc-pascal
mailing list