httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sascha Schumann <>
Subject Re: Supporting non-UNIX98 sigwait in APR
Date Sat, 29 Apr 2000 23:47:18 GMT
On Sat, Apr 29, 2000 at 07:39:54PM -0400, Jeff Trawick wrote:
> I have that problem with OS/390, and I noticed with google-ing for man 
> pages that a few other systems have the old-style sigwait() as well.
> I had two autoconf-based solutions I was pondering:
> 1) see if I can compile an invocation with one parameter with the
>    proper header file included
>    I touched on the general theory behind this with a recent post
>    (look for "auto configuration and full function prototypes"), but
>    I'm not sure if this is safe and I didn't get any feedback on the
>    list.  The idea from Greg Ames I mentioned in a follow-up seems to
>    make it safe enough but I'm still not sure.

It should be safe, unless the compiler does not complain about
the wrong number of parameters. I'm pretty sure all do.

Once we have detected that, we define ap_sigwait:

#define ap_sigwait(a,b) ((*(b)=sigwait((a)))<0?-1:0)
#define ap_sigwait(a,b) sigwait((a),(b))

- Sascha

View raw message