Mac OS上的错误TSTATFS记录已加载

发布于 2025-02-12 14:03:51 字数 1540 浏览 0 评论 0原文

我已经在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文