stat.h 544 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * stat.h
  3. * file attributes
  4. *
  5. */
  6. #ifndef _EGG_STAT_H
  7. #define _EGG_STAT_H
  8. #include <sys/stat.h>
  9. #ifndef S_ISDIR
  10. # ifndef S_IFMT
  11. # define S_IFMT 0170000 /* Bitmask for the file type bitfields */
  12. # endif
  13. # ifndef S_IFDIR
  14. # define S_IFDIR 0040000 /* Directory */
  15. # endif
  16. # define S_ISDIR(m) (((m)&(S_IFMT)) == (S_IFDIR))
  17. #endif
  18. #ifndef S_IFREG
  19. # define S_IFREG 0100000 /* Regular file */
  20. #endif
  21. #ifndef S_IFLNK
  22. # define S_IFLNK 0120000 /* Symbolic link */
  23. #endif
  24. #endif /* _EGG_STAT_H */