kopia lustrzana https://gitlab.com/sane-project/website
126 wiersze
5.0 KiB
HTML
126 wiersze
5.0 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>sane-devel: Re: Current compilation status</TITLE>
|
|
<META NAME="Author" CONTENT="Petter Reinholdtsen (pere@hungry.com)">
|
|
<META NAME="Subject" CONTENT="Re: Current compilation status">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>Re: Current compilation status</H1>
|
|
<!-- received="Wed Jul 19 08:40:57 2000" -->
|
|
<!-- isoreceived="20000719154057" -->
|
|
<!-- sent="Wed, 19 Jul 2000 23:42:55 +0800" -->
|
|
<!-- isosent="20000719154255" -->
|
|
<!-- name="Petter Reinholdtsen" -->
|
|
<!-- email="pere@hungry.com" -->
|
|
<!-- subject="Re: Current compilation status" -->
|
|
<!-- id="200007191542.XAA06616@poseidon.ee.uwa.edu.au" -->
|
|
<!-- inreplyto="Current compilation status" -->
|
|
<STRONG>From:</STRONG> Petter Reinholdtsen (<A HREF="mailto:pere@hungry.com?Subject=Re:%20Current%20compilation%20status&In-Reply-To=<200007191542.XAA06616@poseidon.ee.uwa.edu.au>"><EM>pere@hungry.com</EM></A>)<BR>
|
|
<STRONG>Date:</STRONG> Wed Jul 19 2000 - 08:42:55 PDT
|
|
<P>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0168.html">Oliver Rauch: "Re: astra 2400 S + ATA"</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0166.html">Marcel Pol: "Re: please help. Microtek v300 device I/O error"</A>
|
|
<LI><STRONG>Maybe in reply to:</STRONG> <A HREF="0136.html">Henning Meier-Geinitz: "Current compilation status"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0185.html">Henning Meier-Geinitz: "Re: Current compilation status"</A>
|
|
<LI><STRONG>Reply:</STRONG> <A HREF="0185.html">Henning Meier-Geinitz: "Re: Current compilation status"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#167">[ date ]</A>
|
|
<A HREF="index.html#167">[ thread ]</A>
|
|
<A HREF="subject.html#167">[ subject ]</A>
|
|
<A HREF="author.html#167">[ author ]</A>
|
|
</UL>
|
|
<HR NOSHADE><P>
|
|
<!-- body="start" -->
|
|
<P>
|
|
<EM>> isfdtype() is as far as I know, the only way to test if a file
|
|
</EM><BR>
|
|
<EM>> descriptor is a socket. If someone want to make a proper
|
|
</EM><BR>
|
|
<EM>> implementation for AIX and Solaris, please update lib/isfdtype.c. It
|
|
</EM><BR>
|
|
<EM>> currently returns 0 (false) on all platforms where the native
|
|
</EM><BR>
|
|
<EM>> function is missing.
|
|
</EM><BR>
|
|
<P>Olly Betts send me an email suggesting the following implementation.
|
|
<BR>
|
|
I have not had a look at how we can autodetect the required features,
|
|
<BR>
|
|
and I do not have time to look at this now. Would this implementation
|
|
<BR>
|
|
work on all the platforms which are missing isfdtype().
|
|
<BR>
|
|
<P> int
|
|
<BR>
|
|
isfdtype(int fd, int fdtype)
|
|
<BR>
|
|
{
|
|
<BR>
|
|
struct stat st;
|
|
<BR>
|
|
if (fstat(fd, &st) == -1) return 0; /* couldn't stat fd */
|
|
<BR>
|
|
#if defined(HAVE_S_ISSOCK)
|
|
<BR>
|
|
return S_ISSOCK(st.st_mode) != 0;
|
|
<BR>
|
|
#elif defined(HAVE_S_IFSOCK)
|
|
<BR>
|
|
return (st.st_mode & S_IFMT) == S_IFSOCK;
|
|
<BR>
|
|
#else
|
|
<BR>
|
|
return 0;
|
|
<BR>
|
|
#endif
|
|
<BR>
|
|
}
|
|
<BR>
|
|
<P>It is not really generic, but at the moment, we only need the socket
|
|
<BR>
|
|
test.
|
|
<BR>
|
|
<PRE>
|
|
--
|
|
##> Petter Reinholdtsen <## | <A HREF="mailto:pere@td.org.uit.no?Subject=Re:%20Current%20compilation%20status&In-Reply-To=<200007191542.XAA06616@poseidon.ee.uwa.edu.au>">pere@td.org.uit.no</A>
|
|
O- <SCRIPT Language="Javascript">window.close()</SCRIPT>
|
|
<A HREF="http://www.hungry.com/~pere/">http://www.hungry.com/~pere/</A> | Go Mozilla, go! Go!
|
|
<P>--
|
|
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
|
|
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20Current%20compilation%20status&In-Reply-To=<200007191542.XAA06616@poseidon.ee.uwa.edu.au>">majordomo@mostang.com</A>
|
|
</PRE>
|
|
<P><!-- body="end" -->
|
|
<HR NOSHADE>
|
|
<UL>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0168.html">Oliver Rauch: "Re: astra 2400 S + ATA"</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0166.html">Marcel Pol: "Re: please help. Microtek v300 device I/O error"</A>
|
|
<LI><STRONG>Maybe in reply to:</STRONG> <A HREF="0136.html">Henning Meier-Geinitz: "Current compilation status"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0185.html">Henning Meier-Geinitz: "Re: Current compilation status"</A>
|
|
<LI><STRONG>Reply:</STRONG> <A HREF="0185.html">Henning Meier-Geinitz: "Re: Current compilation status"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#167">[ date ]</A>
|
|
<A HREF="index.html#167">[ thread ]</A>
|
|
<A HREF="subject.html#167">[ subject ]</A>
|
|
<A HREF="author.html#167">[ author ]</A>
|
|
</UL>
|
|
<!-- trailer="footer" -->
|
|
<HR NOSHADE>
|
|
<P>
|
|
<SMALL>
|
|
<EM>
|
|
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
|
|
: <EM>Wed Jul 19 2000 - 08:43:03 PDT</EM>
|
|
</EM>
|
|
</SMALL>
|
|
</BODY>
|
|
</HTML>
|