[fpc-devel] Publish some of FPC's internal cross-platform functionality
anton.txt at gmail.com
Mon Mar 11 15:12:30 CET 2019
Sven Barth to Anton Shepelev:
>>Since we already have cross-platform functions FileRead
>>and FileWrite, would not it be useful to have them set the
>>InOutRes variable, or to publish a facility for converting
>>the value of GetLastOSError into an InOutRes value?
>The usage of InOutRes is only defined for the Pascal style
>file I/O (Read/Write).
Thanks for the correction. My second propostion, however,
still holds. Writers of drivers for this Pascal-style I/O
interface should have the ability to convert OS-specific
error codes into InOurRes values, which are not even
Notice also that FreePascal's TextRec handling is
incompatible with that of Delphi. The TextRec operations
OpenFunc, InOutFunc, FlushFunc, and CloseFunc return a
longint, which Delphi interprets as the result code but
FreePascal ignores. Therefore, I must set InOutRes in
FreePascal and return the error in Delphi.
Please, do not forward replies to the list to my e-mail.
More information about the fpc-devel