[sane-devel] Portbility problems with sane 1.0.25
paddy-hack at member.fsf.org
Tue Oct 20 13:11:56 UTC 2015
Luiz Angelo Daros de Luca writes:
> Thanks for the new release! It merged most of the patches I kept in order
> to compile for OpenWRT. However, I still faced some new and old problems:
> a) backend/pieusb_buffer.c (most of the problems)
This file was only added a good month before the release, so, yes, there
are probably a few portability glitches. Could you file bug reports with
Alioth for each of these issues so we won't forget?
> a.1) it uses mkostemp without checking its presence.
> a.2) le16toh is always redefined, which gives me a "redefined warning".
> a.3) if mmap is not found, it generates a compile error
With regard to
> b) missing includes for sys/types.h (uchar and ulong)
> This is an old problem still not fixed.
This will pop up everytime someone uses these types because, IMHO, the
./configure jobs only does half a job and leaves everyone in the dark as
to whether you may need to include <sys/types.h>.
> Each problematic file might need something like:
> #if defined(HAVE_SYS_TYPES_H)
> # include <sys/types.h>
And then you may still have a problem is HAVE_SYS_TYPES_H is undefined.
Is using an ill-defined convenience typedef (or #define, who knows?) to
save a couple of keystrokes worth this kind of trouble?
> which is already used in some files
Some? That's an understatement ;-)
> or it could be added to sane/config.h (bruteforce solution).
I don't like that brute force approach. I'm inclined to use some brute
force `sed` instead ;-)
Hope this helps,
Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27
Support Free Software Support the Free Software Foundation
GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9
More information about the sane-devel