[fpc-devel] Publish some of FPC's internal cross-platform functionality
Anton Shepelev
anton.txt at gmail.com
Sat Mar 9 18:09:28 CET 2019
Hello, all
FreePascal has many low-level cross-platform functions
scattered over multiple .inc files but not consolilated into
reusable cross-platform units. Consider, for example, the
functions
function do_read (h: longint; addr: pointer; len: longint) : longint;
function do_write(h: longint; addr: pointer; len: longint) : longint;
implemented in sysfile.inc for Unix, Winows, Mac OS, MS-DOS,
and other operatring systems. Wouldn't it be useful to
publish them in a unit sysfile.pp, possibly along with a
facility to translate the OS-specific error codes into a
general enumeration?
It would relieve the programmer of writing conditionally
compiled OS-specific code sections for such basic operations
as are already implemented in FreePascal's internals. I,
for example, have to do it whenever my Windws/Unix program
works with a file handle.
--
Please, do not forward replies to my e-mail.
More information about the fpc-devel
mailing list