apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Jones" <oscare...@gmail.com>
Subject Re: Compile failure in apr/threadproc/unix/thread.c
Date Tue, 23 Jan 2007 20:39:57 GMT
Yes, +1

On 1/16/07, Jeff Trawick <trawick@gmail.com> wrote:
>
> On 1/16/07, David Jones <oscaremma@gmail.com> wrote:
>
> > Problem 2:
> > Constants PTHREAD_CREATE_DETACHED and PTHREAD_CREATE_JOINABLE are
> undefined
> > in zOS, so I get undefines from:
> >
> > #define DETACH_ARG(v) ((v) ? PTHREAD_CREATE_DETACHED :
> > PTHREAD_CREATE_JOINABLE)
> >
> > Index: apr/include/apr_thread_proc.h
>
> > +#ifndef PTHREAD_CREATE_JOINABLE
> > +#define  PTHREAD_CREATE_JOINABLE 0
> > +#endif
> > +
> > +#ifndef PTHREAD_CREATE_DETACHED
> > +#define  PTHREAD_CREATE_DETACHED 1
> > +#endif
>
> We shouldn't be defining PTHREAD_ symbols for applications.  For APR,
> the application passes in zero or non-zero.
>
> How about changing thread.c as follows?
>
> #if defined(PTHREAD_CREATE_DETACHED)
> #define DETACH_ARG(v) ((v) ? PTHREAD_CREATE_DETACHED :
> PTHREAD_CREATE_JOINABLE)
> #else
> #define DETACH_ARG(v) ((v) ? 1 : 0)
> #endif
>

Mime
View raw message