The AX_CXX_COMPILE_STDCXX* macros that were embedded in aclocal.m4
have been replaced with the versions found in the autoconf-archive
package from Debian 9.
The substitute completely ignores the fdtype argument and only works
correctly for S_IFSOCK values. This happened to be the only way the
function was invoked but for safety's sake this has been replaced by
a local implementation that does pretty much the same thing, without
the misleading bit.
Found courtesy of a [-Wunused-parameter] compiler warning on Alpine.
The readdir_r() using loop in sanei_scsi_find_devices() has been
modified to use readdir().
With the exception of sane_cancel(), the SANE API is not re-entrant.
The sanei_scsi_find_devices() function is referenced neither directly
nor indirectly from any of the sane_cancel() implementations so there
is no inherent need to use readdir_r().
The `#warning` directive is turned into an error by `-Werror`. The
directive triggers is guaranteed to trigger with __GNUC__ when no
parallel support is available. This would prevent strict CI builds.
Output a message with all compilers that understand the pragma. Those
that don't should ignore it, according to C99.
When libusb-1.0 is not found, libusb-0.1 will be tried. On BeOS and
OS2, nothing should have changed in terms of detection of USB support.
On all systems the --enable-libusb* flags are now ignored. Instead, the
--with-usb and --without-usb flags now control support. When neither is
given USB support will be enable if possible and disabled otherwise. If
--with-usb is requested but not possible, ./configure will fail. There
is no support to prefer libusb-0.1 over libusb-1.0.
The distclean target should only remove files that make creates. If
there are any that need taking care of, they should be added in on a
per file basis in the Makefile.am that creates it.
Several variables are considered "user variables" by the GNU Standards.
This means that the user can pass these to their ./configure and make
invocations as they see fit. These variables include CPPFLAGS, CFLAGS
and LDFLAGS.
This changeset pushes our use of these variables to the automake shadow
variables, AM_CPPFLAGS, AM_CFLAGS and AM_LDFLAGS, so that user variables
will no longer clobber flags required in order to build.
Here, we add a new env var (SANE_USB_WORKAROUND) to sanei_usb.c.
This allows end users to conditionally enable the workaround added
in commit 014b45d920. The default is
to not enable the workaround, because more recent Linux kernels no
longer seem to need it. Some users have even reported failure with
the workaround enabled.
Some parts of SANE used __FUNCTION__ while other parts used __func__.
Now, __func__ is used consistently throughout the SANE sources. This
fixes all occurrences of the following GCC warning:
warning: ISO C does not support '__FUNCTION__' predefined identifier
Various parts of SANE introduced their own compatibility macros for
old compilers that don't support __func__. Most of these definitions
are identical or have minor differences. This patch replaces them
with a single instance in the central header file for backends.
Up to now, on failure the sanei_magic_rotate function returned a
success status. This fixes the following GCC warning:
warning: variable 'ret' set but not used
The line variable is not (and cannot be) declared 'const'. The string
variable points to a location in line, hence it is safe to cast away
'const'ness of the sanei_config_skip_whitespace() return value.
Sample code that mimicks the offending code gave different run-time
results when compiled with gcc-4.9.2 and clang-3.5.0. Rewriting the
sample code so that results matched gcc-4.9.2 for both compilers was
used to determine how to "fix" the offending statement.
This commit adds support for (slide) scanners based
on Pacific Image Electronics (PIE) oem scan hardware.
It is known to match the following USB scanners
PIE PowerSlide 3600 Untested
PIE PowerSlide 3650 Untested
PIE PowerSlide 4000 Untested
PIE PowerSlide 5000 Untested
Reflecta CrystalScan 7200 Untested
Reflecta ProScan 7200 Untested
Reflecta DigitDia 4000 Untested
Reflecta DigitDia 5000 Untested
Reflecta DigitDia 6000 Ok
The backend is based on work by Jan Vleeshouwers and Michael Rickmann.
Special thanks to Stéphane Voltz for the code review.
Add pieusb to backend/Makefile.am
Add pieusb to doc/Makefile.am
Add missing sanei/sanei_ir.c, sanei/sanei_ir.h, adapt Makefile.am
configure.ac: Add 'pieusb' to ALL_BACKENDS
ChangeLog: Add pieusb as new backend
Mark infrared functions as internal: sane_ir_* -> sanei_ir_*
sanei/sanei_ir.c: fix memory leaks
pieusb: rename cmdGetMode and cmdSetScanHead
... to their sanei_pieusb_cmd_... equivalent
pieusb: rename definition_list_head to pieusb_definition_list_head
Add pieusb to AUTHORS
pieusb: copyright 2012-2015
pieusb: don't include sanei_thread.h
add calls to sanei_usb_set_altinterface in sanei_usb_close and
sanei_usb_clear_halt- hopefully work around USB3/xhci problems
in Linux. Also, remove some unused code, and fix debug messages.
This follows up on earlier USB3 fixes. It only addresses libusb-1.0
because there is no convenience API for libusb-0.1 to get the current
configuration.
This fixes USB3 issues for the epson and epson2 backends. Both these
backends already made sure to send an even number of reads and writes
but were affected nevertheless.
It also solves USB3 issues with the third party epkowa backend. This
one doesn't bother to ensure even counts of packets read and written.
It works fine when this fix is applied (and it no longer clears halts
w/o a stall condition). Note, there is no need to ensure even packet
counts.
libusb on my Linux box is returning EACCES error when invalid
permissions exist. Modify open to translate that into
SANE_STATUS_ECCESS_DENIED since that error description is
used for this case.
Modify sanei_usb_test.c to not treat access denied or busy
error codes as real failures since its expected to occur on
boxes that USB device is already claimed by another driver
and if that device uses default root only permissions.
Improving here means do not set LIBS/CFLAGS if library is not detected.
This prevents some unknown options based to ld when host is Linux and
target is mingw32/64. Further improvements are needed if one wants this
snmp support when cross compiling to really work.
Also, to make commit bisectable, updated all autofoo files using
'autoreconf -i -f' and repatching ltmain.sh.
Also, test-driver was missing from git repo but the Makefile.in
checked in expected it to exist.
- fixed a bug in sanei_constrain_value spotted by
viresh_shirol@yahoo.co.uk where range max was exceeded due to rounding
in quantization
- added test case for sane fixed values range
- move bus scanning for device to a new sanei_usb_scan_devices
- call this new function from sanei_usb_init to preserve current behaviour
- split bus device scanning into several smaller functions on a per scanning method
method basis
using backend debugging using SANE_DEBUG_xxx to be used for saned controlled
scanning when using socket activation. When only the socket is received we
use the existing code path.