[fpc-pascal] fpMMap and FreeBSD
Marco van de Voort
marcov at stack.nl
Sun Apr 24 21:14:16 CEST 2005
> I try to use fpMMap function to access file data under FreeBSD 5.3-RELEASE
> with fpc-1.9.8. But code from examle
> (http://www.freepascal.org/docs-html/rtl/baseunix/fpmmap.html) not working.
Fixed in CVS.
Turned out mmap called via __syscall needs an extra parameter that must be 0 (?),
due to stack layout the filedescriptor got passed in this space, which is ok for
memory mapping of memory, but not for this example.
There is not much one can easily do in 1.9.8 to get it to work easily, since
the 9 param do_syscall call doesn't exist either.
If you can't/won't use CVS, I could see if I can make a quick mock unit with
a working mmap in it for 1.9.8.
More information about the fpc-pascal