kopia lustrzana https://gitlab.com/sane-project/website
116 wiersze
4.3 KiB
HTML
116 wiersze
4.3 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: OT: Is "fileno()" conform to ANSI or</TITLE>
|
|
<META NAME="Author" CONTENT="Scott Gifford (sgifford@tir.com)">
|
|
<META NAME="Subject" CONTENT="Re: OT: Is "fileno()" conform to ANSI or POSIX?">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>Re: OT: Is "fileno()" conform to ANSI or POSIX?</H1>
|
|
<!-- received="Tue Mar 6 01:34:58 2001" -->
|
|
<!-- isoreceived="20010306093458" -->
|
|
<!-- sent="06 Mar 2001 04:53:53 -0500" -->
|
|
<!-- isosent="20010306095353" -->
|
|
<!-- name="Scott Gifford" -->
|
|
<!-- email="sgifford@tir.com" -->
|
|
<!-- subject="Re: OT: Is "fileno()" conform to ANSI or POSIX?" -->
|
|
<!-- id="m3ofvf440e.fsf@sghome.tir.com" -->
|
|
<!-- inreplyto="Mon, 05 Mar 2001 19:48:13 +0100"" -->
|
|
<STRONG>From:</STRONG> Scott Gifford (<A HREF="mailto:sgifford@tir.com?Subject=Re:%20OT:%20Is%20"fileno()"%20conform%20to%20ANSI%20or%20POSIX?&In-Reply-To=<m3ofvf440e.fsf@sghome.tir.com>"><EM>sgifford@tir.com</EM></A>)<BR>
|
|
<STRONG>Date:</STRONG> Tue Mar 06 2001 - 01:53:53 PST
|
|
<P>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0082.html">Frederik Ramm: "SANE_INFO_RELOAD_PARAMS on get?"</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0080.html">Ulrich Deiters: "Re: OT: Is "fileno()" conform to ANSI or POSIX?"</A>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#81">[ date ]</A>
|
|
<A HREF="index.html#81">[ thread ]</A>
|
|
<A HREF="subject.html#81">[ subject ]</A>
|
|
<A HREF="author.html#81">[ author ]</A>
|
|
</UL>
|
|
<HR NOSHADE><P>
|
|
<!-- body="start" -->
|
|
<P>
|
|
Oliver Rauch <<A HREF="mailto:oliver.rauch@rauch-domain.de?Subject=Re:%20OT:%20Is%20"fileno()"%20conform%20to%20ANSI%20or%20POSIX?&In-Reply-To=<m3ofvf440e.fsf@sghome.tir.com>">oliver.rauch@rauch-domain.de</A>> writes:
|
|
<BR>
|
|
<P><EM>> "Collins, Martin" wrote:
|
|
</EM><BR>
|
|
<EM>> >
|
|
</EM><BR>
|
|
<EM>> > Oliver Rauch asked:
|
|
</EM><BR>
|
|
<EM>> > > The question is if I can expect that fileno() is available
|
|
</EM><BR>
|
|
<EM>> > > on most/all systems xsane does compile on.
|
|
</EM><BR>
|
|
<EM>> >
|
|
</EM><BR>
|
|
<EM>> > I believe fileno() is specified in POSIX 1003.1 and is available
|
|
</EM><BR>
|
|
<EM>> > on HP-UX, AIX and QNX as well as in glibc. So you're probably safe
|
|
</EM><BR>
|
|
<EM>> > using it.
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> Fine, thanks.
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> By the way, does anyone know if mmap does anything else than
|
|
</EM><BR>
|
|
<EM>> buffer=malloc(size) + fread(buffer, size, 1, file) ?
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> This way I would not depend on mmap and fileno.
|
|
</EM><BR>
|
|
<P>Conceptually it does basically this, but it is much much faster,
|
|
<BR>
|
|
requires less real memory, is much much faster, automatically writes
|
|
<BR>
|
|
changes to the mmap()'d region when memory is changed, is much much
|
|
<BR>
|
|
faster, and is much much faster. :-)
|
|
<BR>
|
|
<P>I think any UNIX system recent enough to support mmap() will also
|
|
<BR>
|
|
support fileno().
|
|
<BR>
|
|
<P><P>-----ScottG.
|
|
<BR>
|
|
<P><PRE>
|
|
--
|
|
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:%20OT:%20Is%20"fileno()"%20conform%20to%20ANSI%20or%20POSIX?&In-Reply-To=<m3ofvf440e.fsf@sghome.tir.com>">majordomo@mostang.com</A>
|
|
</PRE>
|
|
<P><!-- body="end" -->
|
|
<HR NOSHADE>
|
|
<UL>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0082.html">Frederik Ramm: "SANE_INFO_RELOAD_PARAMS on get?"</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0080.html">Ulrich Deiters: "Re: OT: Is "fileno()" conform to ANSI or POSIX?"</A>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#81">[ date ]</A>
|
|
<A HREF="index.html#81">[ thread ]</A>
|
|
<A HREF="subject.html#81">[ subject ]</A>
|
|
<A HREF="author.html#81">[ 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>Tue Mar 06 2001 - 01:37:43 PST</EM>
|
|
</EM>
|
|
</SMALL>
|
|
</BODY>
|
|
</HTML>
|