[fpc-pascal] FlushBuffers of FileStream

Marco van de Voort marcov at stack.nl
Thu Apr 30 14:59:29 CEST 2009

In our previous episode, Roland Turcan said:
[ Charset windows-1250 unsupported, converting... ]
> Hello FPC-Pascal users discussions!
> I have used this Delphi/Kylix3 this code for flushing of buffers in my
> own stream descendant
> {$IFDEF WIN32}
>   FlushFileBuffers (Handle);
> {$ELSE}
>   fdatasync (Handle);
> {$ENDIF}
> I have found in linux.pp calling of fdatesync, but ...
> How to flush buffers in Mac OS X?

baseunix.Fpfsync .

fdatasync is just a newer "lighter" version of that, but not unices support
it yet. FreeBSD doesn't have it either, which is why it is in the OS
specific unit Linux.

More information about the fpc-pascal mailing list