diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-05-24 21:03:56 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-05-24 21:03:56 +0200 |
commit | 58912f68c2489bcee787599837447e0d64dfd61a (patch) | |
tree | dda50aadde35fe152da1a8d50769987ace0f1496 /sanei/sanei_ab306.c | |
parent | cfd27ef2ad8b005fd47ab41ef29b71d9e3d48201 (diff) |
New upstream version 1.0.27upstream/1.0.27
Diffstat (limited to 'sanei/sanei_ab306.c')
-rw-r--r-- | sanei/sanei_ab306.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sanei/sanei_ab306.c b/sanei/sanei_ab306.c index c663d38..898acf6 100644 --- a/sanei/sanei_ab306.c +++ b/sanei/sanei_ab306.c @@ -81,7 +81,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> @@ -102,7 +102,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 @@ -290,7 +290,7 @@ sanei_ab306_open (const char *dev, int *fdp) 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; @@ -369,7 +369,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) @@ -461,7 +461,6 @@ sanei_ab306_rdata (int fd, int planes, SANE_Byte * buf, int lines, int bpl) { Port *p = port + fd; int lcnt, pcnt, bcnt, xmax; - SANE_Byte *lsave_bp; int nstat; DBG(2, "sanei_ab306_rdata: start\n"); @@ -471,7 +470,6 @@ sanei_ab306_rdata (int fd, int planes, SANE_Byte * buf, int lines, int bpl) /* the lines-loop: */ for (lcnt = 0; lcnt < lines; ++lcnt) { - lsave_bp = buf; /* the planes-loop: */ for (pcnt = 0; pcnt < planes; ++pcnt) { @@ -520,7 +518,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__) */ |