The following symbolic names for the values of type mode_t shall also be defined.
Type of file.
File mode bits:
Read, write, execute/search by owner.
Read permission, owner.
Write permission, owner.
Execute/search permission, owner.
Read, write, execute/search by group.
Read permission, group.
Write permission, group.
Execute/search permission, group.
Read, write, execute/search by others.
Read permission, others.
Write permission, others.
Execute/search permission, others.
Set-user-ID on execution.
Set-group-ID on execution.
[XSI] On directories, restricted deletion flag.
The bits defined by S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_ISUID, S_ISGID, [XSI] and S_ISVTX shall be unique.
S_IRWXU is the bitwise-inclusive OR of S_IRUSR, S_IWUSR, and S_IXUSR.
S_IRWXG is the bitwise-inclusive OR of S_IRGRP, S_IWGRP, and S_IXGRP.
S_IRWXO is the bitwise-inclusive OR of S_IROTH, S_IWOTH, and S_IXOTH.
Implementations may OR other implementation-defined bits into S_IRWXU, S_IRWXG, and S_IRWXO, but they shall not overlap any of the other bits defined in this volume of IEEE Std 1003.1-2001. The file permission bits are defined to be those corresponding to the bitwise-inclusive OR of S_IRWXU, S_IRWXG, and S_IRWXO.
The following macros shall be provided to test whether a file is of the specified type. The value m supplied to the macros is the value of st_mode from a stat structure. The macro shall evaluate to a non-zero value if the test is true; 0 if the test is false.
Test for a block special file.
Test for a character special file.
Test for a directory.
Test for a pipe or FIFO special file.
Test for a regular file.
Test for a symbolic link.
Test for a socket.