summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-01-14 11:09:25 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-01-14 11:09:25 +0000
commit590d07beadb3632a8944c6b97f6b6a7d914f9caa (patch)
tree2cc8ec26c85ed4fe2106b5532b90fa705ec7ce8a /src
parentb0219eb7cb90e11a92ec8974e3a9e971c0e0a61b (diff)
downloadfpGUI-590d07beadb3632a8944c6b97f6b6a7d914f9caa.tar.xz
* I wrapped libc unit and calls with IFDEF's so it should compile under FreeBSD now.
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui_grid.pas19
1 files changed, 17 insertions, 2 deletions
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 }