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.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/