[fpc-pascal] libc unit and FreeBSD

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Jan 14 12:03:15 CET 2008


Hi,

For now I wrapped the libc calls with $IFDEF LINUX and for other unix
variants I simply return the Group ID and User ID (instead of the more
friend names).

A quick work-around for me would be to read the /etc/groups and
/etc/passwd files looking for the Group ID or User ID and return the
associated names.  I can parse and keep a copy of those files in
memory while the File Dialog is open - than way it should speed up the
lookups as the user browses through directories.

Does anybody know if unix type OS's allow normal (general) users to
read those files from /etc?
Under Linux it's allowed. I'll have to wait until I'm home to check if
FreeBSD allows that.

Other than the above, fpGUI doesn't use any other libc calls, so
hopefully tonight I'll can confirm if FreeBSD is a newly supported OS.
 :)


Regards,
  - Graeme -


On 14/01/2008, Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:
> On 14/01/2008, Daniƫl Mantione <daniel.mantione at freepascal.org> wrote:
> > > 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
>
>
> My alternative is then to maybe drop the idea of showing Permisions,
> GroupName and UserName in the file dialogs.  I did a quick look and
> GTK2 and Qt based applications that use File Dialogs don't show that
> information either. GTK1 being the exception.  So I guess it wouldn't
> be too bad.
>
> For interest sake, I'm going to download the GTK1 source to see what
> they did to get around the issue under different unix type OS's.
> Except it they did like you said and used libc plugins under FreeBSD +
> GTK1 (I honestly don't know that much about libc)?
>
>
> Regards,
>   - Graeme -
>
>
> _______________________________________________
> fpGUI - a cross-platform Free Pascal GUI toolkit
> http://opensoft.homeip.net/fpgui/
>



More information about the fpc-pascal mailing list