Hi,
the good news is that umax_pp is now included into SANE. I just
committed your patch (sligthly modified) to the SANE CVS. Please test
it because I'm not sure if I didn't make any mistakes. I've put a
snapshot of current CVS at
http://www.meier-geinitz.de/sane/sane-cvs-2001-05-03.tar.gz.
Some details:
On Thu, May 03, 2001 at 07:01:23AM +0200, stef wrote:
> > Linking on Irix results in:
> >
> > gmake[1]: Entering directory /tmp/sane/sane-backends/tools'
> > cc -o umax_pp umax_pp.o ../backend/umax_pp_low.lo ../sanei/libsanei.a ../lib/liblib.a -lm
> > ld: WARNING 84: /usr/lib/libm.so is not used for resolving any symbol.
> > ld: ERROR 33: Unresolved text symbol "inb" -- 1st referenced by ../backend/umax_pp_low.lo.
> > ld: ERROR 33: Unresolved text symbol "outb" -- 1st referenced by ../backend/umax_pp_low.lo.
> > ld: ERROR 33: Unresolved text symbol "insb" -- 1st referenced by ../backend/umax_pp_low.lo.
> > ld: ERROR 33: Unresolved text symbol "outsb" -- 1st referenced by ../backend/umax_pp_low.lo.
> > ld: ERROR 33: Unresolved text symbol "insl" -- 1st referenced by ../backend/umax_pp_low.lo.
> > ld: ERROR 33: Unresolved text symbol "outsw" -- 1st referenced by ../backend/umax_pp_low.lo.
> > ld: INFO 152: Output file removed because of error.
> > gmake[1]: *** [umax_pp] Error 1
> >
> > With AIX similar errors occur.
> >
> > All these commands aren't defined for most platforms. SGI machines
> > maybe don't even have "ports". You must check if these commands are
> > available. Look at sanei/sanei_ab306.c or other parport backends for
> > how to do that.
>
> cut and pasted for inb/outb .... insl, insb, outsb and outsw were added
There were some remaining problems: In sanei_umax_pp_InitPort I had to
write an #else part around the outb/inb. Also AIX seems to have
sys/io.h, also, so I had to combine this test with HAVE_IOPERM. This
is a hack, maybe it's better to do it like in sanei/sanei_ab306.c.
> > Irix warnings when compiling (irix cc)
> > cfe: Warning 709: umax_pp.c, line 866: Incompatible pointer type assignment
> > free (devlist[0].sane.name);
> > ---------------------------^
> > cfe: Warning 709: umax_pp.c, line 880: Incompatible pointer type assignment
> > free (devlist[0].sane.model);
> > ---------------------------^
> > cfe: Warning 709: umax_pp.c, line 894: Incompatible pointer type assignment
> > free (devlist[0].sane.vendor);
> > ---------------------------^
> > cfe: Warning 709: umax_pp.c, line 925: Incompatible pointer type assignment
> > free (devlist[i].sane.name);
> > ---------------------------^
> > cfe: Warning 709: umax_pp.c, line 926: Incompatible pointer type assignment
> > free (devlist[i].sane.model);
> > ---------------------------^
> > cfe: Warning 709: umax_pp.c, line 927: Incompatible pointer type assignment
> > free (devlist[i].sane.vendor);
> > ---------------------------^
One idea is to make temorary char* for these names and assign them to
sane.vendor etc. when they are finally fixed. e.g. something like
devlist[i].vendor = strdup ...; free (devlist[i].vendor); ...
devlist[i].sane.vendor = devlist[i].vendor;
> > umax_pp.c: In function sane_umax_pp_init':
> > umax_pp.c:626: warning: cast discards qualifiers from pointer target type
> > umax_pp.c:645: warning: cast discards qualifiers from pointer target type
> > umax_pp.c:845: warning: cast discards qualifiers from pointer target type
> > umax_pp.c:859: warning: cast discards qualifiers from pointer target type
I removed these together with the test for whitespace at the end of
lines. This is done in sanei_config_read so it's not necessary to do
it here.
> > umax_pp.c:866: warning: passing arg 1 of free' discards qualifiers from pointer target type
> > umax_pp.c:873: warning: cast discards qualifiers from pointer target type
> > umax_pp.c:880: warning: passing arg 1 of free' discards qualifiers from pointer target type
> > umax_pp.c:887: warning: cast discards qualifiers from pointer target type
> > umax_pp.c:894: warning: passing arg 1 of free' discards qualifiers from pointer target type
> > umax_pp.c: In function sane_umax_pp_exit':
> > umax_pp.c:925: warning: passing arg 1 of free' discards qualifiers from pointer target type
> > umax_pp.c:926: warning: passing arg 1 of free' discards qualifiers from pointer target type
> > umax_pp.c:927: warning: passing arg 1 of free' discards qualifiers from pointer target type
> >
>
> This part is more tricky: these strings are SANE_String_Const type. But
> we want to change them (while parsing conf file). At least the artec and mustek_pp
> do the same (to be precise umax_pp does the same as mustek_pp).
> So we can't avoid messages like "cast discards qualifiers from pointer
> target type", unless we use a SANE_Device struct "copy" with no const char *,
> then assign it to 'real' SANE_Device struct, or change SANE_Device struc itself.
Exactly.
> What should I do ? I haven't dig very much, but since many backends
> do the same (grep'ing sane.name pop up many assignents), my personnal feeling
> is that changing SANE_Device is a better solution.
As this is in the SANE standard we won't change it (at least in SANE 1).
But these warnings are not that important. When you do some work on
your backend and find a nice way to remove them, it's ok. If there
isn't a nice way, just ignore them.
If you have CVS write access you can now update your backend whenever
you want. If you don't have it yet, ask Petter Reinholdtsen for access
(there is some information on his CVS page
http://www.student.uit.no/~pere/linux/sane/cvs-server.html).
Bye,
Henning
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
This archive was generated by hypermail 2b29 : Thu May 03 2001 - 13:06:03 PDT