2
0

stat.h 527 B

12345678910111213141516
  1. #ifndef _BITS_STAT_H
  2. #define _BITS_STAT_H
  3. #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
  4. #define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR)
  5. #define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK)
  6. #define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
  7. #define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO)
  8. #define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
  9. #define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK)
  10. #define st_atime st_atim.tv_sec
  11. #define st_mtime st_mtim.tv_sec
  12. #define st_ctime st_ctim.tv_sec
  13. #endif