]> git.sur5r.net Git - openldap/commitdiff
More noop #ifdef'ing
authorKurt Zeilenga <kurt@openldap.org>
Fri, 30 Aug 2002 05:10:41 +0000 (05:10 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 30 Aug 2002 05:10:41 +0000 (05:10 +0000)
clients/tools/ldapcompare.c

index 7451b9d7d73935ff92fb96aeafddd97c8ab41f03..b83b618f6aa49c0cb8bbe6fac9984a955dc7f945 100644 (file)
@@ -209,6 +209,7 @@ main( int argc, char **argv )
                        free( control );
                        break;
                        
+#ifdef LDAP_CONTROL_NOOP
                } else if ( strcasecmp( control, "noop" ) == 0 ) {
                        if( cvalue != NULL ) {
                                fprintf( stderr, "noop: no control value expected" );
@@ -219,6 +220,7 @@ main( int argc, char **argv )
                        noop = 1 + crit;
                        free( control );
                        break;
+#endif
 
                } else {
                        fprintf( stderr, "Invalid general control name: %s\n", control );
@@ -731,7 +733,11 @@ main( int argc, char **argv )
                }
        }
 
-       if ( manageDSAit || noop ) {
+       if ( manageDSAit
+#ifdef LDAP_CONTROL_NOOP
+               || noop
+#endif
+       ) {
                int err, i = 0;
                LDAPControl c1, c2;
                LDAPControl *ctrls[3];
@@ -745,6 +751,7 @@ main( int argc, char **argv )
                        c1.ldctl_iscritical = manageDSAit > 1;
                }
 
+#ifdef LDAP_CONTROL_NOOP
                if ( noop ) {
                        ctrls[i++] = &c2;
                        ctrls[i] = NULL;
@@ -754,6 +761,7 @@ main( int argc, char **argv )
                        c2.ldctl_value.bv_len = 0;
                        c2.ldctl_iscritical = noop > 1;
                }
+#endif
        
                err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );