[fpc-devel] Portability Standards

DrDiettrich drdiettrich at compuserve.de
Tue Jan 4 02:14:33 CET 2005

Tomas Hajny wrote:

> > {$ifndef unix}
> > {$i abiuwin.inc} // more to follow later: e.g. Mac OS, Netware etc.
> > {$else}
> > {$i abiulin.inc}
> > {$endif}
> There's at least one (IMHO not worse at least) alternative to that (already
> used in FPC itself among others) - keep the include file name the same, place
> it in separate directories for different targets (like UNIX, WIN32, etc.) and
> provide the right paths using a Makefile (see e.g. fcl/Makefile.fpc + Makefile
> in our source tree). The advantage of this approach is that you don't need any
> ifdefs at all (especially when there are more targets supported it could get
> somewhat messy).

A good idea - at least for FPC ;-)
For Delphi it does no harm to implement just the Windows specific part,
in a dedicated directory.

I only don't know how to implement or check the other branches - is the
Windows version of FPC equipped for crosscompilation?


More information about the fpc-devel mailing list