Re: Build failure of libieee1284 on ia64, help needed
Hi Julien,
In the IA64 <sys/io.h> inb and outb are macros:
#define inb _inb
#define outb _outb
I renamed it's use of inb and outb to do_inb and do_outb to avoid this
clash.
Additionally outb_p doesn't exist. I don't think it should be necessary
on IA64 so I've just used outb. It seems to work okay now although I
don't have anything on my parallel port to test with.
Matt
--- libieee1284-0.2.3/src/access_io.c.orig 2002-10-12 19:42:34.000000000 +1000
+++ libieee1284-0.2.3/src/access_io.c 2002-10-12 19:59:12.000000000 +1000
@@ -131,7 +131,11 @@
{
#if defined(HAVE_LINUX) || defined(HAVE_CYGWIN_9X) || defined(HAVE_OBSD_I386) \
|| defined(HAVE_FBSD_I386)
+#ifdef __ia64__
+ outb (val, addr);
+#else
outb_p (val, addr);
+#endif
#elif defined(HAVE_SOLARIS)
struct iopbuf tmpbuf;
tmpbuf.port = addr;
@@ -230,8 +234,8 @@
port->fd = open ("/dev/port", O_RDWR | O_NOCTTY);
if (port->fd < 0)
return E1284_INIT;
- port->fn->inb = port_inb;
- port->fn->outb = port_outb;
+ port->fn->do_inb = port_inb;
+ port->fn->do_outb = port_outb;
break;
}
@@ -260,19 +264,19 @@
static int
read_data (struct parport_internal *port)
{
- return port->fn->inb (port, port->base);
+ return port->fn->do_inb (port, port->base);
}
static void
write_data (struct parport_internal *port, unsigned char reg)
{
- port->fn->outb (port, reg, port->base);
+ port->fn->do_outb (port, reg, port->base);
}
static int
read_status (struct parport_internal *port)
{
- return debug_display_status (port->fn->inb (port, port->base + 1) ^
+ return debug_display_status (port->fn->do_inb (port, port->base + 1) ^
S1284_INVERTED);
}
@@ -285,7 +289,7 @@
/* Deal with inversion issues. */
val ^= mask & C1284_INVERTED;
ctr = (ctr & ~mask) ^ val;
- port->fn->outb (port, ctr, port->base + 2);
+ port->fn->do_outb (port, ctr, port->base + 2);
port->ctr = ctr;
debug_frob_control (mask, val);
}
--- libieee1284-0.2.3/src/detect.h.orig 2002-10-12 20:14:07.000000000 +1000
+++ libieee1284-0.2.3/src/detect.h 2002-10-12 20:14:18.000000000 +1000
@@ -38,8 +38,8 @@
int (*claim) (struct parport_internal *port);
void (*release) (struct parport_internal *port);
- unsigned char (*inb) (struct parport_internal *port, unsigned long addr);
- void (*outb) (struct parport_internal *port, unsigned char val,
+ unsigned char (*do_inb) (struct parport_internal *port, unsigned long addr);
+ void (*do_outb) (struct parport_internal *port, unsigned char val,
unsigned long addr);
int (*get_irq_fd) (struct parport_internal *port);
On Sat, Oct 12, 2002 at 11:24:15AM +0200, Julien BLACHE wrote:
> [Please Cc me on replies]
>
> Hi,
>
> libieee1284 has some weird issues building on ia64, see
> <http://buildd.debian.org/fetch.php?&pkg=libieee1284&ver=0.2.3-1&arch=ia64&stamp=1034354997&file=log&as=raw>
>
> I have absolutely no idea about what's going on ; the same problem
> occurs with gcc 3.0/3.2.
>
> Please help !
>
> Thanks,
> JB.
>
> --
> Julien BLACHE <jblache@debian.org> | Debian, because code matters more
> Debian & GNU/Linux Developer | http://www.debian.org
> Public key available on <http://www.jblache.org> - KeyID: F5D6 5169
> GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169
>
>
> --
> To UNSUBSCRIBE, email to debian-ia64-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: