[sane-devel] [PATCH] Port to OS X

Luiz Angelo Daros de Luca luizluca at gmail.com
Sat Oct 17 04:46:36 UTC 2015


Olaf and Yurii,

The sys/type.h problem is the same I face while compiling with musl instead
of glibc.
There are just some files that miss it. I have a patch for them but it
still misses the ifdef around it.
Check the other patches that might easy your port.

https://github.com/openwrt/packages/blob/master/utils/sane-backends/patches/

Regards,

Em sáb, 17 de out de 2015 01:36, Olaf Meeuwissen <paddy-hack at member.fsf.org>
escreveu:

> Hi Yurii,
>
> 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[1] info[2] 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.
>
>  [1] http://fxr.watson.org/fxr/ident?v=xnu-792;i=__darwin_sigset_t
>  [2]
> https://www.opensource.apple.com/source/xnu/xnu-792.6.56/bsd/sys/_types.h
>
> 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
> Alioth's master.
>
> Hope this helps,
> --
> Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
> Support Free Software               Support the Free Software Foundation
> https://my.fsf.org/donate                        https://my.fsf.org/join
>  GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
>
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>              to sane-devel-request at lists.alioth.debian.org
>
-- 

Luiz Angelo Daros de Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20151017/c539dde5/attachment.html>


More information about the sane-devel mailing list