patch-ac 1.1 KB

12345678910111213141516171819202122232425262728
  1. $NetBSD: patch-ac,v 1.1.1.1 2002/07/23 12:07:45 agc Exp $
  2. --- include/isapnp/pnp.h Thu Apr 12 11:51:19 2001
  3. +++ include/isapnp/pnp.h Mon Jul 22 07:51:51 2002
  4. @@ -33,13 +33,23 @@
  5. #else /* !_OS2_ && !__DJGPP__ */
  6. #ifdef DEBUG
  7. static int x;
  8. +#if defined(__NetBSD__) && defined(HAVE_LIBI386)
  9. +#define ADDRESS(x) (outb(ADDRESS_ADDR, x), printf("\nAddress: %04x", x))
  10. +#define WRITE_DATA(x) (outb(WRITEDATA_ADDR, x), printf(" WR(%02x)", x & 0xff))
  11. +#else
  12. #define ADDRESS(x) (outb(x, ADDRESS_ADDR), printf("\nAddress: %04x", x))
  13. #define WRITE_DATA(x) (outb(x, WRITEDATA_ADDR), printf(" WR(%02x)", x & 0xff))
  14. +#endif
  15. #define READ_DATA (x = inb(read_port), printf(" RD(%02x)", x & 0xff), x)
  16. #define READ_IOPORT(p) (x = inb(p), printf(" [%04x](%02x)", p, x & 0xff), x)
  17. #else /* !DEBUG */
  18. +#if defined(__NetBSD__) && defined(HAVE_LIBI386)
  19. +#define ADDRESS(x) outb(ADDRESS_ADDR, x)
  20. +#define WRITE_DATA(x) outb(WRITEDATA_ADDR, x)
  21. +#else
  22. #define ADDRESS(x) outb(x, ADDRESS_ADDR)
  23. #define WRITE_DATA(x) outb(x, WRITEDATA_ADDR)
  24. +#endif
  25. #define READ_DATA inb(read_port)
  26. #define READ_IOPORT(p) inb(p)
  27. #endif /* !DEBUG */