includes: S_ISSOCK and S_ISOCK

This commit is contained in:
Ben Gras 2010-06-22 13:37:33 +00:00
parent 21725c107d
commit 5946b9d41d

View file

@ -26,6 +26,7 @@ struct stat {
/* Traditional mask definitions for st_mode. */
#define S_IFMT 0170000 /* type of file */
#define S_IFSOCK 0140000 /* socket */
#define S_IFLNK 0120000 /* symbolic link */
#define S_IFREG 0100000 /* regular */
#define S_IFBLK 0060000 /* block special */
@ -64,6 +65,7 @@ struct stat {
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) /* is a block spec */
#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) /* is a symlink */
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) /* is a pipe/FIFO */
#define S_ISSOCK(m) (((m) & S_IFMT) == S_ISOCK) /* is a socket */
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)