summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@graemeg-laptop.(none)>2010-04-08 22:27:48 +0200
committerGraeme Geldenhuys <graemeg@graemeg-laptop.(none)>2010-04-08 22:27:48 +0200
commitd6402c7761d7ce5e24a425162331e5ed89410b41 (patch)
treebc0e70f26cd484641fa91be67c883949419034cb /src/corelib
parentcc7099de23db14863d28c434162d1da18b53a969 (diff)
downloadfpGUI-d6402c7761d7ce5e24a425162331e5ed89410b41.tar.xz
X11: temporary change to allow compiling under Mac OS - experimental
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/x11/fpg_x11.pas10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas
index 30aab57c..e4fc088a 100644
--- a/src/corelib/x11/fpg_x11.pas
+++ b/src/corelib/x11/fpg_x11.pas
@@ -302,7 +302,9 @@ implementation
uses
baseunix,
- users, { for *nix user and group name support }
+ {$IFNDEF DARWIN}
+ users, { For unix user and group name support. Mac+X11 doesn't like this }
+ {$ENDIF}
fpg_main,
fpg_widget,
fpg_popupwindow,
@@ -2406,6 +2408,7 @@ begin
// Especially if files are transfered on removable media the host system
// might not have those user or group ids. So name lookups will fail. This
// simply returns the ID's in such cases.
+ {$IFNDEF DARWIN}
try
Result.Owner := GetUserName(TUID(info.st_uid));
except
@@ -2416,6 +2419,11 @@ begin
except
Result.Group := IntToStr(info.st_gid);
end;
+ {$ELSE}
+ // Darwin (Mac-OS) can't seem to use users.pp unit from FPC. A bug in FPC?
+ Result.Owner := IntToStr(info.st_uid);
+ Result.Group := IntToStr(info.st_gid);
+ {$ENDIF}
end;
end;