From d6402c7761d7ce5e24a425162331e5ed89410b41 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 8 Apr 2010 22:27:48 +0200 Subject: X11: temporary change to allow compiling under Mac OS - experimental --- src/corelib/x11/fpg_x11.pas | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2