The fileno() is only available if its feature test macro passes. The
various symbols are defined appropriately in ../include/sane/config.h
during configuration of the build.
If the ICC profile added does not match the colour format of the
image, libpng will abort. This can leave the scanner motors in an
incorrect state and possibly cause permanent damage.
This cuts out some duplicate code, and enables us to reuse this
logic for PNG, JPEG, and any other future output format.
sanei_load_icc_profile also allows us to know that an ICC profile
file is not long enough before we start to write it to the output;
this should prevent poorly-written software from overflowing into
image data when they read the bad profile based on its length.
This ought to get rid of the last empty compilation unit warnings. This
merges libfelib.la with liblib.la. The former was always used together
with the latter. The latter was only ever used without the former when
linking backends and tools.
Tools might want to use the getopt functions, backends might just want
to use MD5.
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.
This gets rid of a number of obsoleted macros and replaces RETSIGTYPE
with a void literal which can be assumed for C89 and later.
This changeset was prepared using autoupdate and modified to get rid of
whitespace and doubled [] changes. Changes to acinclude.m4 were added
by hand.
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.
The AC_SUBST and PKG_CHECK_MODULE invocations in configure.ac as well as
acinclude.m4 are sufficient to trigger automake to insert initialization
logic for the variables these introduce. There is no need to do this by
hand. Wherever these values are needed, it is better to use a variable.
This allows for one-off overrides on the make command-line (without the
need to run ./configure) for one thing.
This should fix [-Wstrict-aliasing] compiler warnings on those systems
where the IN6_IS_ADDR_LOOPBACK and IN6_IS_ADDR_V4MAPPED macros exist.
POSIX.1-2001 states that they shall be defined in netinit/in.h so most
systems will probably have them.