/* simple macros to realloc for now */
extern BerMemoryFunctions* ber_int_memory_fns;
+#ifdef CSRIMALLOC
+#define LBER_INT_MALLOC malloc
+#define LBER_INT_CALLOC calloc
+#define LBER_INT_REALLOC realloc
+#define LBER_INT_FREE free
+#define LBER_INT_VFREE ber_memvfree
+#define LBER_INT_STRDUP strdup
+
+#define LBER_MALLOC malloc
+#define LBER_CALLOC calloc
+#define LBER_REALLOC realloc
+#define LBER_FREE free
+#define LBER_VFREE ber_memvfree
+#define LBER_STRDUP strdup
+
+#else
#define LBER_INT_MALLOC(s) ber_memalloc((s))
#define LBER_INT_CALLOC(n,s) ber_memcalloc((n),(s))
#define LBER_INT_REALLOC(p,s) ber_memrealloc((p),(s))
#define LBER_FREE(p) ber_memfree((p))
#define LBER_VFREE(v) ber_memvfree((void**)(v))
#define LBER_STRDUP(s) ber_strdup((s))
+#endif
/* sockbuf.c */
#define RIGHT4 0x0f
#define CONTINUED_LINE_MARKER '\001'
+#ifdef CSRIMALLOC
+#define ber_memalloc malloc
+#define ber_memcalloc calloc
+#define ber_memrealloc realloc
+#define ber_strdup strdup
+#endif
+
static const char nib2b64[0x40] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
for ( i = 0; i < dtblsize; i++ ) {
if( connections[i].c_struct_state != SLAP_C_UNINITIALIZED ) {
+ ber_sockbuf_free( connections[i].c_sb );
ldap_pvt_thread_mutex_destroy( &connections[i].c_mutex );
ldap_pvt_thread_mutex_destroy( &connections[i].c_write_mutex );
ldap_pvt_thread_cond_destroy( &connections[i].c_write_cv );