[fpc-pascal] How to add new function related to MAC OS X
Jonas Maebe
jonas.maebe at elis.ugent.be
Sat May 23 11:58:20 CEST 2009
On 22 May 2009, at 12:36, Roland Turcan wrote:
> 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.
Such a function will never be added to the rtl. The fcntl function is
already there and you can use it. The only thing that can be added is
the F_FULLSYNC constant to some Darwin-specific include file. Its
value is 51, in case you want to add the constant declaration to one
of your own units.
Jonas
PS: note that you don't have F_FULLSYNC-like functionality on many
other OSes (there you always lose the data in case of a power failure
before the data has been flushed from the drive's internal caches),
and that it will significantly slow down your program if you don't
watch out. There was a whole controversy a few years back about MySQL
being dog slow on Mac OS X compared to on other OSes, and the reason
turned out to be their use of fcntl(F_FULLSYNC) (although it's of
course good practice from a data integrity point of view).
More information about the fpc-pascal
mailing list