Re: [fpc-pascal] libc unit and FreeBSD

2008-01-14 Thread Marco van de Voort
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... Baseunix and Unix should be implementable without libc for maximal portability. But,

Re: [fpc-pascal] libc unit and FreeBSD

2008-01-14 Thread Michael Van Canneyt
On Mon, 14 Jan 2008, Marco van de Voort 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... Baseunix and Unix should be

Re: [fpc-pascal] libc unit and FreeBSD

2008-01-14 Thread Graeme Geldenhuys
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

Re: [fpc-pascal] libc unit and FreeBSD

2008-01-14 Thread Marc Santhoff
Am Montag, den 14.01.2008, 09:23 +0200 schrieb Graeme Geldenhuys: The offending code is as follows... function GetGroupName(gid: integer): string; var p: PGroup; begin p := getgrgid(gid); if p nil then result := p^.gr_name; end; function GetUserName(uid: integer): string;

Re: [fpc-pascal] libc unit and FreeBSD

2008-01-14 Thread Jonas Maebe
On 14 Jan 2008, at 12:03, Graeme Geldenhuys wrote: 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

Re: [fpc-pascal] libc unit and FreeBSD

2008-01-14 Thread Graeme Geldenhuys
On 14/01/2008, Jonas Maebe [EMAIL PROTECTED] wrote: Does anybody know if unix type OS's allow normal (general) users to read those files from /etc? Yes, but they they do not necessarily contain any useful information. The actually used information may be on an ldap server, in a netinfo

[fpc-pascal] libc unit and FreeBSD

2008-01-13 Thread 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

Re: [fpc-pascal] libc unit and FreeBSD

2008-01-13 Thread Daniël Mantione
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

Re: [fpc-pascal] libc unit and FreeBSD

2008-01-13 Thread Graeme Geldenhuys
On 14/01/2008, Daniël Mantione [EMAIL PROTECTED] 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