bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SIGPOLL on Darwin


From: Reuben Thomas
Subject: Re: SIGPOLL on Darwin
Date: Tue, 31 Jan 2012 18:07:43 +0000

On 31 January 2012 15:51, Paul Eggert <address@hidden> wrote:
> On 01/31/2012 07:19 AM, Reuben Thomas wrote:
>> SIGPOLL seems to be unimplemented on Darwin
>
> I don't offhand see an easy way to implement it in Gnulib,
> so perhaps it's better that Gnulib doesn't define it.
> (Sorry, I don't know the context.)

I am interested in two things:

1. The symbol SIGPOLL.

2. The functionality around it.

The relevant bit of header says:

#if  (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE))#define
SIGPOLL 7       /* pollable event ([XSR] generated, not supported)
*/#else   /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */#define SIGIOT
SIGABRT /* compatibility */#define SIGEMT  7       /* EMT instruction
*/#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
(I haven't got the headers myself, this was in a bug report.)
I assume that not defining _DARWIN_C_SOURCE is not an option, hence
the only workaround would be to have gnulib define

#define SIGPOLL 7

or, as suggested in this thread

#define SIGPOLL SIGIO

But this would presumably create problems for code that assumed
SIGPOLL's existence meant that the relevant functionality (whatever
that is) is supported. I have no idea what "generated, not supported"
means above.

If anyone who actually knows about how Mac OS works would like to
comment, I'd be grateful; it'd be wonderful to see a solution in
gnulib.

> diff --git a/m4/extensions.m4 b/m4/extensions.m4
> index 0bfaef6..58280cf 100644
> --- a/m4/extensions.m4
> +++ b/m4/extensions.m4
> @@ -75,6 +75,10 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
>  #ifndef _GNU_SOURCE
>  # undef _GNU_SOURCE
>  #endif
> +/* Enable POSIX symbols on MacOS X.  */
> +#ifndef _POSIX_C_SOURCE
> +# undef _POSIX_C_SOURCE
> +#endif
>  /* Enable threading extensions on Solaris.  */
>  #ifndef _POSIX_PTHREAD_SEMANTICS
>  # undef _POSIX_PTHREAD_SEMANTICS

I don't know whether this has a downside; I don't use Mac OS.

-- 
http://rrt.sc3d.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]