kopia lustrzana https://gitlab.com/sane-project/backends
Missed one...
rodzic
9f059ae1cd
commit
ac9ec0ff1c
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2004-06-20 Mattias Ellert <mattias.ellert@tsl.uu.se>
|
||||
* aclocal.m4, configure, sane/config.h.in, backend/Makefile.in,
|
||||
backend/agfafocus.c, backend/artec_eplus48u.c, backend/avision.c,
|
||||
backend/coolscan.c, backend/fujitsu.c, backend/pie.c,
|
||||
backend/plustek.c, backend/plustek_pp.c, backend/sp15c.c,
|
||||
backend/tamarack.c, backend/u12.c
|
||||
* Fixing bug #300602 for the following backends: agfafocus,
|
||||
artec_eplus48u, avision, coolscan, fujitsu, pie, plustek,
|
||||
plustek_pp, sp15c, tamarack and u12
|
||||
* Migrating the avision backend to sanei_threads (bug #300631)
|
||||
|
||||
2004-06-19 Mattias Ellert <mattias.ellert@tsl.uu.se>
|
||||
* backend/gt68xx.c po/sane-backends.bg.po po/sane-backends.cs.po
|
||||
po/sane-backends.da.po po/sane-backends.de.po
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# generated automatically by aclocal 1.7.5 -*- Autoconf -*-
|
||||
# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -6359,30 +6359,3 @@ SED=$lt_cv_path_SED
|
|||
AC_MSG_RESULT([$SED])
|
||||
])
|
||||
|
||||
# isc-posix.m4 serial 2 (gettext-0.11.2)
|
||||
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
|
||||
|
||||
# This test replaces the one in autoconf.
|
||||
# Currently this macro should have the same name as the autoconf macro
|
||||
# because gettext's gettext.m4 (distributed in the automake package)
|
||||
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
|
||||
# give these diagnostics:
|
||||
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
|
||||
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
|
||||
|
||||
undefine([AC_ISC_POSIX])
|
||||
|
||||
AC_DEFUN([AC_ISC_POSIX],
|
||||
[
|
||||
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
|
||||
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
|
||||
]
|
||||
)
|
||||
|
||||
|
|
|
@ -284,6 +284,7 @@ libsane-avision.la: ../sanei/sanei_config2.lo
|
|||
libsane-avision.la: ../sanei/sanei_constrain_value.lo
|
||||
libsane-avision.la: ../sanei/sanei_scsi.lo
|
||||
libsane-avision.la: ../sanei/sanei_usb.lo
|
||||
libsane-avision.la: ../sanei/sanei_thread.lo
|
||||
libsane-bh.la: ../sanei/sanei_config2.lo
|
||||
libsane-bh.la: ../sanei/sanei_constrain_value.lo
|
||||
libsane-bh.la: ../sanei/sanei_scsi.lo
|
||||
|
|
|
@ -1796,6 +1796,9 @@ reader_process (void *scanner)
|
|||
|
||||
sigfillset (&ignore_set);
|
||||
sigdelset (&ignore_set, SIGTERM);
|
||||
#if defined (__APPLE__) && defined (__MACH__)
|
||||
sigdelset (&ignore_set, SIGUSR2);
|
||||
#endif
|
||||
sigprocmask (SIG_SETMASK, &ignore_set, 0);
|
||||
|
||||
memset (&act, 0, sizeof (act));
|
||||
|
|
|
@ -3405,6 +3405,9 @@ reader_process (void * data)
|
|||
sigfillset (&ignore_set);
|
||||
sigdelset (&ignore_set, SIGTERM);
|
||||
sigdelset (&ignore_set, SIGUSR1);
|
||||
#if defined (__APPLE__) && defined (__MACH__)
|
||||
sigdelset (&ignore_set, SIGUSR2);
|
||||
#endif
|
||||
sigprocmask (SIG_SETMASK, &ignore_set, 0);
|
||||
|
||||
memset (&act, 0, sizeof (act));
|
||||
|
|
|
@ -574,7 +574,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
|
@ -583,9 +582,7 @@
|
|||
#include <sane/sane.h>
|
||||
#include <sane/sanei.h>
|
||||
#include <sane/saneopts.h>
|
||||
#ifdef HAVE_OS2_H
|
||||
#include <sane/sanei_thread.h>
|
||||
#endif
|
||||
#include <sane/sanei_scsi.h>
|
||||
#include <sane/sanei_usb.h>
|
||||
#include <sane/sanei_config.h>
|
||||
|
@ -3906,8 +3903,8 @@ do_eof (Avision_Scanner *s)
|
|||
}
|
||||
|
||||
/* join our processes - without a wait() you will produce defunct
|
||||
childs */
|
||||
wait (&exit_status);
|
||||
children */
|
||||
sanei_thread_waitpid (s->reader_pid, &exit_status);
|
||||
|
||||
s->reader_pid = 0;
|
||||
|
||||
|
@ -3927,8 +3924,8 @@ do_cancel (Avision_Scanner* s)
|
|||
int exit_status;
|
||||
|
||||
/* ensure child knows it's time to stop: */
|
||||
kill (s->reader_pid, SIGTERM);
|
||||
while (wait (&exit_status) != s->reader_pid);
|
||||
sanei_thread_kill (s->reader_pid);
|
||||
sanei_thread_waitpid (s->reader_pid, &exit_status);
|
||||
s->reader_pid = 0;
|
||||
}
|
||||
|
||||
|
@ -4233,12 +4230,18 @@ init_options (Avision_Scanner* s)
|
|||
the scanner state cannot be updated). */
|
||||
|
||||
static int
|
||||
reader_process (Avision_Scanner* s, int fd)
|
||||
reader_process (void *data)
|
||||
{
|
||||
struct Avision_Scanner *s = (struct Avision_Scanner *) data;
|
||||
int fd = s->reader_fds;
|
||||
|
||||
Avision_Device* dev = s->hw;
|
||||
|
||||
SANE_Status status;
|
||||
sigset_t sigterm_set;
|
||||
sigset_t ignore_set;
|
||||
struct SIGACTION act;
|
||||
|
||||
FILE* fp;
|
||||
|
||||
/* the complex params */
|
||||
|
@ -4265,6 +4268,18 @@ reader_process (Avision_Scanner* s, int fd)
|
|||
|
||||
DBG (3, "reader_process:\n");
|
||||
|
||||
if (sanei_thread_is_forked()) close (s->pipe);
|
||||
|
||||
sigfillset (&ignore_set);
|
||||
sigdelset (&ignore_set, SIGTERM);
|
||||
#if defined (__APPLE__) && defined (__MACH__)
|
||||
sigdelset (&ignore_set, SIGUSR2);
|
||||
#endif
|
||||
sigprocmask (SIG_SETMASK, &ignore_set, 0);
|
||||
|
||||
memset (&act, 0, sizeof (act));
|
||||
sigaction (SIGTERM, &act, 0);
|
||||
|
||||
sigemptyset (&sigterm_set);
|
||||
sigaddset (&sigterm_set, SIGTERM);
|
||||
|
||||
|
@ -4604,6 +4619,7 @@ sane_init (SANE_Int* version_code, SANE_Auth_Callback authorize)
|
|||
|
||||
/* must come first */
|
||||
sanei_usb_init ();
|
||||
sanei_thread_init ();
|
||||
|
||||
if (version_code)
|
||||
*version_code = SANE_VERSION_CODE (V_MAJOR, V_MINOR, BACKEND_BUILD);
|
||||
|
@ -5263,21 +5279,6 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters* params)
|
|||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
|
||||
#ifdef HAVE_OS2_H
|
||||
/*
|
||||
* reader thread for OS/2: need a wrapper, because threads can have
|
||||
* only one parameter.
|
||||
*/
|
||||
static void
|
||||
os2_reader_process (void *data)
|
||||
{
|
||||
struct Avision_Scanner *scanner = (struct Avision_Scanner *) data;
|
||||
|
||||
DBG (1, "reader_process: thread started\n");
|
||||
reader_process (scanner, scanner->reader_fds);
|
||||
}
|
||||
#endif
|
||||
|
||||
SANE_Status
|
||||
sane_start (SANE_Handle handle)
|
||||
{
|
||||
|
@ -5442,36 +5443,13 @@ sane_start (SANE_Handle handle)
|
|||
return SANE_STATUS_IO_ERROR;
|
||||
}
|
||||
|
||||
#ifndef HAVE_OS2_H
|
||||
s->reader_pid = fork ();
|
||||
#else
|
||||
/* create reader routine as new process or thread */
|
||||
s->pipe = fds[0];
|
||||
s->reader_fds = fds[1];
|
||||
s->reader_pid = sanei_thread_begin (os2_reader_process, (void *) s);
|
||||
#endif
|
||||
s->reader_pid = sanei_thread_begin (reader_process, (void *) s);
|
||||
|
||||
if (s->reader_pid == 0) { /* if child */
|
||||
sigset_t ignore_set;
|
||||
struct SIGACTION act;
|
||||
|
||||
close (fds [0] );
|
||||
|
||||
sigfillset (&ignore_set);
|
||||
sigdelset (&ignore_set, SIGTERM);
|
||||
sigprocmask (SIG_SETMASK, &ignore_set, 0);
|
||||
|
||||
memset (&act, 0, sizeof (act));
|
||||
sigaction (SIGTERM, &act, 0);
|
||||
|
||||
/* don't use exit() since that would run the atexit() handlers... */
|
||||
_exit (reader_process (s, fds[1] ) );
|
||||
}
|
||||
if (sanei_thread_is_forked()) close (s->reader_fds);
|
||||
|
||||
#ifndef HAVE_OS2_H
|
||||
close (fds[1]);
|
||||
#endif
|
||||
s->pipe = fds [0];
|
||||
|
||||
return SANE_STATUS_GOOD;
|
||||
|
||||
stop_scanner_and_return:
|
||||
|
|
|
@ -296,9 +296,7 @@ typedef struct Avision_Scanner
|
|||
Avision_Connection av_con;
|
||||
|
||||
pid_t reader_pid; /* process id of reader */
|
||||
#ifdef HAVE_OS2_H
|
||||
int reader_fds; /* OS/2: pipe write handler for reader */
|
||||
#endif
|
||||
int reader_fds; /* pipe write handler for reader */
|
||||
int pipe; /* pipe to reader process */
|
||||
int line; /* current line number during scan */
|
||||
|
||||
|
|
|
@ -2555,6 +2555,9 @@ reader_process (void *data )
|
|||
|
||||
sigfillset ( &ignore_set );
|
||||
sigdelset ( &ignore_set, SIGTERM );
|
||||
#if defined (__APPLE__) && defined (__MACH__)
|
||||
sigdelset ( &ignore_set, SIGUSR2 );
|
||||
#endif
|
||||
sigprocmask( SIG_SETMASK, &ignore_set, 0 );
|
||||
|
||||
memset (&act, 0, sizeof (act));
|
||||
|
|
|
@ -5075,6 +5075,9 @@ reader_process (void *s)
|
|||
|
||||
sigfillset (&ignore_set);
|
||||
sigdelset (&ignore_set, SIGTERM);
|
||||
#if defined (__APPLE__) && defined (__MACH__)
|
||||
sigdelset (&ignore_set, SIGUSR2);
|
||||
#endif
|
||||
sigprocmask (SIG_SETMASK, &ignore_set, 0);
|
||||
|
||||
sigemptyset (&sigterm_set);
|
||||
|
|
|
@ -2818,6 +2818,9 @@ reader_process ( void *data ) /* executed as a child process */
|
|||
|
||||
sigfillset (&ignore_set);
|
||||
sigdelset (&ignore_set, SIGTERM);
|
||||
#if defined (__APPLE__) && defined (__MACH__)
|
||||
sigdelset (&ignore_set, SIGUSR2);
|
||||
#endif
|
||||
sigprocmask (SIG_SETMASK, &ignore_set, 0);
|
||||
|
||||
memset (&act, 0, sizeof (act));
|
||||
|
|
|
@ -394,6 +394,9 @@ static int reader_process( void *args )
|
|||
|
||||
sigfillset ( &ignore_set );
|
||||
sigdelset ( &ignore_set, SIGTERM );
|
||||
#if defined (__APPLE__) && defined (__MACH__)
|
||||
sigdelset ( &ignore_set, SIGUSR2 );
|
||||
#endif
|
||||
sigprocmask( SIG_SETMASK, &ignore_set, 0 );
|
||||
|
||||
memset ( &act, 0, sizeof (act));
|
||||
|
|
|
@ -387,6 +387,9 @@ static int reader_process( void *args )
|
|||
|
||||
sigfillset ( &ignore_set );
|
||||
sigdelset ( &ignore_set, SIGTERM );
|
||||
#if defined (__APPLE__) && defined (__MACH__)
|
||||
sigdelset ( &ignore_set, SIGUSR2 );
|
||||
#endif
|
||||
sigprocmask( SIG_SETMASK, &ignore_set, 0 );
|
||||
|
||||
memset ( &act, 0, sizeof (act));
|
||||
|
|
|
@ -45,6 +45,9 @@ static const char RCSid[] = "$Header$";
|
|||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.9 2004/06/20 00:34:10 ellert-guest
|
||||
* Missed one...
|
||||
*
|
||||
* Revision 1.8 2004/05/29 10:27:47 hmg-guest
|
||||
* Fixed the fix of the sanei_thread fix (from Mattias Ellert).
|
||||
*
|
||||
|
@ -1946,6 +1949,9 @@ reader_process (void *data)
|
|||
|
||||
sigfillset (&ignore_set);
|
||||
sigdelset (&ignore_set, SIGTERM);
|
||||
#if defined (__APPLE__) && defined (__MACH__)
|
||||
sigdelset (&ignore_set, SIGUSR2);
|
||||
#endif
|
||||
sigprocmask (SIG_SETMASK, &ignore_set, 0);
|
||||
|
||||
memset (&act, 0, sizeof (act));
|
||||
|
|
|
@ -828,6 +828,9 @@ reader_process (void *scanner)
|
|||
|
||||
sigfillset (&ignore_set);
|
||||
sigdelset (&ignore_set, SIGTERM);
|
||||
#if defined (__APPLE__) && defined (__MACH__)
|
||||
sigdelset (&ignore_set, SIGUSR2);
|
||||
#endif
|
||||
sigprocmask (SIG_SETMASK, &ignore_set, 0);
|
||||
|
||||
memset (&act, 0, sizeof (act));
|
||||
|
|
|
@ -320,6 +320,9 @@ static int reader_process( void *args )
|
|||
|
||||
sigfillset ( &ignore_set );
|
||||
sigdelset ( &ignore_set, SIGTERM );
|
||||
#if defined (__APPLE__) && defined (__MACH__)
|
||||
sigdelset ( &ignore_set, SIGUSR2 );
|
||||
#endif
|
||||
sigprocmask( SIG_SETMASK, &ignore_set, 0 );
|
||||
|
||||
cancelRead = SANE_FALSE;
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -34,6 +34,9 @@
|
|||
/* Define to 1 if you have the <asm/io.h> header file. */
|
||||
#undef HAVE_ASM_IO_H
|
||||
|
||||
/* Define to 1 if you have the <asm/types.h> header file. */
|
||||
#undef HAVE_ASM_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the `atexit' function. */
|
||||
#undef HAVE_ATEXIT
|
||||
|
||||
|
@ -76,6 +79,9 @@
|
|||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define to 1 if you have the `gp_camera_init' function. */
|
||||
#undef HAVE_GP_CAMERA_INIT
|
||||
|
||||
/* Define to 1 if you have the <gscdds.h> header file. */
|
||||
#undef HAVE_GSCDDS_H
|
||||
|
||||
|
@ -269,6 +275,9 @@
|
|||
/* Define to 1 if you have the <sys/hw.h> header file. */
|
||||
#undef HAVE_SYS_HW_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/io.h> header file. */
|
||||
#undef HAVE_SYS_IO_H
|
||||
|
||||
|
|
|
@ -5444,7 +5444,7 @@ sanei_scsi_find_devices (const char *findvendor, const char *findmodel,
|
|||
return returnValue;
|
||||
}
|
||||
|
||||
SANE_Status
|
||||
static SANE_Status
|
||||
sanei_scsi_cmd2_stuc_api (int fd,
|
||||
const void *cmd, size_t cmd_size,
|
||||
const void *src, size_t src_size,
|
||||
|
|
Ładowanie…
Reference in New Issue