This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
pthread_mutexattr_settype() ... g++ 2.96 ... won't work
- From: Andrey <afeapple at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 16 Mar 2004 08:17:03 -0800 (PST)
- Subject: pthread_mutexattr_settype() ... g++ 2.96 ... won't work
Hi,
Here's the problem. I have a call to
pthread_mutexattr_settype() in C++ code, and compile
it with g++ 2.96. It doesn't see the function, when I
look into pthread.h, it is #defined __USE_UNIX98,
which is not defined.
What is interesting, I can compile the very same
code with g++ 3.2.2. Also, I can compile the C code
with the pthread_mutexattr_settype() function using
gcc. ALSO :), when I put this into simple C program
#ifndef __USE_UNIX98
#error blah
#endif
#include <pthread.h>
. . .
pthread_mutexattr_settype(...)
and compile it with gcc, it bails out with the error!
How come?
Anyway, the main question is -- I need to compile C++
code with g++ 2.96 and somehow initialize a recursive
mutex. Any ideas? Thanks!
Andrey Fedorov
__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com