stat.inc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 1999-2004 by Jonas Maebe,
  4. member of the Free Pascal development team.
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {$ifndef FPC_USE_LIBC} // kernel record
  12. stat = packed record // No unix typing because of differences
  13. case byte of
  14. 0:
  15. (dev,
  16. ino,
  17. nlink : qword deprecated;
  18. mode,
  19. uid,
  20. gid,
  21. __pad0 : cardinal deprecated;
  22. rdev : qword deprecated;
  23. size,
  24. blksize,
  25. blocks : int64 deprecated;
  26. atime,
  27. atime_nsec,
  28. mtime,
  29. mtime_nsec,
  30. ctime,
  31. ctime_nsec : qword deprecated;
  32. __unused : array[0..2] of qword deprecated);
  33. 1:
  34. (st_dev,
  35. st_ino,
  36. st_nlink : qword;
  37. st_mode,
  38. st_uid,
  39. st_gid,
  40. __pad1 : cardinal;
  41. st_rdev : qword;
  42. st_size,
  43. st_blksize,
  44. st_blocks : int64;
  45. st_atime,
  46. st_atime_nsec,
  47. st_mtime,
  48. st_mtime_nsec,
  49. st_ctime,
  50. st_ctime_nsec : qword;
  51. __unused2 : array[0..2] of qword;);
  52. end;
  53. {$else}
  54. {$packrecords C}
  55. // god from /usr/include/asm-x86_64 some -dev of linux-headers must be installed
  56. Stat = record
  57. case Byte of
  58. 0:(dev: cuLong deprecated;
  59. ino: cuLong deprecated;
  60. nlink: cuLong deprecated;
  61. mode: cuInt deprecated;
  62. uid: cuInt deprecated;
  63. gid: cuInt deprecated;
  64. __pad0: cuInt deprecated;
  65. rdev: cuLong deprecated;
  66. size: cLong deprecated;
  67. blksize: cLong deprecated;
  68. blocks: cLong deprecated; //* Number 512-byte blocks allocated. */
  69. atime: cuLong deprecated;
  70. atime_nsec: cuLong deprecated;
  71. mtime: cuLong deprecated;
  72. mtime_nsec: cuLong deprecated;
  73. ctime: cuLong deprecated;
  74. ctime_nsec: cuLong deprecated;
  75. __unused: array[0..2] of cLong deprecated;);
  76. 1:(st_dev: cuLong;
  77. st_ino: cuLong;
  78. st_nlink: cuLong;
  79. st_mode: cuInt;
  80. st_uid: cuInt;
  81. st_gid: cuInt;
  82. __pad1: cuInt;
  83. st_rdev: cuLong;
  84. st_size: cLong;
  85. st_blksize: cLong;
  86. st_blocks: cLong; //* Number 512-byte blocks allocated. */
  87. st_atime: cuLong;
  88. st_atime_nsec: cuLong;
  89. st_mtime: cuLong;
  90. st_mtime_nsec: cuLong;
  91. st_ctime: cuLong;
  92. st_ctime_nsec: cuLong;
  93. __unused2: array[0..2] of cLong);
  94. end;
  95. {$endif}