libc: add isfdtype()
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 <dd506e32bc562796df922793870fd5ab238a58ad@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <ce1ac9e9ad16abccd7821f371ad381197b4768ac@gmail.com>

majek/uclibc-vx32,mephi42/uClibc,mephi42/uClibc,foss-xtensa/uClibc,hjl-tools/uClibc,brgl/uclibc-ng,groundwater/uClibc,brgl/uclibc-ng,hjl-tools/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,majek/uclibc-vx32,ffainelli/uClibc,majek/uclibc-vx32,brgl/uclibc-ng,kraj/uclibc-ng,ffainelli/uClibc,kraj/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,kraj/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,groundwater/uClibc,wbx-github/uclibc-ng,kraj/uClibc,groundwater/uClibc,kraj/uClibc,hjl-tools/uClibc,mephi42/uClibc,brgl/uclibc-ng,wbx-github/uclibc-ng,hjl-tools/uClibc,foss-xtensa/uClibc,majek/uclibc-vx32,wbx-github/uclibc-ng,hjl-tools/uClibc,kraj/uclibc-ng,foss-xtensa/uClibc,mephi42/uClibc,foss-xtensa/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,wbx-github/uclibc-ng,ffainelli/uClibc,kraj/uClibc,kraj/uclibc-ng,ffainelli/uClibc,ffainelli/uClibc,groundwater/uClibc,groundwater/uClibc