libc: add isfdtype()
commitf22cca4722fa66e424562e69f4afa2bca0af871d
authorAnthony G. Basile <blueness@gentoo.org>
Sun, 28 Jul 2013 13:08:34 +0000 (28 09:08 -0400)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 2 Aug 2013 12:04:17 +0000 (2 14:04 +0200)
treeb14cbeb2e74a714202bd7f8796cd7e14c3f34982
parentf2a8f24fbaec0b242d9ef3fa3347efc263f92ee2
libc: add isfdtype()

isfdtype(int fd, int fdtype) check whether a file descriptor fd is
of type fdtype, where the types are defined in stat(2).  It is
supported in glibc and BSD, and used by utilities such as acpid.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/misc/file/isfdtype.c [new file with mode: 0644]