[sane-devel] broken sane-config in sane-backends version 1.1.0

szukw000 at arcor.de szukw000 at arcor.de
Thu Mar 5 19:39:08 UTC 2009


on 1.1.0

>Chris Bagwell <chris at cnpbagwell.com> wrote:
>
>TODO2: I don't think that LIBS in most systems should really contain
>*ANY* value

I have compiled sane-backends-2009-03-02 with gcc-4.3.3 .

I have now changed tools/sane-config.in as follows:

line 15:
Change @DL_LIB@ to @DL_LIBS@ .

line 89 and line 91:
Remove @GPHOTO2_LDFLAGS@ .

NO change in 'acinclude.m4'.

Now '/usr/bin/sane-config' contains:

LIBS=" -ldl"


As xsane needs SANE_CAP_ALWAYS_SETTABLE in xsane-0.996/src/xsane-back-gtk.c,
I had changed:

--- include/sane/sane.h.orig	2009-03-01 20:41:13.000000000 +0100
+++ include/sane/sane.h	2009-03-01 20:41:41.000000000 +0100
@@ -112,6 +112,7 @@
 #define SANE_CAP_AUTOMATIC		(1 << 4)
 #define SANE_CAP_INACTIVE		(1 << 5)
 #define SANE_CAP_ADVANCED		(1 << 6)
+#define SANE_CAP_ALWAYS_SETTABLE    (1 << 7)
 
 #define SANE_OPTION_IS_ACTIVE(cap)	(((cap) & SANE_CAP_INACTIVE) == 0)
 #define SANE_OPTION_IS_SETTABLE(cap)	(((cap) & SANE_CAP_SOFT_SELECT) != 0)

>Olaf Meeuwissen <olaf.meeuwissen at avasys.jp> wrote:
>
>Please note that SANE_CAP_ALWAYS_SETTABLE is _not_ part of the current
>stable API

I found the value in sane-backends-1.0.19/include/sane/sane.h in line 111.
And I found the value in sane-backends-1.0.9/include/sane/sane.h in line 103.

Are all these versions _not_ part of the stable API ?

By the way, compiling sane-backends-2009-03-02 gcc-4.3.3 warned several times:

passing argument 1 of 'free' discards qualifiers from pointer target type

Visiting the reported lines I found that the

SANE_Device.{name,vender,model}

were freed although they are 'SANE_String_Const'. Is it correct to free 
constants? A list of files is shown below.

winfried

sane-backends-2009-03-02:
-------------------------
coolscan3.c:3106
epjitsu.c:3971
epjitsu.c:3974
epjitsu.c:3977
genesys.c:5536
hp4200.c:2437
rts8891.c:2165
rts8891.c:2168
rts8891.c:2169
umax_pp.c:1002
umax_pp.c:1003
umax_pp.c:1004


Erwischt! Bei Arcor sehen Sie die besten Promi-Bilder riesengroß und in Top-Qualität. Hier finden Sie die schönsten Schnappschüsse auf dem roten Teppich, lernen die Frauen des Womanizers Boris Becker kennen und schauen den Royals ins Wohnzimmer. Viel Spaß auf Ihrer virtuellen Reise durch die Welt der Stars und Sternchen: http://vip.arcor.de.



More information about the sane-devel mailing list