Re: [fpc-devel] the libc unit on 64-bit systems

2008-02-01 Thread Graeme Geldenhuys
On 01/02/2008, peter green <[EMAIL PROTECTED]> wrote: > Really the only reliable way to get that information is to link with > libc. Reading the files in /etc will work on a basic system but will > fail if an alternate authentication system is in use. Yup, that's what somebody else told me as well

Re: [fpc-devel] the libc unit on 64-bit systems

2008-02-01 Thread peter green
All I really use 'libc' for is to retrieve the user name and group name from the user and group id's of files. As I said, it's not critical, I can always display the id's only. Or maybe parse the /etc/groups and /etc/passwd files to get the names, but I heard that's not very accurate for some

Re: [fpc-devel] the libc unit on 64-bit systems

2008-02-01 Thread Graeme Geldenhuys
On 31/01/2008, Daniël Mantione <[EMAIL PROTECTED]> wrote: > > > If so, how can I IFDEF code that needs to run on Linux (32 & 64 bit) > > {$if defined(linux) and defined(i386)} > Just to let you know Daniël, that doesn't work for Linux 32-bit systems, but the idea is correct. It should read. {$if

Re: [fpc-devel] the libc unit on 64-bit systems

2008-02-01 Thread Marco van de Voort
> Op Thu, 31 Jan 2008, schreef Graeme Geldenhuys: > > Wow you guys reply quickly. :) The above code doesn't look nice > > either, so I think I will rather implement a alternative. (Daniel's is better, I still have the habit to make 1.0.x compat defines, while not necessary anymore) > > All I rea

Re: [fpc-devel] the libc unit on 64-bit systems

2008-01-31 Thread Daniël Mantione
Op Thu, 31 Jan 2008, schreef Graeme Geldenhuys: On 31/01/2008, Marco van de Voort <[EMAIL PROTECTED]> wrote: Something like {$ifdef cpu386} {$ifdef linux} {$define linux386} {$endif} {$endif} Wow you guys reply quickly. :) The above code doesn't look nice either, so I think I will rathe

Re: [fpc-devel] the libc unit on 64-bit systems

2008-01-31 Thread Graeme Geldenhuys
On 31/01/2008, Marco van de Voort <[EMAIL PROTECTED]> wrote: > > Something like > > {$ifdef cpu386} > {$ifdef linux} > {$define linux386} > {$endif} > {$endif} Wow you guys reply quickly. :) The above code doesn't look nice either, so I think I will rather implement a alternative. All I really

Re: [fpc-devel] the libc unit on 64-bit systems

2008-01-31 Thread Daniël Mantione
Op Thu, 31 Jan 2008, schreef Graeme Geldenhuys: Hi, I know the 'libc' unit is for linux-x86 only. Does that also exclude 64-bit Linux? Correct. 64-bit safeness is one thing the Kylix libc unit was not designed for. If so, how can I IFDEF code that needs to run on Linux (32 & 64 bit)

Re: [fpc-devel] the libc unit on 64-bit systems

2008-01-31 Thread Marco van de Voort
> I know the 'libc' unit is for linux-x86 only. Does that also exclude > 64-bit Linux? Yes. > If so, how can I IFDEF code that needs to run on Linux (32 & 64 bit) > and FreeBSD (32 & 64 bit) when 'libc' only works on Linux and 32-bit > systems. Something like {$ifdef cpu386} {$ifdef linux} {$