[sane-devel] [PATCH] Port to OS X
paddy-hack at member.fsf.org
Sat Oct 17 04:35:38 UTC 2015
Sorry for the late follow-up.
Yurii Kolesnykov writes:
> Hi Olaf, thanks for your feedback.
> Sorry, I forgot to include this comment in previous email.
>> > /*
>> > * SANE types and defines
>> > */
>> > diff --git a/include/sane/sanei_backend.h b/include/sane/sanei_backend.h
>> > index 1b5afe2..982dedc 100644
>> > --- a/include/sane/sanei_backend.h
>> > +++ b/include/sane/sanei_backend.h
>> > @@ -96,7 +96,9 @@
>> > # undef SIG_SETMASK
>> > # endif
>> > +# ifndef __APPLE__
>> > # define sigset_t int
>> > +# endif
>> Can you explain what this is trying to fix? The sigset_t macro is
>> undefined a bit above this. If sigset_t is still visible to the
>> compiler, it wasn't a macro and the defines below will quite likely
>> break things.
> I had this error:
> In file included from epsonds-jpeg.c:18:
> In file included from ./epsonds.h:43:
> In file included from ../include/sane/sanei_usb.h:69:
> In file included from /usr/include/stdlib.h:65:
> In file included from /usr/include/sys/wait.h:109:
> In file included from /usr/include/sys/signal.h:154:
> /usr/include/sys/_types/_sigset_t.h:30:28: error: cannot combine with previous 'type-name' declaration specifier
> typedef __darwin_sigset_t sigset_t;
> ../include/sane/sanei_backend.h:99:33: note: expanded from macro 'sigset_t'
> # define sigset_t int
> 1 error generated.
Ok, so sigset_t wasn't a define.
I've dug up some info on __darwin_sigset_t and it seems to just be
a typedef for a 32 bit unsigned integer. In that case, the other signal
related defines in sanei_backend.h won't break.
However, I don't think that your fix is the right way to go about fixing
this. It is really something that configure should check for.
Feel free to keep using this patch yourself but I will not commit it to
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