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

Re: config.c change



I would rather that the call exist but return an error under -DNO_THREADS
and config.c tested for this error and printed a warning before continuing.


At 09:27 AM 7/5/00 -0400, Gary Williams wrote:
>The ldap_pvt_thread_pool_maxthreads only exists in the thread-safe library,
>so those of us building without threads get an unresolved reference on
>this call.  I put an ifdef around it using the thread-safe feature.  If
>this is agreeable to everyone, I can commit it or someone else can think of
>something better.
>
>Index: config.c
>===================================================================
>RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/config.c,v
>retrieving revision 1.77
>diff -u -r1.77 config.c
>--- config.c    2000/07/04 17:24:13     1.77
>+++ config.c    2000/07/05 13:22:29
>@@ -161,6 +161,7 @@
> 
>                        ldap_pvt_thread_set_concurrency( c );
> 
>+#ifdef LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
>                /* set maximum threads in thread pool */
>                } else if ( strcasecmp( cargv[0], "threads" ) == 0 ) {
>                        int c;
>@@ -181,7 +182,7 @@
>                        }
> 
>                        ldap_pvt_thread_pool_maxthreads( &connection_pool, c );
>-
>+#endif
>                /* get pid file name */
>                } else if ( strcasecmp( cargv[0], "pidfile" ) == 0 ) {
>                        if ( cargc < 2 ) {