pthread_attr_setdetachstate(&attr, detach);
#endif
#endif
+
+#if HAVE_PTHREADS < 5
+ rtn = pthread_create( thread, attr, start_routine, arg );
+#else
rtn = pthread_create( thread, &attr, start_routine, arg );
+#endif
#if HAVE_PTHREADS > 5
pthread_attr_destroy(&attr);
#else
*/
#define MAXKEYS 32
+#ifdef HAVE_PTHREADS
+#define TID_EQ(a,b) pthread_equal((a),(b))
+#else
+#define TID_EQ(a,b) ((a) == (b))
+#endif
+
typedef struct ldap_int_thread_ctx_s {
union {
LDAP_STAILQ_ENTRY(ldap_int_thread_ctx_s) q;
ldap_pvt_thread_mutex_lock(&pool->ltp_mutex);
LDAP_SLIST_FOREACH(ptr, &pool->ltp_active_list, ltc_next.al)
- if (ptr != NULL && ptr->ltc_thread_id == tid) break;
- if (ptr != NULL && ptr->ltc_thread_id != tid) {
+ if (ptr != NULL && TID_EQ(ptr->ltc_thread_id, tid)) break;
+ if (ptr != NULL && !TID_EQ(ptr->ltc_thread_id, tid)) {
ptr = NULL;
}
ldap_pvt_thread_mutex_unlock(&pool->ltp_mutex);