diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-31 17:00:20 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-31 17:00:20 +0200 |
commit | 3759ce55ba79b8d3b9d8ed247a252273ee7dade3 (patch) | |
tree | d69692a274dd1c7d0672e6bb7155a0fc106f9d49 /lib/isfdtype.c | |
parent | c8bd2513ecba169cff44c09c8058c36987357b18 (diff) | |
parent | 1687222e1b9e74c89cafbb5910e72d8ec7bfd40f (diff) |
Update upstream source from tag 'upstream/1.0.28'
Update to upstream version '1.0.28'
with Debian dir ec5bb298266630fc3801ff6dc0c258f6df7ba979
Diffstat (limited to 'lib/isfdtype.c')
-rw-r--r-- | lib/isfdtype.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/isfdtype.c b/lib/isfdtype.c deleted file mode 100644 index 8e51516..0000000 --- a/lib/isfdtype.c +++ /dev/null @@ -1,25 +0,0 @@ -#include "../include/sane/config.h" - -#ifndef HAVE_ISFDTYPE - -#include <sys/stat.h> - -int -isfdtype(int fd, int fdtype) -{ - struct stat st; - - if (fstat(fd, &st) == -1) return 0; /* couldn't stat fd */ - - if (st.st_mode == 0) - return 1; /* At least Irix doesn't seem to know socket type */ -#if defined(S_ISSOCK) - return S_ISSOCK(st.st_mode) != 0; -#elif defined(S_IFSOCK) && defined(S_IFMT) - return (st.st_mode & S_IFMT) == S_IFSOCK; -#else - return 0; -#endif -} - -#endif /* !HAVE_ISFDTYPE */ |