[lazarus] Clean build from nothing

Marco van de Voort marcov at stack.nl
Wed Jun 25 05:39:53 EDT 2003


> > 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? I can see your point, except if all you support
> are system calls, you will need to support each different system's calls.

In practice, you will have to for libc too. Not all libc's are alike. And in
practice, most syscalls are quite universal.

The only that differ are the ones that have 64-bit arguments and
returnvalues. This is minutes work.

And opendir/readdir/closedir, since they have a large userland
portion for speed. (iow, the kernel call getdents/getdirentries is much moer
lowlevel than the libc opendir/readdir/closedir. This is an exception
though). This is something more involved.

> If you support a libraries interface then that interface doesn't change
> for the major functions. (strcpy hasn't changed for years!) 

We are talking about OS functionality of libc. strcpy is not interesting for
us, since that is part of the C handling, which we don't even need. And
btw, it is prefered to use a bounded version nowadays.

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

Don't forget that I can't access the library in the way it is meant to be,
because I can't access headers. So the part of this hiding that is done
via headers is already lost.
 






More information about the Lazarus mailing list