[fpc-pascal] libc unit and FreeBSD
Daniël Mantione
daniel.mantione at freepascal.org
Mon Jan 14 08:31:45 CET 2008
Op Mon, 14 Jan 2008, schreef Graeme Geldenhuys:
> Hi,
>
> As far as I understand the 'libc' unit is a compatibility unit from
> the Kylix days and is only meant for linux/x86, so isn't portable.
>
> I'm trying to get fpGUI working under FreeBSD but hit a snag in my
> File Grid component. The File Grid component displays a directory in a
> grid (think File Dialog here) and shows the file permissions, file
> group name and file user name. The code to get the group name and
> user name uses methods & types from the libc unit, so I'm not able to
> compile it under FreeBSD.
>
> Anybody know if there is a generic set of methods that supports all
> (or most) unix style OS's? I looked in 'baseunix', but there the
> group and name methods relate to a process id's, not to file
> attributes...
You hit an area that is problematic to implement without libc. Libc has
plugins (libnss*) so user data can be stored in files in /etc, yellow
pages, databases, ldap, windows servers, and so on.
The only thing we could do to it without libc and without rewriting all
those plugins is to load the nss plugins from Pascal. However, this would
be Linux specific code, other Unixes likely need a different
implementation.
Daniël
More information about the fpc-pascal
mailing list