[fpc-pascal] the libc unit (again)

Giuliano Colla giuliano.colla at fastwebnet.it
Sat Feb 23 13:26:36 CET 2008

Marco van de Voort ha scritto:
>>> Hello,
>>> I find more and more units and components (for Lazarus) that are using
>>> the libc unit. I find it really problematic, because it doesn't exists
>>> for all platforms and architectures, so why not markring the unit as
>>> obsolete for the next FPC release so other developers will have to
>>> work with more flexible units ?
>> Other users will start to submit bug reports that there is no Libc unit.
>> We clearly state that libc is only for compatibility and not for portability. The same is with the
>> old TP7 units.
> We could mark all functions in libc with deprecated. The questions keep
> coming back. Harsh, but IMHO the only sane way.

What would be of great help is concise guide on how migrate of the libc 
functionalities (a wiki page?). I'm porting to fpc Kylix projects which 
used libc. Reading this mailing list I realized that libc wasn't the way 
to go, but I had a hell of a time to discover the equivalents, scattered 
in SysUtils, Unix, UnixUtils,BaseUnix, sometimes with different names, 
different parameters, etc.

Sort of:
libc.getenv -> SysUtils.GetEnvironmentVariable

Someone with a good knowledge of fpc should be able to do it in a short 


Giuliano Colla

Whenever people agree with me, I always feel I must be wrong (O. Wilde)

More information about the fpc-pascal mailing list