]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/search.c
Add libtool support based upon patch by Bart Hartgers <Hartgers@kfm1.phys.tue.nl>
[openldap] / libraries / libldap / search.c
index b74635d3a560f77cb708b1bf804c44431100434d..c6be97c4d761cf84037089b301d7c6e29725139f 100644 (file)
@@ -12,15 +12,13 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of
 #endif
 
 #include <stdio.h>
-#include <ctype.h>
 #include <stdlib.h>
 
+#include <ac/ctype.h>
 #include <ac/socket.h>
 #include <ac/string.h>
 #include <ac/time.h>
 
-#include "lber.h"
-#include "ldap.h"
 #include "ldap-int.h"
 
 static char *find_right_paren LDAP_P(( char *s ));
@@ -61,7 +59,7 @@ ldap_search( LDAP *ld, char *base, int scope, char *filter,
                return( -1 );
        }
 
-#ifndef NO_CACHE
+#ifndef LDAP_NOCACHE
        if ( ld->ld_cache != NULL ) {
                if ( ldap_check_cache( ld, LDAP_REQ_SEARCH, ber ) == 0 ) {
                        ber_free( ber, 1 );
@@ -70,7 +68,7 @@ ldap_search( LDAP *ld, char *base, int scope, char *filter,
                }
                ldap_add_request_to_cache( ld, LDAP_REQ_SEARCH, ber );
        }
-#endif /* NO_CACHE */
+#endif /* LDAP_NOCACHE */
 
        /* send the message */
        return ( ldap_send_initial_request( ld, LDAP_REQ_SEARCH, base, ber ));
@@ -137,7 +135,7 @@ ldap_build_search_req( LDAP *ld, char *base, int scope, char *filter,
                return( NULLBER );
        }
 
-       filter = strdup( filter );
+       filter = ldap_strdup( filter );
        err = put_filter( ber, filter );
        free( filter );
 
@@ -319,7 +317,7 @@ put_filter( BerElement *ber, char *str )
                                        return( -1 );
 
                                *next = '\0';
-                               tmp = strdup( str );
+                               tmp = ldap_strdup( str );
                                if ( gotescape ) {
                                        escape = 0;
                                        for ( s = d = tmp; *s; s++ ) {
@@ -361,7 +359,7 @@ put_filter( BerElement *ber, char *str )
                        Debug( LDAP_DEBUG_TRACE, "put_filter: default\n", 0, 0,
                            0 );
                        next = strchr( str, '\0' );
-                       tmp = strdup( str );
+                       tmp = ldap_strdup( str );
                        if ( strchr( tmp, '\\' ) != NULL ) {
                                escape = 0;
                                for ( s = d = tmp; *s; s++ ) {