stat.inc 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by Jonas Maebe,
  5. member of the Free Pascal development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {$ifndef FPC_USE_LIBC} // kernel record
  13. Stat = Packed Record // No unix typing because of differences
  14. // kernel <->libc
  15. case byte of
  16. 0: (st_dev : word;
  17. pad1 : word;
  18. st_ino : longint;
  19. st_mode,
  20. st_nlink,
  21. st_uid,
  22. st_gid : word;
  23. st_rdev : word;
  24. pad2 : word;
  25. st_size,
  26. st_blksze,
  27. st_blocks,
  28. st_atime,
  29. unused1,
  30. st_mtime,
  31. unused2,
  32. st_ctime,
  33. unused3,
  34. unused4,
  35. unused5 : longint;);
  36. 1: (
  37. dev : word;
  38. pad1_dummy : word;
  39. ino : longint;
  40. mode,
  41. nlink,
  42. uid,
  43. gid : word;
  44. rdev : word;
  45. pad2_dummy : word;
  46. size,
  47. blksze,
  48. blocks,
  49. atime,
  50. unused1_dummy,
  51. mtime,
  52. unused2_dummy,
  53. ctime,
  54. unused3_dummy,
  55. unused4_dummy,
  56. unused5_dummy : longint;
  57. );
  58. end;
  59. {$else}
  60. {$packrecords C}
  61. Stat = Record // No unix typing because of differences
  62. // kernel <->libc
  63. case byte of
  64. 0: (st_dev : int64;
  65. pad1 : word;
  66. st_ino : longint;
  67. st_mode,
  68. st_nlink,
  69. st_uid,
  70. st_gid : longint;
  71. st_rdev : int64;
  72. pad2 : word;
  73. st_size,
  74. st_blksze,
  75. st_blocks,
  76. st_atime,
  77. unused1,
  78. st_mtime,
  79. unused2,
  80. st_ctime,
  81. unused3,
  82. unused4,
  83. unused5 : longint;);
  84. 1: (
  85. dev : int64;
  86. pad1_dummy : word;
  87. ino : longint;
  88. mode,
  89. nlink,
  90. uid,
  91. gid : longint;
  92. rdev : int64;
  93. pad2_dummy : word;
  94. size,
  95. blksze,
  96. blocks,
  97. atime,
  98. unused1_dummy,
  99. mtime,
  100. unused2_dummy,
  101. ctime,
  102. unused3_dummy,
  103. unused4_dummy,
  104. unused5_dummy : longint;
  105. );
  106. end;
  107. {$endif}
  108. {
  109. $Log$
  110. Revision 1.2 2004-01-01 14:20:20 marco
  111. * libc stat record under ifdef added
  112. Revision 1.1 2003/05/15 22:50:50 jonas
  113. * the stat type is processor-dependent
  114. * the dev_t tpye is processor dependent. Don't use it in the stat type
  115. however, as that one is also used at a time where dev_t is already
  116. defined as qword
  117. }