From 590d07beadb3632a8944c6b97f6b6a7d914f9caa Mon Sep 17 00:00:00 2001 From: graemeg Date: Mon, 14 Jan 2008 11:09:25 +0000 Subject: * I wrapped libc unit and calls with IFDEF's so it should compile under FreeBSD now. --- src/gui/gui_grid.pas | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gui/gui_grid.pas b/src/gui/gui_grid.pas index 5be33147..a293a98b 100644 --- a/src/gui/gui_grid.pas +++ b/src/gui/gui_grid.pas @@ -220,7 +220,7 @@ uses ,Windows // Graeme: temporary, just to see how the grid looks under Windows. {$ENDIF} {$IFDEF UNIX} - ,libc // Graeme: temporary + {$IFDEF LINUX},libc{$ENDIF} // Graeme: temporary. libc is not available for FreeBSD. ,baseunix {$ENDIF} ; @@ -297,6 +297,7 @@ begin end; {$IFDEF UNIX} +{$IFDEF LINUX} function GetGroupName(gid: integer): string; var p: PGroup; @@ -305,7 +306,15 @@ begin if p <> nil then result := p^.gr_name; end; +{$ELSE} +// Still need to find a alternative as we can't use the libc unit. +function GetGroupName(gid: integer): string; +begin + result := IntToStr(gid); +end; +{$ENDIF} +{$IFDEF LINUX} function GetUserName(uid: integer): string; var p: PPasswd; @@ -316,7 +325,13 @@ begin else result := ''; end; -{$ENDIF} +{$ELSE} +function GetUserName(uid: integer): string; +begin + result := IntToStr(uid); +end; +{$ENDIF LINUX} +{$ENDIF UNIX} { TFileEntry } -- cgit v1.2.3-70-g09d2