sane-project-website/old-archive/1998-11/0201.html

78 wiersze
4.0 KiB
HTML

<!-- received="Sun Nov 22 09:48:55 1998 PST" -->
<!-- sent="Sun, 22 Nov 1998 09:48:51 -0800" -->
<!-- name="David Mosberger-Tang" -->
<!-- email="David.Mosberger@acm.org" -->
<!-- subject="Re: compiling problem with egcs-1.03a" -->
<!-- id="199811221748.JAA00334@panda.mostang.com" -->
<!-- inreplyto="Pine.LNX.4.04.9811221521540.12589-100000@mondoshawan.unix.cslab.tuwien.ac.at" -->
<title>sane-devel: Re: compiling problem with egcs-1.03a</title>
<h1>Re: compiling problem with egcs-1.03a</h1>
<b>David Mosberger-Tang</b> (<a href="mailto:David.Mosberger@acm.org"><i>David.Mosberger@acm.org</i></a>)<br>
<i>Sun, 22 Nov 1998 09:48:51 -0800</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#201">[ date ]</a><a href="index.html#201">[ thread ]</a><a href="subject.html#201">[ subject ]</a><a href="author.html#201">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0202.html">David Mosberger-Tang: "Re: forwarded message from Richard Stallman"</a>
<li> <b>Previous message:</b> <a href="0200.html">Manuel Panea: "Announce: Canon driver extensions for 2700F"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0204.html">David Huggins-Daines: "Re: compiling problem with egcs-1.03a"</a>
<li> <b>Reply:</b> <a href="0204.html">David Huggins-Daines: "Re: compiling problem with egcs-1.03a"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
<i>&gt;&gt;&gt;&gt;&gt; On Sun, 22 Nov 1998 15:24:27 +0100 (CET), Georg Huettenegger &lt;<a href="mailto:georg@mondoshawan.unix.cslab.tuwien.ac.at">georg@mondoshawan.unix.cslab.tuwien.ac.at</a>&gt; said:</i><br>
<p>
Georg&gt; hi everybody, i downloaded the new sane-1.00 and it does not<br>
Georg&gt; compile with my egcs-1.03a (from the redhat 5.2) on an intel<br>
Georg&gt; linux machine with the following message: egcs -c -g -O2<br>
Georg&gt; -Wall -DHAVE_CONFIG_H -I. -I. -I../include -I../include<br>
Georg&gt; -D_GNU_SOURCE -DPATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d<br>
Georg&gt; -DPATH_SANE_DATA_DIR=/usr/local/share -DV_MAJOR=1 -DV_MINOR=0<br>
Georg&gt; -DBACKEND_NAME=abaton -DLIBDIR=/usr/local/lib/sane -fPIC<br>
Georg&gt; -DPIC abaton.c abaton.c: In function<br>
Georg&gt; `sane_abaton_control_option': abaton.c:1116: incompatible<br>
Georg&gt; types in assignment make: *** [abaton.lo] Error 1<br>
<p>
Georg&gt; i fixed the problem by using the gcc-2.7.2.3 but i think<br>
Georg&gt; either egcs or sane should have a real problem with this<br>
Georg&gt; backend. perhaps somebody would like to investigate this<br>
Georg&gt; (which is not nice for 1.00).<br>
<p>
Here's a trivial fix (I'm guessing that it'll fix the problem):<br>
<p>
--- backend/abaton.c~ Sat Nov 21 18:54:14 1998<br>
+++ backend/abaton.c Sun Nov 22 09:42:23 1998<br>
@@ -1113,7 +1113,7 @@<br>
<br>
case OPT_Y_RESOLUTION:<br>
if (s-&gt;val[OPT_PREVIEW].w || s-&gt;val[OPT_RESOLUTION_BIND].w) {<br>
- s-&gt;val[OPT_X_RESOLUTION] = *(SANE_Word *)val;<br>
+ s-&gt;val[OPT_X_RESOLUTION].w = *(SANE_Word *)val;<br>
if (info)<br>
*info |= SANE_INFO_RELOAD_OPTIONS;<br>
}<br>
<p>
However, I think the real bug may be in egcs-1.03a. I thought ANSI C<br>
allows such assignments to the first member of a union (or is this<br>
supposed to be allowed for union initialization only?).<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="0202.html">David Mosberger-Tang: "Re: forwarded message from Richard Stallman"</a>
<li> <b>Previous message:</b> <a href="0200.html">Manuel Panea: "Announce: Canon driver extensions for 2700F"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0204.html">David Huggins-Daines: "Re: compiling problem with egcs-1.03a"</a>
<li> <b>Reply:</b> <a href="0204.html">David Huggins-Daines: "Re: compiling problem with egcs-1.03a"</a>
<!-- reply="end" -->
</ul>