HelenOS sources

S_IFMT             39 uspace/lib/minix/minix.h #define S_ISDIR(m)		(((m) & S_IFMT) == S_IFDIR)
S_IFMT             40 uspace/lib/minix/minix.h #define S_ISREG(m)		(((m) & S_IFMT) == S_IFREG)
S_IFMT            392 uspace/lib/posix/src/stdio.c 	if ((sbuf.st_mode & S_IFMT) != S_IFDIR)
HelenOS homepage, sources at GitHub