21 #define S_IFMT 0170000
22 #define S_IFSOCK 0140000
23 #define S_IFLNK 0120000
24 #define S_IFREG 0100000
25 #define S_IFBLK 0060000
26 #define S_IFDIR 0040000
27 #define S_IFCHR 0020000
28 #define S_IFIFO 0010000
29 #define S_ISUID 0004000
30 #define S_ISGID 0002000
31 #define S_ISVTX 0001000
33 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
34 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
35 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
36 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
37 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
38 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
39 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
49 unsigned long st_size
;
50 unsigned long st_blksize
;
51 unsigned long st_blocks
;
53 unsigned long st_atime_nsec
;
55 unsigned long st_mtime_nsec
;
57 unsigned long st_ctime_nsec
;
58 unsigned long __unused4
;
59 unsigned long __unused5
;
62 int stat(char *file
, struct stat
*buf
);
63 int fstat(int fd
, struct stat
*buf
);
64 int lstat(char *file
, struct stat
*buf
);
66 int chmod(char *file
, int mode
);
67 int fchmod(int fd
, int mode
);
69 int mkdir(char *path
, int mode
);
70 int mknod(char *path
, int mode
, int dev
);
71 int mkfifo(char *path
, int mode
);