sane-project-website/old-archive/1998-04/0066.html

96 wiersze
4.4 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!-- received="Sun Apr 5 14:00:17 1998 PDT" -->
<!-- sent="Sun, 5 Apr 1998 14:00:16 -0700" -->
<!-- name="David Mosberger-Tang" -->
<!-- email="David.Mosberger@acm.org" -->
<!-- subject="Re: sane 0.72pre meets FreeBSD" -->
<!-- id="199804052100.OAA11604@panda.mostang.com" -->
<!-- inreplyto="Pine.BSF.3.96.980405211747.306A-100000@atlas.home.dynas.se" -->
<title>sane-devel: Re: sane 0.72pre meets FreeBSD</title>
<h1>Re: sane 0.72pre meets FreeBSD</h1>
<b>David Mosberger-Tang</b> (<a href="mailto:David.Mosberger@acm.org"><i>David.Mosberger@acm.org</i></a>)<br>
<i>Sun, 5 Apr 1998 14:00:16 -0700</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#66">[ date ]</a><a href="index.html#66">[ thread ]</a><a href="subject.html#66">[ subject ]</a><a href="author.html#66">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0067.html">David Mosberger-Tang: "Re: I don´t like that"</a>
<li> <b>Previous message:</b> <a href="0065.html">John Brush: "Re: Q: support for digi cameras"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
<i>&gt;&gt;&gt;&gt;&gt; On Sun, 5 Apr 1998 21:21:08 +0200 (CEST), =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= &lt;<a href="mailto:mikko@securitydynamics.com">mikko@securitydynamics.com</a>&gt; said:</i><br>
<p>
Mikko&gt; The patches below are all (?) that is required to compile and<br>
Mikko&gt; pass initial tests on FreeBSD 2.2.5 with gtk 0.99.9 and gimp<br>
Mikko&gt; 0.99.23.<br>
<p>
Thanks! I think I got all the fixes in place so hopefully 0.72 will<br>
build out of the box.<br>
<p>
Mikko&gt; Question 0:<br>
<p>
Mikko&gt; Is the entire build supposed to pass without any compiler<br>
Mikko&gt; warnings?<br>
<p>
Yes and no. Yes if you have a modern enough libc that declares all<br>
the necessary function, no in all other cases. "Modern enough" is<br>
roughly equivalent to glibc 2.x.<br>
<p>
Mikko&gt; If so, there are a few things that could be improved:<br>
<p>
Mikko&gt; - getopt.c does not include headers to get declarations of<br>
Mikko&gt; getpid() and strdup(). Well, it sort of does, but there are<br>
Mikko&gt; enough #ifdefs to make sure it does not happen. But I guess<br>
Mikko&gt; this file is simply grabbed out of GNU libs, and should not<br>
Mikko&gt; be changed. No big deal.<br>
<p>
That's intentional. There are systems broken enough that _declare_<br>
certain functions but do not _define_ them in any library (yes, this<br>
is true). Because of this, it's safer not to declare replacement libc<br>
functions at all. The warnings are annoying, but C's parameter<br>
passing rules work in a way that makes this safer.<br>
<p>
Mikko&gt; - sane provides strndup() for systems that does not have it,<br>
Mikko&gt; but fails to declare it anywhere. It could be done in<br>
Mikko&gt; config.h, which would require to include &lt;sys/types.h&gt;<br>
Mikko&gt; somewhere too (to get size_t).<br>
<p>
This, again is intentional for the above reason. glibc 2.x declares<br>
and defines strndup() so there you won't see any warnings.<br>
<p>
Mikko&gt; Question 1:<br>
<p>
Mikko&gt; Is it necessary to keep all the loadable backends in the<br>
Mikko&gt; standard library path? I'm getting an uneasy feeling when<br>
Mikko&gt; sane singlehandedly doubles the number of entries in my<br>
Mikko&gt; /usr/local/lib, with something that could be considered as<br>
Mikko&gt; internal to sane.<br>
<p>
Mikko&gt; Am I missing something, or could they be moved to (for<br>
Mikko&gt; example) /usr/local/lib/sane/? Aren't the backends just<br>
Mikko&gt; dlopen()ed?<br>
<p>
The probably should. There used to be few enough backends that this<br>
didn't matter, but I think you're right that we're getting past this<br>
point. I won't promise it for 0.72 but it's something we should<br>
change (if someone were to send me tested patches, it would accelerate<br>
things a lot, hint, hint... ;-)<br>
<p>
--david<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">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0067.html">David Mosberger-Tang: "Re: I don´t like that"</a>
<li> <b>Previous message:</b> <a href="0065.html">John Brush: "Re: Q: support for digi cameras"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>