Howard Chu wrote: > It seems the dichotomy between libldap and libldap_r is a relic from the > bad old days of dcethreads / cmathreads when linking a threaded library > into an otherwise non-threaded program would cause all sorts of strange > and wonderful failures. Unless anyone knows of any current platform > where this is unsafe, I think it's time we dropped this distinction, and > just use libldap_r (until we get to writing a completely new C API). > > libldap_r is still missing some thread-specific features though - we > should wrap all library initialization in a pthread_once() call, and we > should be using thread-specific data for the LDAP* errno value.
It should be detectable whether the new libldap behaves like former libldap_r. In python-ldap all calls into libldap or libldap_r are serialized by locks in the Python wrapper part. The locking is different if python-ldap was built against libldap_r (locks are per connection then). So a clear distinction with LDAP_API_VERSION would be appreciated. Ciao, Michael.