X-Git-Url: https://git.jankratochvil.net/?p=middleman.git;a=blobdiff_plain;f=include%2Fcompat.h;fp=include%2Fcompat.h;h=f7d3608b8269655bd7a10a81f13e7d0ca78f5e3c;hp=b2bedba279bec049abd15072dc4fe98182b38e49;hb=8c97b07c3407abb81745acbce2e4948c9fa7cad1;hpb=bfec3e49a174c186be3d3aa20e96ba5de0869a89 diff --git a/include/compat.h b/include/compat.h index b2bedba..f7d3608 100644 --- a/include/compat.h +++ b/include/compat.h @@ -1,15 +1,21 @@ #ifndef COMPAT_H #define COMPAT_H -#ifndef HAVE_PTHREAD_RWLOCK_INIT -/* pthread rwlock's aren't very portable, these will replace them with a slower alternative */ -#define pthread_rwlock_t pthread_mutex_t -#define pthread_rwlock_init pthread_mutex_init -#define pthread_rwlock_destroy pthread_mutex_destroy -#define pthread_rwlock_rdlock pthread_mutex_lock -#define pthread_rwlock_wrlock pthread_mutex_lock -#define pthread_rwlock_unlock pthread_mutex_unlock -#endif /* HAVE_PTHREAD_RWLOCK_INIT */ +#define pthread_mutex_t int +#define PTHREAD_MUTEX_INITIALIZER 0 +#define pthread_attr_init(attr) +#define pthread_attr_destroy(attr) +#define pthread_attr_setdetachstate(attr,state) +#define pthread_attr_setschedpolicy(attr,policy) +#define pthread_mutex_init(mutex,attr) +#define pthread_mutex_lock(mutex) +#define pthread_mutex_unlock(mutex) +#define pthread_rwlock_init(lock,attr) +#define pthread_rwlock_destroy(lock) +#define pthread_rwlock_rdlock(lock) +#define pthread_rwlock_wrlock(lock) +#define pthread_rwlock_unlock(lock) +/* pthread_create(thread,attr,start_routine,arg) not ignorable */ #ifndef HAVE_POLL