This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]