]> git.sur5r.net Git - openldap/commitdiff
Remove some unnecessary #ifdefs
authorKurt Zeilenga <kurt@openldap.org>
Sat, 26 Nov 2005 07:38:18 +0000 (07:38 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 26 Nov 2005 07:38:18 +0000 (07:38 +0000)
13 files changed:
servers/slapd/back-bdb/init.c
servers/slapd/back-ldbm/init.c
servers/slapd/back-ldbm/search.c
servers/slapd/back-meta/candidates.c
servers/slapd/back-meta/config.c
servers/slapd/back-meta/search.c
servers/slapd/back-sql/search.c
servers/slapd/backglue.c
servers/slapd/overlays/syncprov.c
servers/slapd/saslauthz.c
servers/slapd/search.c
servers/slapd/slapi/slapi_pblock.c
servers/slapd/syncrepl.c

index 1eb44efebbd1594a92fe675d603d69d446a62a45..991bbc033f264c15bf214067cbfb27c73571b380 100644 (file)
@@ -641,12 +641,8 @@ bdb_back_initialize(
                LDAP_CONTROL_MANAGEDSAIT,
                LDAP_CONTROL_NOOP,
                LDAP_CONTROL_PAGEDRESULTS,
-#ifdef LDAP_CONTROL_SUBENTRIES
                LDAP_CONTROL_SUBENTRIES,
-#endif
-#ifdef LDAP_CONTROL_X_PERMISSIVE_MODIFY
                LDAP_CONTROL_X_PERMISSIVE_MODIFY,
-#endif
                NULL
        };
 
index 1ceb19bc5cd1516b9610cf9bb30e55ed6860c553..0f82638dcaab9736e716b0ce88cc36169d190da8 100644 (file)
@@ -32,9 +32,7 @@ ldbm_back_initialize(
 {
        static char *controls[] = {
                LDAP_CONTROL_MANAGEDSAIT,
-#ifdef LDAP_CONTROL_X_PERMISSIVE_MODIFY
                LDAP_CONTROL_X_PERMISSIVE_MODIFY,
-#endif
                NULL
        };
 
index 633b7c23720fb16c712bf5254021a9e2d804e339..455e31ccd942bdcf5e081bd0591a2e907f5a473a 100644 (file)
@@ -417,13 +417,11 @@ searchit:
                        {
                                scopeok = dnIsSuffix( &e->e_nname, &realbase );
 
-#ifdef LDAP_SCOPE_SUBORDINATE
                        } else if ( !scopeok &&
                                op->ors_scope == LDAP_SCOPE_SUBORDINATE )
                        {
                                scopeok = !dn_match( &e->e_nname, &realbase )
                                        && dnIsSuffix( &e->e_nname, &realbase );
-#endif
 
                        } else {
                                scopeok = 1;
index 1cc8d83a87a38e46f49892ada7463ca6f6511ba1..a73cc1516ebff04ed229b5aeb0b4480cf70fd437 100644 (file)
@@ -70,13 +70,11 @@ meta_back_is_candidate(
                default:
                        return META_CANDIDATE;
 
-#ifdef LDAP_SCOPE_SUBORDINATE
                case LDAP_SCOPE_SUBORDINATE:
                        if ( ndn->bv_len > nsuffix->bv_len ) {
                                return META_CANDIDATE;
                        }
                        break;
-#endif /* LDAP_SCOPE_SUBORDINATE */
 
                /* nearly useless; not allowed by config */
                case LDAP_SCOPE_ONELEVEL:
index ea78c2037b6b6ce344b9f67a23759c526d6f3361..3516b82e359492d4a75da45679ae28f29a316388 100644 (file)
@@ -222,9 +222,7 @@ meta_back_db_config(
                        break;
 
                case LDAP_SCOPE_SUBTREE:
-#ifdef LDAP_SCOPE_SUBORDINATE
                case LDAP_SCOPE_SUBORDINATE:
-#endif /* LDAP_SCOPE_SUBORDINATE */
                        mi->mi_targets[ i ].mt_scope = ludp->lud_scope;
                        break;
 
index 9f76beb98ecd3112a81cd620fad2c5c23102bd12..08f61b904db42c98b706b82f4aeeeacbb6191225 100644 (file)
@@ -102,11 +102,9 @@ meta_back_search_start(
                                        &op->o_req_ndn ) )
                        {
                                realbase = mi->mi_targets[ candidate ].mt_nsuffix;
-#ifdef LDAP_SCOPE_SUBORDINATE
                                if ( mi->mi_targets[ candidate ].mt_scope == LDAP_SCOPE_SUBORDINATE ) {
                                        realscope = LDAP_SCOPE_SUBORDINATE;
                                }
-#endif /* LDAP_SCOPE_SUBORDINATE */
 
                        } else {
                                /*
@@ -116,9 +114,7 @@ meta_back_search_start(
                        }
                        break;
 
-#ifdef LDAP_SCOPE_SUBORDINATE
                case LDAP_SCOPE_SUBORDINATE:
-#endif /* LDAP_SCOPE_SUBORDINATE */
                case LDAP_SCOPE_ONELEVEL:
                {
                        struct berval   rdn = mi->mi_targets[ candidate ].mt_nsuffix;
@@ -132,16 +128,13 @@ meta_back_search_start(
                                 * base, and make scope "base"
                                 */
                                realbase = mi->mi_targets[ candidate ].mt_nsuffix;
-#ifdef LDAP_SCOPE_SUBORDINATE
                                if ( op->ors_scope == LDAP_SCOPE_SUBORDINATE ) {
                                        if ( mi->mi_targets[ candidate ].mt_scope == LDAP_SCOPE_SUBORDINATE ) {
                                                realscope = LDAP_SCOPE_SUBORDINATE;
                                        } else {
                                                realscope = LDAP_SCOPE_SUBTREE;
                                        }
-                               } else
-#endif /* LDAP_SCOPE_SUBORDINATE */
-                               {
+                               } else {
                                        realscope = LDAP_SCOPE_BASE;
                                }
                                break;
index efc65072242036c9d72b457a9647cfc6b882bda1..ba54bef33bd02628346ea6a177b7b38786e606b7 100644 (file)
@@ -1436,9 +1436,7 @@ backsql_srch_query( backsql_srch_info *bsi, struct berval *query )
                                        "ldap_entries.parent=?" );
                break;
 
-#ifdef LDAP_SCOPE_SUBORDINATE
        case LDAP_SCOPE_SUBORDINATE:
-#endif /* LDAP_SCOPE_SUBORDINATE */
        case LDAP_SCOPE_SUBTREE:
                if ( BACKSQL_USE_SUBTREE_SHORTCUT( bi ) ) {
                        int             i;
@@ -1679,9 +1677,7 @@ backsql_oc_get_candidates( void *v_oc, void *v_bsi )
                }
                break;
 
-#ifdef LDAP_SCOPE_SUBORDINATE
        case LDAP_SCOPE_SUBORDINATE:
-#endif /* LDAP_SCOPE_SUBORDINATE */
        case LDAP_SCOPE_SUBTREE:
        {
                /* if short-cutting the search base,
@@ -1720,11 +1716,9 @@ backsql_oc_get_candidates( void *v_oc, void *v_bsi )
                                tmp_base_ndn[ i ] = bsi->bsi_base_ndn->bv_val[ j ];
                        }
 
-#ifdef LDAP_SCOPE_SUBORDINATE
                        if ( bsi->bsi_scope == LDAP_SCOPE_SUBORDINATE ) {
                                tmp_base_ndn[ i++ ] = ',';
                        }
-#endif /* LDAP_SCOPE_SUBORDINATE */
 
                        tmp_base_ndn[ i ] = '%';
                        tmp_base_ndn[ i + 1 ] = '\0';
@@ -1734,11 +1728,9 @@ backsql_oc_get_candidates( void *v_oc, void *v_bsi )
 
                        tmp_base_ndn[ i++ ] = '%';
 
-#ifdef LDAP_SCOPE_SUBORDINATE
                        if ( bsi->bsi_scope == LDAP_SCOPE_SUBORDINATE ) {
                                tmp_base_ndn[ i++ ] = ',';
                        }
-#endif /* LDAP_SCOPE_SUBORDINATE */
 
                        AC_MEMCPY( &tmp_base_ndn[ i ], bsi->bsi_base_ndn->bv_val,
                                bsi->bsi_base_ndn->bv_len + 1 );
@@ -1750,13 +1742,10 @@ backsql_oc_get_candidates( void *v_oc, void *v_bsi )
                        ldap_pvt_str2upper( tmp_base_ndn );
                }
 
-#ifdef LDAP_SCOPE_SUBORDINATE
                if ( bsi->bsi_scope == LDAP_SCOPE_SUBORDINATE ) {
                        Debug( LDAP_DEBUG_TRACE, "(children)dn: \"%s\"\n",
                                tmp_base_ndn, 0, 0 );
-               } else 
-#endif /* LDAP_SCOPE_SUBORDINATE */
-               {
+               } else {
                        Debug( LDAP_DEBUG_TRACE, "(sub)dn: \"%s\"\n",
                                tmp_base_ndn, 0, 0 );
                }
@@ -2157,15 +2146,12 @@ backsql_search( Operation *op, SlapReply *rs )
                        /* fall thru */
                }
 
-#ifdef LDAP_SCOPE_SUBORDINATE
                case LDAP_SCOPE_SUBORDINATE:
                        /* discard the baseObject entry */
                        if ( dn_match( &eid->eid_ndn, &op->o_req_ndn ) ) {
                                goto next_entry2;
                        }
-               /* FALLTHRU */
-#endif /* LDAP_SCOPE_SUBORDINATE */
-
+                       /* FALLTHRU */
                case LDAP_SCOPE_SUBTREE:
                        /* FIXME: this should never fail... */
                        if ( !dnIsSuffix( &eid->eid_ndn, &op->o_req_ndn ) ) {
index 649f7098e0c51a917ee36f25f4c05adca857f713..ec2f78ac17d95fd5643cd55ad65b15cbefdbd69b 100644 (file)
@@ -258,9 +258,7 @@ glue_op_search ( Operation *op, SlapReply *rs )
 
        case LDAP_SCOPE_ONELEVEL:
        case LDAP_SCOPE_SUBTREE:
-#ifdef LDAP_SCOPE_SUBORDINATE
        case LDAP_SCOPE_SUBORDINATE: /* FIXME */
-#endif
 
 #if 0
                if ( op->o_sync ) {
index 75c82cc59a3c75445b45e54a9b9bda4f4aa06bec..a62d0a0d0d8829ca15a8d54f9adcb78d6aafc56a 100644 (file)
@@ -450,12 +450,10 @@ syncprov_findbase( Operation *op, fbase_cookie *fc )
                case LDAP_SCOPE_SUBTREE:
                        fc->fscope = dnIsSuffix( fc->fdn, &fc->fss->s_base );
                        break;
-#ifdef LDAP_SCOPE_SUBORDINATE
                case LDAP_SCOPE_SUBORDINATE:
                        fc->fscope = dnIsSuffix( fc->fdn, &fc->fss->s_base ) &&
                                !dn_match( fc->fdn, &fc->fss->s_base );
                        break;
-#endif
                }
        }
 
index 106dca9112a9f736e770c5ca46e479bd30fff2e5..42bb8a136810b99e193f7fd7f0f886832b6fe215 100644 (file)
@@ -1969,9 +1969,7 @@ slap_sasl2dn(
        case LDAP_SCOPE_BASE:
        case LDAP_SCOPE_ONELEVEL:
        case LDAP_SCOPE_SUBTREE:
-#ifdef LDAP_SCOPE_SUBORDINATE
        case LDAP_SCOPE_SUBORDINATE:
-#endif
                /* do a search */
                break;
 
index 6d9f57480ab17f9a8e5cdff157c3670e55192d46..97f3e923c1bb7e661ef15755390a6820699c65fe 100644 (file)
@@ -92,9 +92,7 @@ do_search(
        case LDAP_SCOPE_BASE:
        case LDAP_SCOPE_ONELEVEL:
        case LDAP_SCOPE_SUBTREE:
-#ifdef LDAP_SCOPE_SUBORDINATE
        case LDAP_SCOPE_SUBORDINATE:
-#endif
                break;
        default:
                send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR, "invalid scope" );
index ef51920fb816481baf77c760fd893efda3eb243f..c314172878389990800ee67fea7204e221941a31 100644 (file)
@@ -1022,9 +1022,7 @@ pblock_set( Slapi_PBlock *pb, int param, void *value )
                        case LDAP_SCOPE_BASE:
                        case LDAP_SCOPE_ONELEVEL:
                        case LDAP_SCOPE_SUBTREE:
-#ifdef LDAP_SCOPE_SUBORDINATE
                        case LDAP_SCOPE_SUBORDINATE:
-#endif
                                pb->pb_op->ors_scope = scope;
                                break;
                        default:
index 2c539d9bcf192577f1cfcadd94d20283104fcc4b..abce34456cc44687cf55e7bae5d7294f85b078e6 100644 (file)
@@ -2683,10 +2683,8 @@ static struct {
        { BER_BVC("base"), LDAP_SCOPE_BASE },
        { BER_BVC("one"), LDAP_SCOPE_ONELEVEL },
        { BER_BVC("onelevel"), LDAP_SCOPE_ONELEVEL },   /* OpenLDAP extension */
-#ifdef LDAP_SCOPE_SUBORDINATE
        { BER_BVC("children"), LDAP_SCOPE_SUBORDINATE },
        { BER_BVC("subordinate"), LDAP_SCOPE_SUBORDINATE },
-#endif
        { BER_BVC("sub"), LDAP_SCOPE_SUBTREE },
        { BER_BVC("subtree"), LDAP_SCOPE_SUBTREE },     /* OpenLDAP extension */
        { BER_BVNULL, 0 }