[lazarus] Clean build from nothing

Michael Van Canneyt michael.vancanneyt at wisa.be
Wed Jun 25 02:56:14 EDT 2003




On Tue, 24 Jun 2003 cryst at golden.net wrote:

>
> > And have to update each time the libc interface somehow changes ? No thanks
> > ! It can usually be hidden for C programmers with some macro tricks, but
> > not for FPC. Not to mention that there may be differences between various
> > platforms... (irresistably, I am forced to think of MS Windows ;-) )
>
> Doesn't fpc support ifdef?

Of course it does.

> I can see your point, except if all you support are
> system calls, you will need to support each different system's calls. If you
> support a libraries interface then that interface doesn't change for the
> major functions. (strcpy hasn't changed for years!)

The 'C declaration' not really, no, but often you see things like

extern char * __strcpy() etc etc
#define strcpy __strcpy

which means that the REAL entry point into the library is __strcpy.
The C programmer does not 'see' this, but an external pascal program
does... and you can give a lot of examples where this is so.

> As a matter of fact one
> of the libraries jobs is to hide the differences between the different
> operating systems.

This is theoretically so, and that is why FPC tries to define a
cross-platform RTL interface.

In practice, however, many libraries are horribly system dependent.

This is why GNU tools as ./configure and automake and the like exist.

>
> > In fact, to be able to compile Kylix programs, I am now converting the C
> > library headers to a unit. So you will have the full power of the C library
> > at your disposal if you so desire...
>
> I can't think of an immediate use, but I'm sure it will come in handy.

If you can't think of a use for the C library, then why do you ask us to
use it ? ;-)

Michael.






More information about the Lazarus mailing list