From: Pierangelo Masarati Date: Sun, 14 Dec 2003 11:13:25 +0000 (+0000) Subject: resolve naming conflicts when compiling rwm overlay as static (will disappear as... X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~191 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=588f1f61850b02d87b418480b3eab031ca5fdaf1;p=openldap resolve naming conflicts when compiling rwm overlay as static (will disappear as soon as rwm stuff is removed from back-ldap/back-meta) --- diff --git a/servers/slapd/overlays/rwm.c b/servers/slapd/overlays/rwm.c index 97fb002006..249d3692c2 100644 --- a/servers/slapd/overlays/rwm.c +++ b/servers/slapd/overlays/rwm.c @@ -573,9 +573,9 @@ rwm_destroy( #endif /* !ENABLE_REWRITE */ avl_free( rwmap->rwm_oc.remap, NULL ); - avl_free( rwmap->rwm_oc.map, mapping_free ); + avl_free( rwmap->rwm_oc.map, rwm_mapping_free ); avl_free( rwmap->rwm_at.remap, NULL ); - avl_free( rwmap->rwm_at.map, mapping_free ); + avl_free( rwmap->rwm_at.map, rwm_mapping_free ); } return rc; diff --git a/servers/slapd/overlays/rwm.h b/servers/slapd/overlays/rwm.h index 7a9829e172..53ae12153a 100644 --- a/servers/slapd/overlays/rwm.h +++ b/servers/slapd/overlays/rwm.h @@ -79,8 +79,8 @@ typedef struct dncookie { int rwm_dn_massage(dncookie *dc, struct berval *dn, struct berval *res); /* attributeType/objectClass mapping */ -int mapping_cmp (const void *, const void *); -int mapping_dup (void *, void *); +int rwm_mapping_cmp (const void *, const void *); +int rwm_mapping_dup (void *, void *); void rwm_map_init ( struct ldapmap *lm, struct ldapmapping ** ); void rwm_map ( struct ldapmap *map, struct berval *s, struct berval *m, @@ -103,7 +103,7 @@ rwm_map_attrs( char ***mapped_attrs ); -extern void mapping_free ( void *mapping ); +extern void rwm_mapping_free ( void *mapping ); extern int rwm_map_config( struct ldapmap *oc_map, diff --git a/servers/slapd/overlays/rwmconf.c b/servers/slapd/overlays/rwmconf.c index 03880721e5..93d9c72fb8 100644 --- a/servers/slapd/overlays/rwmconf.c +++ b/servers/slapd/overlays/rwmconf.c @@ -161,8 +161,8 @@ rwm_map_config( } } - if ( (src[0] != '\0' && avl_find( map->map, (caddr_t)mapping, mapping_cmp ) != NULL) - || avl_find( map->remap, (caddr_t)&mapping[1], mapping_cmp ) != NULL) + if ( (src[0] != '\0' && avl_find( map->map, (caddr_t)mapping, rwm_mapping_cmp ) != NULL) + || avl_find( map->remap, (caddr_t)&mapping[1], rwm_mapping_cmp ) != NULL) { fprintf( stderr, "%s: line %d: duplicate mapping found (ignored)\n", @@ -173,10 +173,10 @@ rwm_map_config( if ( src[0] != '\0' ) { avl_insert( &map->map, (caddr_t)mapping, - mapping_cmp, mapping_dup ); + rwm_mapping_cmp, rwm_mapping_dup ); } avl_insert( &map->remap, (caddr_t)&mapping[1], - mapping_cmp, mapping_dup ); + rwm_mapping_cmp, rwm_mapping_dup ); return 0; diff --git a/servers/slapd/overlays/rwmmap.c b/servers/slapd/overlays/rwmmap.c index 16fbbe549b..8e85dac706 100644 --- a/servers/slapd/overlays/rwmmap.c +++ b/servers/slapd/overlays/rwmmap.c @@ -37,7 +37,7 @@ #include "../../../libraries/libldap/ldap-int.h" int -mapping_cmp ( const void *c1, const void *c2 ) +rwm_mapping_cmp ( const void *c1, const void *c2 ) { struct ldapmapping *map1 = (struct ldapmapping *)c1; struct ldapmapping *map2 = (struct ldapmapping *)c2; @@ -47,7 +47,7 @@ mapping_cmp ( const void *c1, const void *c2 ) } int -mapping_dup ( void *c1, void *c2 ) +rwm_mapping_dup ( void *c1, void *c2 ) { struct ldapmapping *map1 = (struct ldapmapping *)c1; struct ldapmapping *map2 = (struct ldapmapping *)c2; @@ -76,9 +76,9 @@ rwm_map_init ( struct ldapmap *lm, struct ldapmapping **m ) mapping[1].dst = mapping->dst; avl_insert( &lm->map, (caddr_t)mapping, - mapping_cmp, mapping_dup ); + rwm_mapping_cmp, rwm_mapping_dup ); avl_insert( &lm->remap, (caddr_t)&mapping[1], - mapping_cmp, mapping_dup ); + rwm_mapping_cmp, rwm_mapping_dup ); *m = mapping; } @@ -97,7 +97,7 @@ rwm_map ( struct ldapmap *map, struct berval *s, struct berval *bv, bv->bv_len = 0; bv->bv_val = NULL; fmapping.src = *s; - mapping = (struct ldapmapping *)avl_find( tree, (caddr_t)&fmapping, mapping_cmp ); + mapping = (struct ldapmapping *)avl_find( tree, (caddr_t)&fmapping, rwm_mapping_cmp ); if (mapping != NULL) { if ( mapping->dst.bv_val ) *bv = mapping->dst; @@ -150,7 +150,7 @@ rwm_map_attrs( return LDAP_SUCCESS; } -int +static int map_attr_value( dncookie *dc, AttributeDescription *ad, @@ -554,7 +554,7 @@ rwm_dnattr_result_rewrite( } void -mapping_free( void *v_mapping ) +rwm_mapping_free( void *v_mapping ) { struct ldapmapping *mapping = v_mapping; ch_free( mapping->src.bv_val );