stat.inc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 1999-2003 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}
  12. Stat = packed record // No unix typing because of differences
  13. 0:
  14. (dev : culonglong;
  15. ino : culonglong;
  16. mode : cuint;
  17. nlink : cuint;
  18. uid : cuint;
  19. gid : cuint;
  20. rdev : culonglong;
  21. __pad3 : array[0..7] of cuchar;
  22. size : clonglong;
  23. blksize: cuint;
  24. __pad4 : array[0..7] of cuchar;
  25. blocks : cuint;
  26. atime : cuint;
  27. atime_nsec : cuint;
  28. mtime : cuint;
  29. mtime_nsec : cuint;
  30. ctime : cuint;
  31. ctime_nsec : cuint;
  32. __unused4 : cuint;
  33. __unused5 : cuint);
  34. 1:
  35. (st_dev : culonglong;
  36. st_ino : culonglong;
  37. st_mode : cuint;
  38. st_nlink : cuint;
  39. st_uid : cuint;
  40. st_gid : cuint;
  41. st_rdev : culonglong;
  42. __pad3_ : array[0..7] of cuchar;
  43. st_size : clonglong;
  44. st_blksize: cuint;
  45. __pad4_ : array[0..7] of cuchar;
  46. st_blocks : cuint;
  47. st_atime : cuint;
  48. st_atime_nsec : cuint;
  49. st_mtime : cuint;
  50. st_mtime_nsec : cuint;
  51. st_ctime : cuint;
  52. st_ctime_nsec : cuint;
  53. __unused4_ : cuint;
  54. __unused5_ : cuint);
  55. end;
  56. {$ELSE FPC_USE_LIBC}
  57. {$PACKRECORDS C}
  58. Stat = record
  59. case byte of
  60. 0:
  61. (dev : cULongLong;
  62. ino : cULongLong;
  63. mode : mode_t;
  64. nlink : nlink_t;
  65. uid : uid_t;
  66. gid : gid_t;
  67. rdev : cULongLong;
  68. __pad2 : cushort;
  69. size : cLongLong;
  70. blksize : cULong;
  71. blocks : cULongLong;
  72. atime,
  73. atime_nsec,
  74. mtime,
  75. mtime_nsec,
  76. ctime,
  77. ctime_nsec,
  78. __unused4,
  79. __unused5 : cULong);
  80. 1:
  81. (st_dev : cULongLong;
  82. st_ino : cULongLong;
  83. st_mode : mode_t;
  84. st_nlink : nlink_t;
  85. st_uid : uid_t;
  86. st_gid : gid_t;
  87. st_rdev : cULongLong;
  88. __pad2_ : cushort;
  89. st_size : cLongLong;
  90. st_blksize : cULong;
  91. st_blocks : cULongLong;
  92. st_atime,
  93. st_atime_nsec,
  94. st_mtime,
  95. st_mtime_nsec,
  96. st_ctime,
  97. st_ctime_nsec,
  98. __unused4_,
  99. __unused5-) : cULong);
  100. end;
  101. {$ENDIF FPC_USE_LIBC}