> 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}
{$define linux386}
{$endif}
{$endif}

>  Clearly this code smells, so I should actually find a
> alternative solution and get rid of libc altogether.

Yes, that's what baseunix and unix are ( and sockets,termio,syscalls etc).

It is not complete by far, but it is getting there. If I can get the "users"
package cleaned up, some more reasons to use unit libc disappear.

This also because mixing units can lead to problems since they are separate
collections of types.

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to