Quantcast

[PATCH] Port to OS X

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] Port to OS X

Yurii Kolesnykov
Signed-off-by: Yurii Kolesnykov <[hidden email]>
---
 backend/epsonds-io.c         |  4 ++++
 include/sane/sanei_backend.h | 10 +++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/backend/epsonds-io.c b/backend/epsonds-io.c
index 28bacfc..c0bdc28 100644
--- a/backend/epsonds-io.c
+++ b/backend/epsonds-io.c
@@ -20,6 +20,10 @@
 #include "epsonds.h"
 #include "epsonds-io.h"
 
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
 size_t eds_send(epsonds_scanner *s, void *buf, size_t length, SANE_Status *status)
 {
  DBG(32, "%s: size = %lu\n", __func__, (u_long) length);
diff --git a/include/sane/sanei_backend.h b/include/sane/sanei_backend.h
index 1b5afe2..cf37cb3 100644
--- a/include/sane/sanei_backend.h
+++ b/include/sane/sanei_backend.h
@@ -68,8 +68,13 @@
 
 /* Just enough backwards compatibility that we get by in the backends
    without making handstands.  */
+
+# define sigset_t               int
+# endif
 # ifdef sigset_t
-#  undef sigset_t
+#  ifndef __APPLE__
+#   undef sigset_t
+#  endif
 # endif
 # ifdef sigemptyset
 #  undef sigemptyset
@@ -96,7 +101,10 @@
 #  undef SIG_SETMASK
 # endif
 
+# ifndef __APPLE__
 # define sigset_t               int
+# endif
+
 # define sigemptyset(set)       do { *(set) = 0; } while (0)
 # define sigfillset(set)        do { *(set) = ~0; } while (0)
 # define sigaddset(set,signal)  do { *(set) |= sigmask (signal); } while (0)
--
2.6.1


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] Port to OS X

Olaf Meeuwissen-4
Hi Yurii,

Yurii Kolesnykov writes:

> Signed-off-by: Yurii Kolesnykov <[hidden email]>
> ---
>  backend/epsonds-io.c         |  4 ++++
>  include/sane/sanei_backend.h | 10 +++++++++-
>  2 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/backend/epsonds-io.c b/backend/epsonds-io.c
> index 28bacfc..c0bdc28 100644
> --- a/backend/epsonds-io.c
> +++ b/backend/epsonds-io.c
> @@ -20,6 +20,10 @@
>  #include "epsonds.h"
>  #include "epsonds-io.h"
>  
> +#ifdef HAVE_SYS_TYPES_H
> +#include <sys/types.h>
> +#endif
> +
>  size_t eds_send(epsonds_scanner *s, void *buf, size_t length, SANE_Status *status)
>  {
>   DBG(32, "%s: size = %lu\n", __func__, (u_long) length);

This is for u_long only, it seems.  I've pushed a fix for this.

> diff --git a/include/sane/sanei_backend.h b/include/sane/sanei_backend.h
> index 1b5afe2..cf37cb3 100644
> --- a/include/sane/sanei_backend.h
> +++ b/include/sane/sanei_backend.h
> @@ -68,8 +68,13 @@
>  
>  /* Just enough backwards compatibility that we get by in the backends
>     without making handstands.  */
> +
> +# define sigset_t               int
> +# endif
>  # ifdef sigset_t
> -#  undef sigset_t
> +#  ifndef __APPLE__
> +#   undef sigset_t
> +#  endif
>  # endif
>  # ifdef sigemptyset
>  #  undef sigemptyset
> @@ -96,7 +101,10 @@
>  #  undef SIG_SETMASK
>  # endif
>  
> +# ifndef __APPLE__
>  # define sigset_t               int
> +# endif
> +
>  # define sigemptyset(set)       do { *(set) = 0; } while (0)
>  # define sigfillset(set)        do { *(set) = ~0; } while (0)
>  # define sigaddset(set,signal)  do { *(set) |= sigmask (signal); } while (0)

Hmm, this breaks compilation.  Your changeset introduces three #endif's
but only two #if*'s.  This leads to an "#endif without #if" error.
As mentioned in my other posted, I will not push this to Alioth.

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: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Loading...