Backends use a mixture of SANE_CURRENT_{MAJOR | MINOR} and V_{MAJOR |
MINOR} with all kind of permutations. I was confused by this and one
comment in pieusb.c tells me I was not alone. Some items in old
changelogs suggest to use the SANE_CURRENT_ macros in backends, so let's
switch to do that with the exception of net.c and dll.c. Done with:
$ find backend -name '*.[ch]' | xargs sed -i '/nearly every/ ! { s/\<V_M/SANE_CURRENT_M/g }'
$ git checkout backend/net.c backend/dll.c
And manually removing the comment from pieusb.c. Everything still builds
fine.
With the exception of use in three quotes as well as our inlcuded copy
of the GPL, all use of the Free Software Foundation's postal address
has been removed.
Re #320.
Certain backends do network scans even if the 'local_only'
parameter for 'sane_get_devices()' is true. Fix that.
Changes:
1. Modify 'sanei_configure_attach()' so that backend specific
data may be passed to the 'attach()' function.
2. Use this in certain backends to pass the value of the
'local_only' parameter so that network related activities
are only carried out when the value is false.
The u8_range and threshold_percentage_range constants have not been
used for anything ever since the backend's addition. They probable
ended up in the code as a result of copy-and-paste.
Traced source of conflicting connect() defines to p5
backend including libc.h header file. On OSX, this
includes socket.h. Since backend didn't really need
libc.h header and is not a networked backend, reverted
last fix and implement header based fix.
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
socket.h is being included on OSX currently and P5's
static connect is conflicting with socket.h's connect().
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>