stat.inc 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. st_dev,
  14. st_ino,
  15. st_nlink : qword;
  16. st_mode,
  17. st_uid,
  18. st_gid,
  19. __pad1 : cardinal;
  20. st_rdev : qword;
  21. st_size,
  22. st_blksize,
  23. st_blocks : int64;
  24. st_atime,
  25. st_atime_nsec,
  26. st_mtime,
  27. st_mtime_nsec,
  28. st_ctime,
  29. st_ctime_nsec : qword;
  30. __unused2 : array[0..2] of qword;
  31. end;
  32. {$else}
  33. {$packrecords C}
  34. // god from /usr/include/asm-x86_64 some -dev of linux-headers must be installed
  35. Stat = record
  36. st_dev: cuLong;
  37. st_ino: cuLong;
  38. st_nlink: cuLong;
  39. st_mode: cuInt;
  40. st_uid: cuInt;
  41. st_gid: cuInt;
  42. __pad1: cuInt;
  43. st_rdev: cuLong;
  44. st_size: cLong;
  45. st_blksize: cLong;
  46. st_blocks: cLong; //* Number 512-byte blocks allocated. */
  47. st_atime: cuLong;
  48. st_atime_nsec: cuLong;
  49. st_mtime: cuLong;
  50. st_mtime_nsec: cuLong;
  51. st_ctime: cuLong;
  52. st_ctime_nsec: cuLong;
  53. __unused2: array[0..2] of cLong;
  54. end;
  55. {$endif}