stat.h 1009 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* $Header$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. */
  6. struct stat {
  7. dev_t st_dev;
  8. ino_t st_ino;
  9. u_short st_mode;
  10. short st_nlink;
  11. short st_uid;
  12. short st_gid;
  13. dev_t st_rdev;
  14. off_t st_size;
  15. time_t st_atime;
  16. #ifdef BSD4_2
  17. long st_spare1;
  18. #endif
  19. time_t st_mtime;
  20. #ifdef BSD4_2
  21. long st_spare2;
  22. #endif
  23. time_t st_ctime;
  24. #ifdef BSD4_2
  25. long st_spare3;
  26. long st_blksize;
  27. long st_blocks;
  28. long st_spare4[2];
  29. #endif
  30. };
  31. #define S_IFMT 0170000
  32. #define S_IFDIR 0040000
  33. #define S_IFCHR 0020000
  34. #define S_IFBLK 0060000
  35. #define S_IFREG 0100000
  36. #ifndef BSD4_2
  37. #ifndef USG
  38. #define S_IFMPC 0030000
  39. #define S_IFMPB 0070000
  40. #else
  41. #define S_IFIFO 0010000
  42. #endif
  43. #else
  44. #define S_IFLNK 0120000
  45. #define S_IFSOCK 0140000
  46. #endif
  47. #define S_ISUID 0004000
  48. #define S_ISGID 0002000
  49. #define S_ISVTX 0001000
  50. #define S_IREAD 0000400
  51. #define S_IWRITE 0000200
  52. #define S_IEXEC 0000100