stat.inc 2.7 KB

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