pre-071.patch

Martin Huber (hu@garfield.m.isar.de)
Mon, 23 Feb 1998 21:02:19 +0100 (MET)

--Flock_of_Ostrich_337_000
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: xd1zkcHSik07wrdROGaeuw==

Could you please put these diffs in the revision 0.71:

- snapscan.c
a different include file
- sanei_ab306.c
Solaris X86 can't compile linux' parallel port stuff
- sanei_scsi.c
the lun should be or'ed to cdb[1]
- find-scanner.c
It was forgotten to change scg0:a to scg0a when this change
has been made to sanei_scsi

My hp scanner never returns busy, so I can't test your patch

--martin

--Flock_of_Ostrich_337_000
Content-Type: TEXT/plain; name="pre-071.patch"; charset=us-ascii; x-unix-mode=0640
Content-Description: pre-071.patch
Content-MD5: o1GKqVg/s0s0XR7FLEwOZw==

*** ./backend/snapscan.c.orig Thu Jan 29 06:02:19 1998
--- ./backend/snapscan.c Thu Feb 12 20:18:34 1998
***************
*** 55,61 ****
--- 55,65 ----
#include <sys/types.h>
#include <sys/stat.h>
#include <values.h>
+ #ifdef __sun
+ #include <limits.h>
+ #else
#include <posix1_lim.h>
+ #endif
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
*** ./sanei/sanei_ab306.c.orig Wed Dec 24 09:10:43 1997
--- ./sanei/sanei_ab306.c Thu Feb 5 06:52:36 1998
***************
*** 51,57 ****
# include <sys/io.h> /* use where available (glibc 2.x, for example) */
#elif HAVE_ASM_IO_H
# include <asm/io.h> /* ugly, but backwards compatible */
! #elif defined(__i386__) && defined (__GNUC__)

static __inline__ void
outb (u_char value, u_long port)
--- 51,57 ----
# include <sys/io.h> /* use where available (glibc 2.x, for example) */
#elif HAVE_ASM_IO_H
# include <asm/io.h> /* ugly, but backwards compatible */
! #elif defined(__i386__) && defined (__GNUC__) && ! defined (__sun)

static __inline__ void
outb (u_char value, u_long port)
*** ./sanei/sanei_scsi.c.orig Thu Feb 19 23:10:42 1998
--- ./sanei/sanei_scsi.c Thu Feb 19 23:20:06 1998
***************
*** 1378,1384 ****
/* use 2 second timeout when probing, 60 seconds otherwise: */
scmd.timeout = probing ? 2 : DEF_TIMEOUT;
memcpy (&scmd.cdb.g0_cdb.cmd, src, cdb_size);
! scmd.cdb.cmd_cdb[1] = fd_info[fd].lun << 5;
if (ioctl (fd, SCGIO_CMD, &scmd) < 0)
return SANE_STATUS_IO_ERROR;
if (dst_size)
--- 1378,1384 ----
/* use 2 second timeout when probing, 60 seconds otherwise: */
scmd.timeout = probing ? 2 : DEF_TIMEOUT;
memcpy (&scmd.cdb.g0_cdb.cmd, src, cdb_size);
! scmd.cdb.cmd_cdb[1] |= fd_info[fd].lun << 5;
if (ioctl (fd, SCGIO_CMD, &scmd) < 0)
return SANE_STATUS_IO_ERROR;
if (dst_size)
*** ./tools/find-scanner.c.orig Thu Feb 19 23:29:22 1998
--- ./tools/find-scanner.c Thu Feb 5 06:54:18 1998
***************
*** 340,353 ****
"/dev/gsc8", "/dev/gsc9", "/dev/gsc10", "/dev/gsc11",
"/dev/gsc12", "/dev/gsc13", "/dev/gsc14", "/dev/gsc15",
#elif defined(__sun)
! "/dev/scg0:0", "/dev/scg0:1", "/dev/scg0:2", "/dev/scg0:3",
! "/dev/scg0:4", "/dev/scg0:5", "/dev/scg0:6", "/dev/scg0:7",
! "/dev/scg1:0", "/dev/scg1:1", "/dev/scg1:2", "/dev/scg1:3",
! "/dev/scg1:4", "/dev/scg1:5", "/dev/scg1:6", "/dev/scg1:7",
! "/dev/scg2:0", "/dev/scg2:1", "/dev/scg2:2", "/dev/scg2:3",
! "/dev/scg2:4", "/dev/scg2:5", "/dev/scg2:6", "/dev/scg2:7",
"/dev/sg/0", "/dev/sg/1", "/dev/sg/2", "/dev/sg/3",
! "/dev/sg/4", "/dev/sg/5", "/dev/sg/6", "/dev/sg/7",
#endif
0
};
--- 340,353 ----
"/dev/gsc8", "/dev/gsc9", "/dev/gsc10", "/dev/gsc11",
"/dev/gsc12", "/dev/gsc13", "/dev/gsc14", "/dev/gsc15",
#elif defined(__sun)
! "/dev/scg0a", "/dev/scg0b", "/dev/scg0c", "/dev/scg0d",
! "/dev/scg0e", "/dev/scg0f", "/dev/scg0g",
! "/dev/scg1a", "/dev/scg1b", "/dev/scg1c", "/dev/scg1d",
! "/dev/scg1e", "/dev/scg1f", "/dev/scg1g",
! "/dev/scg2a", "/dev/scg2b", "/dev/scg2c", "/dev/scg2d",
! "/dev/scg2e", "/dev/scg2f", "/dev/scg2g",
"/dev/sg/0", "/dev/sg/1", "/dev/sg/2", "/dev/sg/3",
! "/dev/sg/4", "/dev/sg/5", "/dev/sg/6",
#endif
0
};

--Flock_of_Ostrich_337_000--

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com