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.