stat.inc 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. case byte of
  14. 0:
  15. (dev,
  16. ino,
  17. nlink : qword;
  18. mode,
  19. uid,
  20. gid,
  21. __pad0 : cardinal;
  22. rdev : qword;
  23. size,
  24. blksize,
  25. blocks : int64;
  26. atime,
  27. atime_nsec,
  28. mtime,
  29. mtime_nsec,
  30. ctime,
  31. ctime_nsec : qword;
  32. __unused : array[0..2] of qword);
  33. 1:
  34. (st_dev,
  35. st_ino,
  36. st_nlink : qword;
  37. st_mode,
  38. st_uid,
  39. st_gid,
  40. __pad1 : cardinal;
  41. st_rdev : qword;
  42. st_size,
  43. st_blksize,
  44. st_blocks : int64;
  45. st_atime,
  46. st_atime_nsec,
  47. st_mtime,
  48. st_mtime_nsec,
  49. st_ctime,
  50. st_ctime_nsec : qword;
  51. __unused2 : array[0..2] of qword;);
  52. end;
  53. {$else}
  54. (* get it from glibc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h and check defines with gcc *)
  55. {$endif}