Kirkina A. wrote:
>> Compile with
>> man 2 stat
>> should have shown you that.
> man 2 stat did not show it.
Seems this has been moved to a separate man page lately. On my linux
system, this is mentioned in man 2 stat, but the latest version of the
linux man page project
(http://man7.org/linux/man-pages/man2/stat.2.html) just says:
This field contains the file type and mode. See inode(7) for
and the inode man page says:
The definitions of most of the above file type test macros are
provided if any of the following feature test macros is defined:
_BSD_SOURCE (in glibc 2.19 and earlier), _SVID_SOURCE (in glibc 2.19
and earlier), or _DEFAULT_SOURCE (in glibc 2.20 and later). In
addition, definitions of all of the above macros except S_IFSOCK and
S_ISSOCK() are provided if _XOPEN_SOURCE is defined. The definition
of S_IFSOCK can also be exposed by defining _XOPEN_SOURCE with a
value of 500 or greater.