Re: Woody: pthread_rwlock_t error
On Wed, Sep 18, 2002 at 06:06:56PM +0200, Holger Rauch wrote:
> On Wed, 18 Sep 2002, Colin Watson wrote:
> > [...]
> > #define _XOPEN_SOURCE 500
> >
> > ... at the top of your file to access it. See 'info libc "Feature Test
> > Macros"'.
>
> I followed your advice and read the section you mentioned. I found out
> that simply specifying -D_GNU_SOURCE in my Makefile solved the problem
> ,-).
Yep, _GNU_SOURCE implies _XOPEN_SOURCE 600. You can trawl through
/usr/include/features.h for the details.
> I also encountered that there seems to be a difference between the
> documented _XOPEN_SOURCE option you mentioned and _X_OPEN_SOURCE (not
> documented; with an "_" in between the X and the O). One part of my
> project needed the version with the "_", the other part the version
> without. Strange. What's the difference between the two?
Weird. I've never heard of _X_OPEN_SOURCE, and it's not mentioned
anywhere in /usr/include here. As far as standard feature test macros
go, I would say that the difference is that _XOPEN_SOURCE is right while
_X_OPEN_SOURCE is wrong. :-)
Perhaps it's a system-specific or project-specific definition, though.
Or perhaps _X_OPEN_SOURCE is an older name? I can't find many references
to the latter on Google, and the ones I can find don't seem very
current.
Cheers,
--
Colin Watson [cjwatson@flatline.org.uk]
Reply to: