stat.inc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. st_dev : culonglong;
  14. st_ino : culonglong;
  15. st_mode : cuint;
  16. st_nlink : cuint;
  17. st_uid : cuint;
  18. st_gid : cuint;
  19. st_rdev : culonglong;
  20. __pad3 : array[0..7] of cuchar;
  21. st_size : clonglong;
  22. st_blksize: cuint;
  23. __pad4 : array[0..7] of cuchar;
  24. st_blocks : cuint;
  25. st_atime : cuint;
  26. st_atime_nsec : cuint;
  27. st_mtime : cuint;
  28. st_mtime_nsec : cuint;
  29. st_ctime : cuint;
  30. st_ctime_nsec : cuint;
  31. __unused4 : cuint;
  32. __unused5 : cuint;
  33. end;
  34. {$ELSE FPC_USE_LIBC}
  35. {$PACKRECORDS C}
  36. Stat = record
  37. case byte of
  38. st_dev : cULongLong;
  39. st_ino : cULongLong;
  40. st_mode : mode_t;
  41. st_nlink : nlink_t;
  42. st_uid : uid_t;
  43. st_gid : gid_t;
  44. st_rdev : cULongLong;
  45. __pad2 : cushort;
  46. st_size : cLongLong;
  47. st_blksize : cULong;
  48. st_blocks : cULongLong;
  49. st_atime,
  50. st_atime_nsec,
  51. st_mtime,
  52. st_mtime_nsec,
  53. st_ctime,
  54. st_ctime_nsec,
  55. __unused4,
  56. __unused5 : cULong;
  57. end;
  58. {$ENDIF FPC_USE_LIBC}