#include <sys/_types/_s_ifmt.h>

sys/_types/_s_ifmt.h

[XSI] The symbolic names for file modes for use as values of mode_t shall be defined as described in <sys/stat.h>
28 macros

macroS_IFMT

File type
#define S_IFMT 0170000
[XSI] type of file mask

macroS_IFIFO

#define S_IFIFO 0010000
[XSI] named pipe (fifo)

macroS_IFCHR

#define S_IFCHR 0020000
[XSI] character special

macroS_IFDIR

#define S_IFDIR 0040000
[XSI] directory

macroS_IFBLK

#define S_IFBLK 0060000
[XSI] block special

macroS_IFREG

#define S_IFREG 0100000
[XSI] regular

macroS_IFLNK

#define S_IFLNK 0120000
[XSI] symbolic link

macroS_IFSOCK

#define S_IFSOCK 0140000
[XSI] socket

macroS_IFWHT

#define S_IFWHT 0160000
OBSOLETE: whiteout

macroS_IRWXU

File mode Read, write, execute/search by owner
#define S_IRWXU 0000700
[XSI] RWX mask for owner

macroS_IRUSR

#define S_IRUSR 0000400
[XSI] R for owner

macroS_IWUSR

#define S_IWUSR 0000200
[XSI] W for owner

macroS_IXUSR

#define S_IXUSR 0000100
[XSI] X for owner

macroS_IRWXG

Read, write, execute/search by group
#define S_IRWXG 0000070
[XSI] RWX mask for group

macroS_IRGRP

#define S_IRGRP 0000040
[XSI] R for group

macroS_IWGRP

#define S_IWGRP 0000020
[XSI] W for group

macroS_IXGRP

#define S_IXGRP 0000010
[XSI] X for group

macroS_IRWXO

Read, write, execute/search by others
#define S_IRWXO 0000007
[XSI] RWX mask for other

macroS_IROTH

#define S_IROTH 0000004
[XSI] R for other

macroS_IWOTH

#define S_IWOTH 0000002
[XSI] W for other

macroS_IXOTH

#define S_IXOTH 0000001
[XSI] X for other

macroS_ISUID

#define S_ISUID 0004000
[XSI] set user id on execution

macroS_ISGID

#define S_ISGID 0002000
[XSI] set group id on execution

macroS_ISVTX

#define S_ISVTX 0001000
[XSI] directory restrcted delete

macroS_ISTXT

#define S_ISTXT S_ISVTX
sticky bit: not supported

macroS_IREAD

#define S_IREAD S_IRUSR
backward compatability

macroS_IWRITE

#define S_IWRITE S_IWUSR
backward compatability

macroS_IEXEC

#define S_IEXEC S_IXUSR
backward compatability