67cc1aaf8f
New with 1.0.21, released 2010-04-25: * New backends: kodak (Kodak i18xx), kvs1025 (Panasonic KV-S10xx), p5 (Primax PagePartner) * 224 more scanner models supported. * Many backends updated. * Improved compilation on uncommon platforms. * More consistent option naming. * Scanimage no longer writes image to tty. * Modern translation infrastructure. * Improved saned network daemon. * Internal SCSI, USB, threading, TCP & UDP code updates. * Updated HAL and udev support. * New sanei_magic image processing library. * Documentation updates. * Bugfixes.
49 lines
1.5 KiB
Text
49 lines
1.5 KiB
Text
$NetBSD: patch-ac,v 1.5 2010/09/19 15:06:18 wiz Exp $
|
|
|
|
--- sanei/sanei_ab306.c.orig 2010-04-05 13:18:05.000000000 +0000
|
|
+++ sanei/sanei_ab306.c
|
|
@@ -78,7 +78,7 @@ inb (u_long port)
|
|
#include "../include/sane/sanei.h"
|
|
#include "../include/sane/sanei_ab306.h"
|
|
|
|
-#if (defined(HAVE_IOPERM) || defined(__FreeBSD__)) && !defined(IO_SUPPORT_MISSING)
|
|
+#if (defined(HAVE_IOPERM) || defined(__FreeBSD__) || defined(__DragonFly__)) && !defined(IO_SUPPORT_MISSING)
|
|
|
|
#include <errno.h>
|
|
#include <fcntl.h>
|
|
@@ -99,7 +99,7 @@ inb (u_long port)
|
|
#define PORT_DEV "/dev/port"
|
|
#define AB306_CIO 0x379 /* control i/o port */
|
|
|
|
-#if defined(__FreeBSD__)
|
|
+#if defined(__FreeBSD__) || defined(__DragonFly__)
|
|
static int dev_io_fd = 0;
|
|
#endif
|
|
|
|
@@ -287,7 +287,7 @@ sanei_ab306_open (const char *dev, int *
|
|
|
|
status = sanei_ab306_get_io_privilege (i);
|
|
|
|
-#if defined(__FreeBSD__)
|
|
+#if defined(__FreeBSD__) || defined(__DragonFly__)
|
|
status = sanei_ab306_get_io_privilege (i);
|
|
if (status != SANE_STATUS_GOOD)
|
|
return status;
|
|
@@ -366,7 +366,7 @@ sanei_ab306_get_io_privilege (int fd)
|
|
{
|
|
if (port[fd].port_fd < 0)
|
|
{
|
|
-#if defined(__FreeBSD__)
|
|
+#if defined(__FreeBSD__) || defined(__DragonFly__)
|
|
if (dev_io_fd == 0)
|
|
dev_io_fd = open ("/dev/io", O_RDONLY);
|
|
if (dev_io_fd < 0)
|
|
@@ -517,7 +517,7 @@ sanei_ab306_exit (void)
|
|
/* power off the scanner: */
|
|
ab306_outb (port + i, port[i].base + 1, 0x00);
|
|
}
|
|
-#if defined(__FreeBSD)
|
|
+#if defined(__FreeBSD) || defined(__DragonFly__)
|
|
if (dev_io_fd >0)
|
|
close (dev_io_fd);
|
|
#endif /* defined(__FreeBSD__) */
|