This function needs to have the same number of arguments as any other
functions passed to sanei_w_array() via its w_element argument, i.e.
sanei_w_char and sanei_w_word, in the w_option_value() implementation
in sanei/sanei_net.c.
Fixes [-Werror=cast-function-type] compiler warning.
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.