]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/compare.c
Updates for MSVC 5.0. Fix libraries names to be ol{ber,dap,..}32.lib.
[openldap] / libraries / libldap / compare.c
index 74388f1ceaee99faf49eb85bf54c9d81e2372958..ab64d198652d84fc01419134159e3d1573711435 100644 (file)
@@ -1,28 +1,22 @@
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1990 Regents of the University of Michigan.
  *  All rights reserved.
  *
  *  compare.c
  */
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
+#include "portable.h"
 
 #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"
 
 /*
@@ -52,7 +46,7 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value )
        Debug( LDAP_DEBUG_TRACE, "ldap_compare\n", 0, 0, 0 );
 
        /* create a message to send */
-       if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) {
+       if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
                return( -1 );
        }
 
@@ -63,19 +57,19 @@ ldap_compare( LDAP *ld, char *dn, char *attr, char *value )
                return( -1 );
        }
 
-#ifndef NO_CACHE
+#ifndef LDAP_NOCACHE
        if ( ld->ld_cache != NULL ) {
-               if ( check_cache( ld, LDAP_REQ_COMPARE, ber ) == 0 ) {
+               if ( ldap_check_cache( ld, LDAP_REQ_COMPARE, ber ) == 0 ) {
                        ber_free( ber, 1 );
                        ld->ld_errno = LDAP_SUCCESS;
                        return( ld->ld_msgid );
                }
-               add_request_to_cache( ld, LDAP_REQ_COMPARE, ber );
+               ldap_add_request_to_cache( ld, LDAP_REQ_COMPARE, ber );
        }
-#endif /* NO_CACHE */
+#endif /* LDAP_NOCACHE */
 
        /* send the message */
-       return ( send_initial_request( ld, LDAP_REQ_COMPARE, dn, ber ));
+       return ( ldap_send_initial_request( ld, LDAP_REQ_COMPARE, dn, ber ));
 }
 
 int