]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/compare.c
LDAP C-API changes
[openldap] / libraries / libldap / compare.c
index ba9f89850cb2679f192ddc19609589a9004ffb7d..bc55055d9abae3e62e5ff1c4a7e5c78a0c732692 100644 (file)
@@ -5,24 +5,18 @@
  *  compare.c
  */
 
+#include "portable.h"
+
 #ifndef lint 
 static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
 #endif
 
 #include <stdio.h>
-#include <string.h>
-
-#ifdef MACOS
-#include "macos.h"
-#endif /* MACOS */
 
-#if !defined( MACOS ) && !defined( DOS )
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
 
-#include "lber.h"
-#include "ldap.h"
 #include "ldap-int.h"
 
 /*
@@ -63,7 +57,7 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value )
                return( -1 );
        }
 
-#ifndef NO_CACHE
+#ifndef LDAP_NOCACHE
        if ( ld->ld_cache != NULL ) {
                if ( ldap_check_cache( ld, LDAP_REQ_COMPARE, ber ) == 0 ) {
                        ber_free( ber, 1 );
@@ -72,7 +66,7 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value )
                }
                ldap_add_request_to_cache( ld, LDAP_REQ_COMPARE, ber );
        }
-#endif /* NO_CACHE */
+#endif /* LDAP_NOCACHE */
 
        /* send the message */
        return ( ldap_send_initial_request( ld, LDAP_REQ_COMPARE, dn, ber ));