[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: libldap with C Run-Time for Multithreaded-DLL



"Does not support use in a multi-threaded program" confuses me, because
there is at least a multi-threaded configuration for libldap.

Besides, compiling a project using one of the multi-threaded C Run-Time
does not imply that the code is thread-safe it just links against the
specified C Run-Time. Thus, we could add a DLL multi-threaded
configuration with no problem- or is there something I forgot?

> -----Original Message-----
> From: Howard Chu [mailto:hyc@highlandsun.com] 
> Sent: Mittwoch, 7. Mai 2003 11:14
> To: Patrick Dreyer, SY-UCP; openldap-software@OpenLDAP.org
> Subject: RE: libldap with C Run-Time for Multithreaded-DLL
> 
> 
> > -----Original Message-----
> > From: Patrick Dreyer, SY-UCP 
> [mailto:Patrick.Dreyer@swisscom-ucp.com]
> 
> > > > Is there a certain reason, why libldap has only
> > configurations for
> > > > building the library with C Run-Time for Singlethreaded and
> > > > Multithreaded? I'm specialy confused because liblber has a 
> > > > configuration for building with C Run-Time for 
> Multithreaded-DLL.
> > 
> > > It would help others to understand what you're talking about
> > > if you specified the platform you're working with, and which 
> > > version of OpenLDAP.
> > 
> > Platform:         Win32
> > OpenLDAP-Version: 2.1.7
> > 
> > I'm using OpenLDAPs liblber and libldap on Win32. The
> > project, I'm using those libraries for, has to be compiled 
> > with C Run-Time set to Multithreaded-DLL, so should be the 
> > two OpenLDAP libraries. The problem is, there is no 
> > configuration for building the libldap library with C 
> > Run-Time set to Multithreaded-DLL even liblber has one.
> 
> There is no configuration because libldap does not support 
> use in a multi-threaded program. You should use libldap_r 
> instead, but it is not documented and not officially 
> supported for user applications. It is used by slapd and 
> slurpd, so it certainly works, but with many restrictions. 
> For example, an LDAP session handle may not be used by more 
> than one thread.