[fpc-pascal] Please someone explain this to me

Marco van de Voort marcov at stack.nl
Wed Feb 10 22:50:40 CET 2016


In our previous episode, Tomas Hajny said:
> at platform level, sometimes it makes sense to use a common include file
> for a set of targets sharing a common set of characteristics (various MS
> Windows targets or Unix targets) in order to simplify the maintenance,
> etc. Trying to cover that in one common place would result in something
> completely unreadable and unmaintainable - actually much worse compared to
> the current situation.

Indeed, the include stuff is not a linear thing. Generic Unix includes
include (are parameterized) by target specific includes like the earlier
named ptypes.inc.

And then you get to the bit that the syscall targets are switchable to libc
etc.

The original design document for the *nix RTL (originally (c) dec 2002) already
had a section about why includefiles:

http://www.stack.nl/~marcov/unixrtl.pdf

One thing to particularly highlight: many *nix includefiles are used in the
/implementation/ of units below the baseunix unit level, while they only
  become public on the unixtype/baseunix level and below (see pic in above
doc)




More information about the fpc-pascal mailing list