[cfe-dev] clang with pthread on mingw
Vincent Richomme
forumer at smartmobili.com
Sun Feb 14 05:26:38 PST 2010
Hi,
When testing clang on mingw platform I got some errors when pthread was
enabled.
Problem was in line 87 in RWMutex.cpp:
// Initialize the rwlock
errorcode = pthread_rwlock_init(rwlock, &attr);
assert(errorcode == 0);
on mingw platform, pthread only support NULL attribues as shown below:
int
pthread_rwlock_init (pthread_rwlock_t * rwlock,
const pthread_rwlockattr_t * attr)
{
int result;
pthread_rwlock_t rwl = 0;
if (rwlock == NULL)
{
return EINVAL;
}
if (attr != NULL && *attr != NULL)
{
result = EINVAL; /* Not supported */
goto DONE;
}
...
}
Could someone add a #ifdef to pass NULL when __MINGW32__ is defined.
Thanks
More information about the cfe-dev
mailing list