From 9df85af6e12f28ca97df403f981728cf60fc3249 Mon Sep 17 00:00:00 2001 From: graemeg Date: Fri, 1 Feb 2008 09:10:03 +0000 Subject: * Fixed the IFDEF so that the libc unit is only included for Linux/x86 32-bit systems. FreeBSD and Linux/x86 64-bit can't use libc. --- src/gui/gui_grid.pas | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui') diff --git a/src/gui/gui_grid.pas b/src/gui/gui_grid.pas index 4ae2a08d..36b71b06 100644 --- a/src/gui/gui_grid.pas +++ b/src/gui/gui_grid.pas @@ -222,7 +222,7 @@ uses ,Windows // Graeme: temporary, just to see how the grid looks under Windows. {$ENDIF} {$IFDEF UNIX} - {$IFDEF LINUX},libc{$ENDIF} // Graeme: temporary. libc is not available for FreeBSD. + {$if defined(linux) and defined(cpu386)},libc{$endif} // Graeme: temporary. libc is not available for FreeBSD. ,baseunix {$ENDIF} ; @@ -299,7 +299,7 @@ begin end; {$IFDEF UNIX} -{$IFDEF LINUX} +{$if defined(linux) and defined(cpu386)} function GetGroupName(gid: integer): string; var p: PGroup; @@ -308,15 +308,15 @@ begin if p <> nil then result := p^.gr_name; end; -{$ELSE} +{$else} // Still need to find an alternative for FreeBSD as we can't use the libc unit. function GetGroupName(gid: integer): string; begin result := IntToStr(gid); end; -{$ENDIF} +{$endif} -{$IFDEF LINUX} +{$if defined(linux) and defined(cpu386)} function GetUserName(uid: integer): string; var p: PPasswd; @@ -327,13 +327,13 @@ begin else result := ''; end; -{$ELSE} +{$else} // Still need to find an alternative for FreeBSD as we can't use the libc unit. function GetUserName(uid: integer): string; begin result := IntToStr(uid); end; -{$ENDIF LINUX} +{$endif} {$ENDIF UNIX} -- cgit v1.2.3-70-g09d2