]> git.sur5r.net Git - openldap/commitdiff
Use a 64MB stack (instead of a 64K on some systems) by default.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 26 Sep 2001 02:35:41 +0000 (02:35 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 26 Sep 2001 02:35:41 +0000 (02:35 +0000)
This should be tunable...

include/ldap.h
include/ldap_pvt_thread.h
libraries/libldap_r/thr_posix.c
servers/slapd/back-bdb/idl.h

index 95e8bdcec7ecb043d8c2910500b985de0272f4ff..72fca310ae08f011fdc53bfca68beb0dca98300e 100644 (file)
@@ -1173,17 +1173,50 @@ ldap_get_dn LDAP_P((
        LDAP *ld,
        LDAPMessage *entry ));
 
+typedef struct ldap_ava {
+       char *la_attr;
+       struct berval *la_value;
+       unsigned la_flags;
+#define LDAP_AVA_STRING 0x0000U
+#define LDAP_AVA_BINARY 0x0001U
+} LDAPAVA;
+
+typedef LDAPAVA** LDAPRDN;
+typedef LDAPRDN** LDAPDN;
+
+/* DN formats */
+#define LDAP_DN_FORMAT_LDAPV3  0x0000U
+#define LDAP_DN_FORMAT_LDAPV2  0x0001U
+#define LDAP_DN_FORMAT_DCE             0x0002U
+#define LDAP_DN_FORMAT_UFN             0x0003U /* dn2str only */
+#define LDAP_DN_FORMAT_MASK            0x000FU
+
+/* str2dn flags */ 
+#define LDAP_DN_PEDANTIC               0x1000U
+
+LDAP_F( int )
+ldap_str2dn LDAP_P((
+       LDAP_CONST char *str,
+       LDAPDN **dn,
+       unsigned flags ));
+
+LDAP_F( int )
+ldap_dn2str LDAP_P((
+       LDAPDN *dn,
+       char **str,
+       unsigned flags ));
+
 LDAP_F( char * )
-ldap_dn2ufn LDAP_P((
+ldap_dn2ufn LDAP_P(( /* deprecated */
        LDAP_CONST char *dn ));
 
 LDAP_F( char ** )
-ldap_explode_dn LDAP_P(( 
+ldap_explode_dn LDAP_P(( /* deprecated */
        LDAP_CONST char *dn,
        int notypes ));
 
 LDAP_F( char ** )
-ldap_explode_rdn LDAP_P((
+ldap_explode_rdn LDAP_P(( /* deprecated */
        LDAP_CONST char *rdn,
        int notypes ));
 
index a1908c8906f0a91fd6db94b62a1f5c5e0465f819..75d4777e3fab84692afe68a245d55c040b306457 100644 (file)
@@ -41,6 +41,11 @@ ldap_pvt_thread_set_concurrency LDAP_P(( int ));
 #define LDAP_PVT_THREAD_CREATE_JOINABLE 0
 #define LDAP_PVT_THREAD_CREATE_DETACHED 1
 
+#ifndef LDAP_PVT_THREAD_STACK_SIZE
+       /* LARGE stack */
+#define LDAP_PVT_THREAD_STACK_SIZE     (64*1024*1024)
+#endif
+
 LDAP_F( int ) 
 ldap_pvt_thread_create LDAP_P((
        ldap_pvt_thread_t * thread, 
index bfcf7ac8e573822d07243e0e1a9457c7bfaf3259..c62cc96f483782761d72e8b97e3251cf3628b2d1 100644 (file)
@@ -100,6 +100,11 @@ ldap_pvt_thread_create( ldap_pvt_thread_t * thread,
                pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
 #endif
        }
+
+#if defined(LDAP_PVT_THREAD_STACK_SIZE) && LDAP_PVT_THREAD_STACK_SIZE > 0
+       /* this should be tunable */
+       pthread_attr_setstacksize( &attr, LDAP_PVT_THREAD_STACK_SIZE );
+#endif
 #endif
 
        rtn = pthread_create( thread, &attr, start_routine, arg );
index 1d810907fdc978946c3fcf52c9a1a98a41536af6..c48a47dcd5c66d41e9cde438198fe9b79f470334 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "slap.h"
 
-#if 0
+#if 1
        /* larger IDL sizes (which blow thread stacks) */
 #define BDB_IDL_DB_SIZE                (1<<16) /* 64K IDL on disk */
 #define BDB_IDL_SIZE           (1<<17) /* 128K IDL in memory */