[Asterisk-Dev] PTHREAD_MUTEX_RECURSIVE

Dr. Rich Murphey Rich at WhiteOakLabs.com
Sat Jun 19 08:54:09 MST 2004


Thanks for clarifying that.  The definition of PTHREAD_MUTEX_RECURSIVE is
surrounded by an #ifdef __USE_UNIX98 rather than __USE_GNU.  If __USE_UNIX98
wasn't defined it would cause that error.

Cheers,
Rich


> -----Original Message-----
> From: asterisk-dev-admin at lists.digium.com [mailto:asterisk-dev-
> admin at lists.digium.com] On Behalf Of Sam Bingner
> Sent: Saturday, June 19, 2004 7:02 AM
> To: asterisk-dev at lists.digium.com
> Subject: RE: [Asterisk-Dev] PTHREAD_MUTEX_RECURSIVE
> 
> You have to look at features.h
> 
> #ifdef  _GNU_SOURCE
> # define __USE_GNU      1
> #endif
> 
> Then if you look in pthread.h for __USE_GNU you find it a billion places.
> It's the same on every version I've seen so far, including redhat 9.
> 
> Sam
> 
> 
> -----Original Message-----
> From: asterisk-dev-admin at lists.digium.com
> [mailto:asterisk-dev-admin at lists.digium.com] On Behalf Of Dr. Rich Murphey
> Sent: Friday, June 18, 2004 11:10 PM
> To: asterisk-dev at lists.digium.com
> Subject: RE: [Asterisk-Dev] PTHREAD_MUTEX_RECURSIVE
> 
> 
> Perhaps that's a difference between redhat and others? _GNU_SOURCE doesn't
> appear in pthread.h on redhat 9.
> 
> Cheers,
> Rich
> 
> 
> > -----Original Message-----
> > From: asterisk-dev-admin at lists.digium.com [mailto:asterisk-dev-
> > admin at lists.digium.com] On Behalf Of steve at daviesfam.org
> > Sent: Saturday, June 19, 2004 1:18 AM
> > To: asterisk-dev at lists.digium.com
> > Subject: RE: [Asterisk-Dev] PTHREAD_MUTEX_RECURSIVE
> >
> >
> >
> > On Fri, 18 Jun 2004, Dr. Rich Murphey wrote:
> >
> > > PTHREAD_MUTEX_RECURSIVE is generally defined by the OS or system.
> > > In general it would be defined in pthread.h.
> > >
> > > You have a native posix library I believe, so there must be an
> > appropriate
> > > header to define it, if it's not pthread.h.
> > >
> > > Cheers,
> > > Rich
> >
> > IIRC, you need to #define _GNU_SOURCE before the includes.
> >
> > Check pthread.h and look at the #ifdefs.
> >
> > Steve
> > _______________________________________________
> > Asterisk-Dev mailing list
> > Asterisk-Dev at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-dev
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-dev
> >
> 
> 
> 
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev





More information about the asterisk-dev mailing list