Mac OS上的错误TSTATFS记录已加载
我已经在Mac Macos Catalina上安装了FPC 3.2.2和Lazarus IDE v 2.2.2 10.15.7
我试图使用记录
{$if defined(cpuarm) or defined(cpuaarch64) or defined(iphonesim)}
{ structure used on iPhoneOS and available on Mac OS X 10.6 and later }
tstatfs = 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..(MFSNAMELEN)-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;
{$else}
tstatfs = record
otype : cint16;
oflags : cint16;
bsize : clong;
iosize : clong;
blocks : clong;
bfree : clong;
bavail : clong;
files : clong;
ffree : clong;
fsid : fsid_t;
fowner : uid_t;
reserved1 : cint16;
ftype : cint16;
fflags : clong;
reserved2 : array[0..1] of clong;
fstypename : array[0..(MFSNAMELEN)-1] of char;
mountpoint : array[0..(MNAMELEN)-1] of char;
mntfromname : array[0..(MNAMELEN)-1] of char;
f_reserved3: char;
reserved4: array[0..3] of clong;
end;
{$endif}
pstatfs = ^tstatfs;
,但是从{$ else}部分中加载了记录。
知道如何解决问题吗?
提前致谢 bojan
I have installed fpc 3.2.2 and Lazarus IDE v 2.2.2 on MAC macOS Catalina 10.15.7
I am trying to use record
{$if defined(cpuarm) or defined(cpuaarch64) or defined(iphonesim)}
{ structure used on iPhoneOS and available on Mac OS X 10.6 and later }
tstatfs = 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..(MFSNAMELEN)-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;
{$else}
tstatfs = record
otype : cint16;
oflags : cint16;
bsize : clong;
iosize : clong;
blocks : clong;
bfree : clong;
bavail : clong;
files : clong;
ffree : clong;
fsid : fsid_t;
fowner : uid_t;
reserved1 : cint16;
ftype : cint16;
fflags : clong;
reserved2 : array[0..1] of clong;
fstypename : array[0..(MFSNAMELEN)-1] of char;
mountpoint : array[0..(MNAMELEN)-1] of char;
mntfromname : array[0..(MNAMELEN)-1] of char;
f_reserved3: char;
reserved4: array[0..3] of clong;
end;
{$endif}
pstatfs = ^tstatfs;
but the record is loaded wrong, from the {$else} part.
Any idea how to solve the problem?
Thanks in advance
Bojan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论