On Thu, 6 Jan 2000, Kalaev, Maxim wrote:
> I need to use rwlocks in my program,
> I discovered what I have phtread_rwlock(s) defined in the file
> phreads.h, but it's included only when I have __USE_UNIX98 defined.
> To define __USE_UNIX98 I must define some _X... variable to 500,
> before the file features.h is included (it's included at the top of
> pthreads.h)
they state that if you define '_GNU_SOURCE', it'll turn on many features,
including setting _XOPEN_SOURCE_ to '500'.
if you define _XOPEN_SOURCE, you have two options:
1. define it on the compiler's command line.
2. define it in the source - in that case, you should #undef it first.
note - i didn't try it on this specific code, i just interpret what's
written in 'features.h' .
> Q1: Why this complicated way is used - are there any problems with rwlocks
> in linux?
hmm.. for the sake of it? these UNIX98 extentions are not standard
features, and not everyone wants to enable them. this is just a crude
guess, ofcourse, and if you want to have a proper answer, refer to the
maintainer(s) of those header files.
guy
"For world domination - press 1,
or dial 0, and please hold, for the creator." -- nob o. dy
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]