stat.inc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 1999-2000 by Jonas Maebe, (c) 2005 Thomas Schatzl,
  4. members of the Free Pascal development team.
  5. Contains the definition of the stat type for the PowerPC platform.
  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. { This structure was ported from
  13. /usr/include/asm-ppc/stat.h
  14. on a 2.6.11 kernel.
  15. }
  16. {$PACKRECORDS C}
  17. {$IFNDEF FPC_USE_LIBC}
  18. Stat = record // No unix typing because of differences
  19. case byte of
  20. 0:
  21. (dev : culonglong deprecated;
  22. ino : culonglong deprecated;
  23. mode : cuint deprecated;
  24. nlink : cuint deprecated;
  25. uid : cuint deprecated;
  26. gid : cuint deprecated;
  27. rdev : culonglong deprecated;
  28. __pad2 : cushort deprecated;
  29. size : clonglong deprecated;
  30. blksize: clong deprecated;
  31. blocks : clonglong deprecated;
  32. atime : clong deprecated;
  33. atime_nsec : culong deprecated;
  34. mtime : clong deprecated;
  35. mtime_nsec : culong deprecated;
  36. ctime : clong deprecated;
  37. __unused3 : culong deprecated;
  38. __unused4 : culong deprecated;
  39. __unused5 : culong deprecated;);
  40. 1:
  41. (st_dev : culonglong;
  42. st_ino : culonglong;
  43. st_mode : cuint;
  44. st_nlink : cuint;
  45. st_uid : cuint;
  46. st_gid : cuint;
  47. st_rdev : culonglong;
  48. __pad2_ : cushort;
  49. st_size : clonglong;
  50. st_blksize: clong;
  51. st_blocks : clonglong;
  52. st_atime : clong;
  53. st_atime_nsec : culong;
  54. st_mtime : clong;
  55. st_mtime_nsec : culong;
  56. st_ctime : clong;
  57. __unused3_ : culong;
  58. __unused4_ : culong;
  59. __unused5_ : culong;);
  60. end;
  61. {$ELSE FPC_USE_LIBC}
  62. { when linking to libc, we need to use some other, 64 bit enhanced stat type }
  63. { i.e. powerpc kernel sources (2.6.20-15) /include/asm-powerpc/stat.h, stat64 struct }
  64. stat = record
  65. case byte of
  66. 0: (
  67. st_dev : cULongLong;
  68. st_ino : cULongLong;
  69. st_mode : cUInt;
  70. st_nlink : cUInt;
  71. st_uid : cUInt;
  72. st_gid : cUInt;
  73. st_rdev : cULongLong;
  74. __pad2 : cUShort;
  75. st_size : cLongLong;
  76. st_blksize : cInt;
  77. st_blocks : cULongLong;
  78. st_atime,
  79. st_atime_nsec,
  80. st_mtime,
  81. st_mtime_nsec,
  82. st_ctime,
  83. st_ctime_nsec,
  84. __unused4,
  85. __unused5 : cULong);
  86. 1: (
  87. dev : cULongLong deprecated;
  88. ino : cULongLong deprecated;
  89. mode : cUInt deprecated;
  90. nlink : cUInt deprecated;
  91. uid : cUInt deprecated;
  92. gid : cUInt deprecated;
  93. rdev : cULongLong deprecated;
  94. __pad2_: cUShort deprecated;
  95. size : cLongLong deprecated;
  96. blksize: cInt deprecated;
  97. blocks : cULongLong deprecated;
  98. atime,
  99. __unused1_dummy,
  100. mtime,
  101. __unused2_dummy,
  102. ctime,
  103. __unused3_dummy,
  104. __unused4_dummy,
  105. __unused5_dummy : cULong deprecated);
  106. end;
  107. {$ENDIF FPC_USE_LIBC}