mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: refactoring Statfs Fix from uMyDarwin to uDarwinIO
This commit is contained in:
parent
ec2bf46f7f
commit
8c5274e6ff
2 changed files with 39 additions and 36 deletions
|
|
@ -16,9 +16,46 @@ unit uDarwinIO;
|
|||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
Classes, SysUtils, UnixType,
|
||||
MacOSAll, CocoaAll, CocoaUtils,
|
||||
uMyDarwin, uDarwinFileUtil, uLog;
|
||||
uDarwinFileUtil, uLog;
|
||||
|
||||
// Workarounds for FPC RTL Bug
|
||||
// copied from ptypes.inc and modified fstypename only
|
||||
{$if defined(cpuarm) or defined(cpuaarch64) or defined(iphonesim)}
|
||||
{ structure used on iPhoneOS and available on Mac OS X 10.6 and later }
|
||||
|
||||
const MFSTYPENAMELEN = 16;
|
||||
|
||||
type
|
||||
|
||||
TDarwinAarch64Statfs = record
|
||||
bsize : cuint32;
|
||||
iosize : cint32;
|
||||
blocks : cuint64;
|
||||
bfree : cuint64;
|
||||
bavail : cuint64;
|
||||
files : cuint64;
|
||||
ffree : cuint64;
|
||||
fsid : fsid_t;
|
||||
owner : uid_t;
|
||||
ftype : cuint32;
|
||||
fflags : cuint32;
|
||||
fssubtype : cuint32;
|
||||
fstypename : array[0..(MFSTYPENAMELEN)-1] of char;
|
||||
mountpoint : array[0..(PATH_MAX)-1] of char;
|
||||
mntfromname : array[0..(PATH_MAX)-1] of char;
|
||||
reserved: array[0..7] of cuint32;
|
||||
end;
|
||||
|
||||
type TDarwinStatfs = TDarwinAarch64Statfs;
|
||||
|
||||
{$else}
|
||||
|
||||
type TDarwinStatfs = TStatFs;
|
||||
|
||||
{$endif}
|
||||
|
||||
|
||||
type
|
||||
io_object_t = mach_port_t;
|
||||
|
|
|
|||
|
|
@ -46,40 +46,6 @@ const
|
|||
|
||||
procedure onMainMenuCreate( menu: NSMenu );
|
||||
|
||||
// Workarounds for FPC RTL Bug
|
||||
// copied from ptypes.inc and modified fstypename only
|
||||
{$if defined(cpuarm) or defined(cpuaarch64) or defined(iphonesim)}
|
||||
{ structure used on iPhoneOS and available on Mac OS X 10.6 and later }
|
||||
|
||||
const MFSTYPENAMELEN = 16;
|
||||
|
||||
type TDarwinAarch64Statfs = record
|
||||
bsize : cuint32;
|
||||
iosize : cint32;
|
||||
blocks : cuint64;
|
||||
bfree : cuint64;
|
||||
bavail : cuint64;
|
||||
files : cuint64;
|
||||
ffree : cuint64;
|
||||
fsid : fsid_t;
|
||||
owner : uid_t;
|
||||
ftype : cuint32;
|
||||
fflags : cuint32;
|
||||
fssubtype : cuint32;
|
||||
fstypename : array[0..(MFSTYPENAMELEN)-1] of char;
|
||||
mountpoint : array[0..(PATH_MAX)-1] of char;
|
||||
mntfromname : array[0..(PATH_MAX)-1] of char;
|
||||
reserved: array[0..7] of cuint32;
|
||||
end;
|
||||
|
||||
type TDarwinStatfs = TDarwinAarch64Statfs;
|
||||
|
||||
{$else}
|
||||
|
||||
type TDarwinStatfs = TStatFs;
|
||||
|
||||
{$endif}
|
||||
|
||||
type
|
||||
|
||||
{ TMacosServiceMenuHelper }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue