[sane-devel] Re: sane-1.0.6 make-error concerning umax_pp - ongoing 8-(

Colin Walters walters@debian.org
Wed, 21 Nov 2001 13:22:50 -0500


stef <stef-listes@wanadoo.fr> writes:

> I finally found why the umax_pp backend fails to compile on PPC
> arch.  When no libc is found (ie no HAVE_SYS_IO_H is defined) we
> fall back to including asm/io.h , the kernel include holds the
> inb/out macros.  

Userspace can't do I/O on PowerPC, hence it is all #ifdef __KERNEL__.

Sane developers, could you please look at:

http://bugs.debian.org/sane-backends

and in particular, bugs #114579 and #118079?  #118079 is a separate
issue from this, but it should be addressed.

I have just done a non-maintainer upload of the Debian package of
sane-backends which applies the following hack:

--- sane-backends-1.0.6/backend/umax_pp_low.c	Tue Sep 18 00:57:51 2001
+++ sane-backends-1.0.6.debian/backend/umax_pp_low.c	Tue Nov 20 21:03:55 2001
@@ -58,7 +58,11 @@
 #include <linux/ppdev.h>
 #endif
 
-#if defined HAVE_SYS_IO_H && defined HAVE_IOPERM
+/* FIXME: Is this really what we want?  I don't think other
+   architectures have parallel ports... */
+#ifndef __i386__
+#define IO_SUPPORT_MISSING
+#elif defined HAVE_SYS_IO_H && defined HAVE_IOPERM
 # include <sys/io.h>		/* GNU libc based Linux */
 #elif HAVE_ASM_IO_H
 # include <asm/io.h>		/* older Linux */

Any opinions on this?  I know it is gross.