This commit was manufactured by cvs2svn to create tag
'APU_1_0_0_RC5'.

git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/tags/APU_1_0_0_RC5@59106 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/.cvsignore b/.cvsignore
index eebb614..b3a7f82 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -11,7 +11,7 @@
 libaprutil*.la
 aprutil.exp
 exports.c
-export_vars.[ch]
+export_vars.h
 export_vars.sh
 apu-config
 apu-config.out
@@ -36,4 +36,4 @@
 autom4te.cache
 build-outputs.mk
 .make.dirs
-apr-util*.pc
+apr-util.pc
diff --git a/CHANGES b/CHANGES
index 812e957..c93374b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,5 @@
 Changes with APR-util 1.0
 
-  *) Add an RPM spec file derived from Fedora Core.
-     [Graham Leggett, Joe Orton]
-
   *) The whole codebase was relicensed and is now available under
      the Apache License, Version 2.0 (http://www.apache.org/licenses).
      [Apache Software Foundation]
diff --git a/buckets/apr_buckets_alloc.c b/buckets/apr_buckets_alloc.c
index e7e113a..7a9e7b1 100644
--- a/buckets/apr_buckets_alloc.c
+++ b/buckets/apr_buckets_alloc.c
@@ -13,8 +13,6 @@
  * limitations under the License.
  */
 
-#include <stdlib.h>
-
 #include "apr_buckets.h"
 #include "apr_allocator.h"
 
@@ -51,18 +49,8 @@
 APU_DECLARE_NONSTD(apr_bucket_alloc_t *) apr_bucket_alloc_create(apr_pool_t *p)
 {
     apr_allocator_t *allocator = apr_pool_allocator_get(p);
-    apr_bucket_alloc_t *list;
+    apr_bucket_alloc_t *list = apr_bucket_alloc_create_ex(allocator);
 
-#ifdef APR_POOL_DEBUG
-    /* may be NULL for debug mode. */
-    if (allocator == NULL) {
-        if (apr_allocator_create(&allocator) != APR_SUCCESS) {
-            abort();
-        }
-    }
-#endif
-
-    list = apr_bucket_alloc_create_ex(allocator);
     list->pool = p;
     apr_pool_cleanup_register(list->pool, list, alloc_cleanup,
                               apr_pool_cleanup_null);
@@ -94,12 +82,6 @@
     }
 
     apr_allocator_free(list->allocator, list->blocks);
-
-#ifdef APR_POOL_DEBUG
-    if (list->pool && list->allocator != apr_pool_allocator_get(list->pool)) {
-        apr_allocator_destroy(list->allocator);
-    }
-#endif
 }
 
 APU_DECLARE_NONSTD(void *) apr_bucket_alloc(apr_size_t size, 
diff --git a/build/apu-conf.m4 b/build/apu-conf.m4
index c57992d..663653e 100644
--- a/build/apu-conf.m4
+++ b/build/apu-conf.m4
@@ -26,7 +26,11 @@
 
   AC_SUBST(APR_INCLUDES)
   AC_SUBST(APR_LIBS)
+
+  dnl ### would be nice to obsolete these
+  APR_SOURCE_DIR="`$apr_config --srcdir`"
   AC_SUBST(APR_BUILD_DIR)
+  AC_SUBST(APR_SOURCE_DIR)
 ])
 
 
diff --git a/include/apr_buckets.h b/include/apr_buckets.h
index 81c29b2..e0bb5bf 100644
--- a/include/apr_buckets.h
+++ b/include/apr_buckets.h
@@ -701,6 +701,17 @@
                                                 apr_off_t point,
                                                 apr_bucket **after_point);
 
+#if APR_NOT_DONE_YET
+/**
+ * consume nbytes from beginning of b -- call apr_bucket_destroy as
+ * appropriate, and/or modify start on last element 
+ * @param b The brigade to consume data from
+ * @param nbytes The number of bytes to consume
+ */
+APU_DECLARE(void) apr_brigade_consume(apr_bucket_brigade *b,
+                                      apr_off_t nbytes);
+#endif
+
 /**
  * Return the total length of the brigade.
  * @param bb The brigade to compute the length of
diff --git a/include/apr_xml.h b/include/apr_xml.h
index 6ff4c88..6c9ea41 100644
--- a/include/apr_xml.h
+++ b/include/apr_xml.h
@@ -29,9 +29,6 @@
 #include "apr_file_io.h"
 
 #include "apu.h"
-#if APR_CHARSET_EBCDIC
-#include "apr_xlate.h"
-#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -335,19 +332,6 @@
 /** Get the URI item for this XML element */
 #define APR_XML_GET_URI_ITEM(ary, i) (((const char * const *)(ary)->elts)[i])
 
-#if APR_CHARSET_EBCDIC
-/**
- * Convert parsed tree in EBCDIC 
- * @param p The pool to allocate out of
- * @param pdoc The apr_xml_doc to convert.
- * @param xlate The translation handle to use.
- * @return Any errors found during conversion.
- */
-APU_DECLARE(apr_status_t) apr_xml_parser_convert_doc(apr_pool_t *p,
-                                                     apr_xml_doc *pdoc,
-                                                     apr_xlate_t *convset);
-#endif
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/apu_version.h b/include/apu_version.h
index e2e009b..4a33488 100644
--- a/include/apu_version.h
+++ b/include/apu_version.h
@@ -64,13 +64,6 @@
 /** patch level */
 #define APU_PATCH_VERSION       0
 
-/** 
- *  This symbol is defined for internal, "development" copies of APU. This
- *  symbol will be #undef'd for releases. 
- */
-#define APU_IS_DEV_VERSION
-
-
 /** The formatted string of APU's version */
 #define APU_VERSION_STRING \
      APR_STRINGIFY(APU_MAJOR_VERSION) "." \
diff --git a/ldap/.cvsignore b/ldap/.cvsignore
deleted file mode 100644
index 06e18a7..0000000
--- a/ldap/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-*.lo
-.libs
diff --git a/ldap/apr_ldap_compat.c b/ldap/apr_ldap_compat.c
deleted file mode 100644
index 8057081..0000000
--- a/ldap/apr_ldap_compat.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright 2000-2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * apr_ldap_compat.c: LDAP v2/v3 compatibility things
- * 
- * Original code from auth_ldap module for Apache v1.3:
- * Copyright 1998, 1999 Enbridge Pipelines Inc. 
- * Copyright 1999-2001 Dave Carrigan
- */
-
-#include <apr_ldap.h>
-
-#if APR_HAS_LDAP
-
-
-/* 
- * Compatibility for LDAPv2 libraries. Differences between LDAPv2 and 
- * LDAPv3, as they affect this module
- * 
- *  LDAPv3 uses ldap_search_ext_s; LDAPv2 uses only basic ldap_search_s
- *
- *  LDAPv3 uses ldap_memfree; LDAPv2 just uses free().
- *
- * In this section, we just implement the LDAPv3 SDK functions that are 
- * missing in LDAPv2. 
- * 
- */
-#if LDAP_VERSION_MAX == 2
-
-/*
- * LDAPv2 doesn't support extended search. Since auth_ldap doesn't use
- * it anyway, we just translate the extended search into a normal search.
- */
-int ldap_search_ext_s(LDAP *ldap, char *base, int scope, char *filter,
-		      char **attrs, int attrsonly, void *servertrls, void *clientctrls,
-		      void *timeout, int sizelimit, LDAPMessage **res)
-{
-    return ldap_search_s(ldap, base, scope, filter, attrs, attrsonly, res);
-}
-
-void ldap_memfree(void *p)
-{
-    free(p);
-}
-
-#endif /* if LDAP_VERSION_MAX */
-
-#endif /* APR_HAS_LDAP */
diff --git a/ldap/apr_ldap_url.c b/ldap/apr_ldap_url.c
deleted file mode 100644
index 81581c8..0000000
--- a/ldap/apr_ldap_url.c
+++ /dev/null
@@ -1,722 +0,0 @@
-/* Copyright 2000-2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* Portions Copyright 1998-2002 The OpenLDAP Foundation
- * All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted only as authorized by the OpenLDAP
- * Public License.  A copy of this license is available at
- * http://www.OpenLDAP.org/license.html or in file LICENSE in the
- * top-level directory of the distribution.
- * 
- * OpenLDAP is a registered trademark of the OpenLDAP Foundation.
- * 
- * Individual files and/or contributed packages may be copyright by
- * other parties and subject to additional restrictions.
- * 
- * This work is derived from the University of Michigan LDAP v3.3
- * distribution.  Information concerning this software is available
- * at: http://www.umich.edu/~dirsvcs/ldap/
- * 
- * This work also contains materials derived from public sources.
- * 
- * Additional information about OpenLDAP can be obtained at:
- *     http://www.openldap.org/
- */
-
-/* 
- * Portions Copyright (c) 1992-1996 Regents of the University of Michigan.
- * All rights reserved.
- * 
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-/*  apr_ldap_url.c -- LDAP URL (RFC 2255) related routines
- *
- *  Win32 and perhaps other non-OpenLDAP based ldap libraries may be
- *  missing ldap_url_* APIs.  We focus here on the one significant
- *  aspect, which is parsing.  We have [for the time being] omitted
- *  the ldap_url_search APIs.
- *
- *  LDAP URLs look like this:
- *    ldap[is]://host:port[/[dn[?[attributes][?[scope][?[filter][?exts]]]]]]
- *
- *  where:
- *   attributes is a comma separated list
- *   scope is one of these three strings:  base one sub (default=base)
- *   filter is an string-represented filter as in RFC 2254
- *
- *  e.g.,  ldap://host:port/dc=com?o,cn?base?o=openldap?extension
- *
- *  Tolerates URLs that look like: <ldapurl> and <URL:ldapurl>
- */
-
-#include "apr_ldap.h"
-
-#if APR_HAS_LDAP
-
-#if !APR_HAS_LDAP_URL_PARSE
-
-#include "apr_general.h"
-#include "apr_strings.h"
-
-#ifndef LDAPS_PORT
-#define LDAPS_PORT              636  /* ldaps:/// default LDAP over TLS port */
-#endif
-
-#define LDAP_URL_PREFIX         "ldap://"
-#define LDAP_URL_PREFIX_LEN     (sizeof(LDAP_URL_PREFIX)-1)
-#define LDAPS_URL_PREFIX        "ldaps://"
-#define LDAPS_URL_PREFIX_LEN    (sizeof(LDAPS_URL_PREFIX)-1)
-#define LDAPI_URL_PREFIX        "ldapi://"
-#define LDAPI_URL_PREFIX_LEN    (sizeof(LDAPI_URL_PREFIX)-1)
-#define LDAP_URL_URLCOLON       "URL:"
-#define LDAP_URL_URLCOLON_LEN   (sizeof(LDAP_URL_URLCOLON)-1)
-
-#define LDAP_STRDUP(x) strdup(x)
-#define LDAP_CALLOC(n, s) calloc(n, s)
-#define LDAP_MALLOC(n) malloc(n)
-#define LDAP_REALLOC(x, n) realloc(x, n)
-#define LDAP_FREE(x) free(x)
-#define LDAP_VFREE(a) ldap_charray_free(a)
-
-#define ldap_utf8_strchr(x, s) strchr(x, *s)
-#define ldap_utf8_strtok(x, s, l) apr_strtok(x, s, l)
-
-/* local functions */
-static const char* skip_url_prefix(const char *url, int *enclosedp,
-                                   const char **scheme);
-
-static void ldap_pvt_hex_unescape(char *s);
-
-static int ldap_pvt_unhex(int c);
-
-static void ldap_charray_free(char **a);
-
-static char **ldap_str2charray(const char *str, const char *brkstr);
-
-APU_DECLARE(int) apr_ldap_is_ldap_url(const char *url)
-{
-    int enclosed;
-    const char * scheme;
-
-    if( url == NULL ) {
-        return 0;
-    }
-
-    if( skip_url_prefix( url, &enclosed, &scheme ) == NULL ) {
-        return 0;
-    }
-
-    return 1;
-}
-
-APU_DECLARE(int) apr_ldap_is_ldaps_url(const char *url)
-{
-    int enclosed;
-    const char * scheme;
-
-    if( url == NULL ) {
-        return 0;
-    }
-
-    if( skip_url_prefix( url, &enclosed, &scheme ) == NULL ) {
-        return 0;
-    }
-
-    return strcmp(scheme, "ldaps") == 0;
-}
-
-APU_DECLARE(int) apr_ldap_is_ldapi_url(const char *url)
-{
-    int enclosed;
-    const char * scheme;
-
-    if( url == NULL ) {
-        return 0;
-    }
-
-    if( skip_url_prefix( url, &enclosed, &scheme ) == NULL ) {
-        return 0;
-    }
-
-    return strcmp(scheme, "ldapi") == 0;
-}
-
-static const char *skip_url_prefix(const char *url, int *enclosedp,
-                                   const char **scheme)
-{
-    /*
-     * return non-zero if this looks like a LDAP URL; zero if not
-     * if non-zero returned, *urlp will be moved past "ldap://" part of URL
-     */
-    const char *p;
-
-    if ( url == NULL ) {
-        return( NULL );
-    }
-
-    p = url;
-
-    /* skip leading '<' (if any) */
-    if ( *p == '<' ) {
-        *enclosedp = 1;
-        ++p;
-    } else {
-        *enclosedp = 0;
-    }
-
-    /* skip leading "URL:" (if any) */
-    if ( strncasecmp( p, LDAP_URL_URLCOLON, LDAP_URL_URLCOLON_LEN ) == 0 ) {
-        p += LDAP_URL_URLCOLON_LEN;
-    }
-
-    /* check for "ldap://" prefix */
-    if ( strncasecmp( p, LDAP_URL_PREFIX, LDAP_URL_PREFIX_LEN ) == 0 ) {
-        /* skip over "ldap://" prefix and return success */
-        p += LDAP_URL_PREFIX_LEN;
-        *scheme = "ldap";
-        return( p );
-    }
-
-    /* check for "ldaps://" prefix */
-    if ( strncasecmp( p, LDAPS_URL_PREFIX, LDAPS_URL_PREFIX_LEN ) == 0 ) {
-        /* skip over "ldaps://" prefix and return success */
-        p += LDAPS_URL_PREFIX_LEN;
-        *scheme = "ldaps";
-        return( p );
-    }
-
-    /* check for "ldapi://" prefix */
-    if ( strncasecmp( p, LDAPI_URL_PREFIX, LDAPI_URL_PREFIX_LEN ) == 0 ) {
-        /* skip over "ldapi://" prefix and return success */
-        p += LDAPI_URL_PREFIX_LEN;
-        *scheme = "ldapi";
-        return( p );
-    }
-
-    return( NULL );
-}
-
-
-static int str2scope(const char *p)
-{
-    if ( strcasecmp( p, "one" ) == 0 ) {
-        return LDAP_SCOPE_ONELEVEL;
-
-    } else if ( strcasecmp( p, "onetree" ) == 0 ) {
-        return LDAP_SCOPE_ONELEVEL;
-
-    } else if ( strcasecmp( p, "base" ) == 0 ) {
-        return LDAP_SCOPE_BASE;
-
-    } else if ( strcasecmp( p, "sub" ) == 0 ) {
-        return LDAP_SCOPE_SUBTREE;
-
-    } else if ( strcasecmp( p, "subtree" ) == 0 ) {
-        return LDAP_SCOPE_SUBTREE;
-    }
-
-    return( -1 );
-}
-
-
-static int ldap_url_parse_ext(const char *url_in, 
-                              apr_ldap_url_desc_t **ludpp)
-{
-/*
- *  Pick apart the pieces of an LDAP URL.
- */
-    apr_ldap_url_desc_t *ludp;
-    char        *p, *q, *r;
-    int         i, enclosed;
-    const char  *scheme = NULL;
-    const char  *url_tmp;
-    char        *url;
-
-    if( url_in == NULL || ludpp == NULL ) {
-        return LDAP_URL_ERR_PARAM;
-    }
-
-    *ludpp = NULL;  /* pessimistic */
-
-    url_tmp = skip_url_prefix( url_in, &enclosed, &scheme );
-
-    if ( url_tmp == NULL ) {
-        return LDAP_URL_ERR_BADSCHEME;
-    }
-
-    /* make working copy of the remainder of the URL */
-    url = LDAP_STRDUP( url_tmp );
-    if ( url == NULL ) {
-        return LDAP_URL_ERR_MEM;
-    }
-
-    if ( enclosed ) {
-        p = &url[strlen(url)-1];
-
-        if( *p != '>' ) {
-            LDAP_FREE( url );
-            return LDAP_URL_ERR_BADENCLOSURE;
-        }
-
-        *p = '\0';
-    }
-
-    /* allocate return struct */
-    ludp = (apr_ldap_url_desc_t *)LDAP_CALLOC( 1, sizeof( apr_ldap_url_desc_t ));
-
-    if ( ludp == NULL ) {
-        LDAP_FREE( url );
-        return LDAP_URL_ERR_MEM;
-    }
-
-    ludp->lud_next = NULL;
-    ludp->lud_host = NULL;
-    ludp->lud_port = LDAP_PORT;
-    ludp->lud_dn = NULL;
-    ludp->lud_attrs = NULL;
-    ludp->lud_filter = NULL;
-    ludp->lud_scope = -1;
-    ludp->lud_filter = NULL;
-    ludp->lud_exts = NULL;
-
-    ludp->lud_scheme = LDAP_STRDUP( scheme );
-
-    if ( ludp->lud_scheme == NULL ) {
-        LDAP_FREE( url );
-        apr_ldap_free_urldesc( ludp );
-        return LDAP_URL_ERR_MEM;
-    }
-
-    if( strcasecmp( ludp->lud_scheme, "ldaps" ) == 0 ) {
-        ludp->lud_port = LDAPS_PORT;
-    }
-
-    /* scan forward for '/' that marks end of hostport and begin. of dn */
-    p = strchr( url, '/' );
-
-    if( p != NULL ) {
-        /* terminate hostport; point to start of dn */
-        *p++ = '\0';
-    }
-
-    /* IPv6 syntax with [ip address]:port */
-    if ( *url == '[' ) {
-        r = strchr( url, ']' );
-        if ( r == NULL ) {
-            LDAP_FREE( url );
-            apr_ldap_free_urldesc( ludp );
-            return LDAP_URL_ERR_BADURL;
-        }
-        *r++ = '\0';
-        q = strchr( r, ':' );
-    } else {
-        q = strchr( url, ':' );
-    }
-
-    if ( q != NULL ) {
-        *q++ = '\0';
-        ldap_pvt_hex_unescape( q );
-
-        if( *q == '\0' ) {
-            LDAP_FREE( url );
-            apr_ldap_free_urldesc( ludp );
-            return LDAP_URL_ERR_BADURL;
-        }
-
-        ludp->lud_port = atoi( q );
-    }
-
-    ldap_pvt_hex_unescape( url );
-
-    /* If [ip address]:port syntax, url is [ip and we skip the [ */
-    ludp->lud_host = LDAP_STRDUP( url + ( *url == '[' ) );
-
-    if( ludp->lud_host == NULL ) {
-        LDAP_FREE( url );
-        apr_ldap_free_urldesc( ludp );
-        return LDAP_URL_ERR_MEM;
-    }
-
-    /*
-     * Kludge.  ldap://111.222.333.444:389??cn=abc,o=company
-     *
-     * On early Novell releases, search references/referrals were returned
-     * in this format, i.e., the dn was kind of in the scope position,
-     * but the required slash is missing. The whole thing is illegal syntax,
-     * but we need to account for it. Fortunately it can't be confused with
-     * anything real.
-     */
-    if( (p == NULL) && (q != NULL) && ((q = strchr( q, '?')) != NULL)) {
-        q++;
-        /* ? immediately followed by question */
-        if( *q == '?') {
-            q++;
-            if( *q != '\0' ) {
-                /* parse dn part */
-                ldap_pvt_hex_unescape( q );
-                ludp->lud_dn = LDAP_STRDUP( q );
-            } else {
-                ludp->lud_dn = LDAP_STRDUP( "" );
-            }
-
-            if( ludp->lud_dn == NULL ) {
-                LDAP_FREE( url );
-                apr_ldap_free_urldesc( ludp );
-                return LDAP_URL_ERR_MEM;
-            }
-        }
-    }
-
-    if( p == NULL ) {
-        LDAP_FREE( url );
-        *ludpp = ludp;
-        return LDAP_URL_SUCCESS;
-    }
-
-    /* scan forward for '?' that may marks end of dn */
-    q = strchr( p, '?' );
-
-    if( q != NULL ) {
-        /* terminate dn part */
-        *q++ = '\0';
-    }
-
-    if( *p != '\0' ) {
-        /* parse dn part */
-        ldap_pvt_hex_unescape( p );
-        ludp->lud_dn = LDAP_STRDUP( p );
-    } else {
-        ludp->lud_dn = LDAP_STRDUP( "" );
-    }
-
-    if( ludp->lud_dn == NULL ) {
-        LDAP_FREE( url );
-        apr_ldap_free_urldesc( ludp );
-        return LDAP_URL_ERR_MEM;
-    }
-
-    if( q == NULL ) {
-        /* no more */
-        LDAP_FREE( url );
-        *ludpp = ludp;
-        return LDAP_URL_SUCCESS;
-    }
-
-    /* scan forward for '?' that may marks end of attributes */
-    p = q;
-    q = strchr( p, '?' );
-
-    if( q != NULL ) {
-        /* terminate attributes part */
-        *q++ = '\0';
-    }
-
-    if( *p != '\0' ) {
-        /* parse attributes */
-        ldap_pvt_hex_unescape( p );
-        ludp->lud_attrs = ldap_str2charray( p, "," );
-
-        if( ludp->lud_attrs == NULL ) {
-            LDAP_FREE( url );
-            apr_ldap_free_urldesc( ludp );
-            return LDAP_URL_ERR_BADATTRS;
-        }
-    }
-
-    if ( q == NULL ) {
-        /* no more */
-        LDAP_FREE( url );
-        *ludpp = ludp;
-        return LDAP_URL_SUCCESS;
-    }
-
-    /* scan forward for '?' that may marks end of scope */
-    p = q;
-    q = strchr( p, '?' );
-
-    if( q != NULL ) {
-        /* terminate the scope part */
-        *q++ = '\0';
-    }
-
-    if( *p != '\0' ) {
-        /* parse the scope */
-        ldap_pvt_hex_unescape( p );
-        ludp->lud_scope = str2scope( p );
-
-        if( ludp->lud_scope == -1 ) {
-            LDAP_FREE( url );
-            apr_ldap_free_urldesc( ludp );
-            return LDAP_URL_ERR_BADSCOPE;
-        }
-    }
-
-    if ( q == NULL ) {
-        /* no more */
-        LDAP_FREE( url );
-        *ludpp = ludp;
-        return LDAP_URL_SUCCESS;
-    }
-
-    /* scan forward for '?' that may marks end of filter */
-    p = q;
-    q = strchr( p, '?' );
-
-    if( q != NULL ) {
-        /* terminate the filter part */
-        *q++ = '\0';
-    }
-
-    if( *p != '\0' ) {
-        /* parse the filter */
-        ldap_pvt_hex_unescape( p );
-
-        if( ! *p ) {
-            /* missing filter */
-            LDAP_FREE( url );
-            apr_ldap_free_urldesc( ludp );
-            return LDAP_URL_ERR_BADFILTER;
-        }
-
-        LDAP_FREE( ludp->lud_filter );
-        ludp->lud_filter = LDAP_STRDUP( p );
-
-        if( ludp->lud_filter == NULL ) {
-            LDAP_FREE( url );
-            apr_ldap_free_urldesc( ludp );
-            return LDAP_URL_ERR_MEM;
-        }
-    }
-
-    if ( q == NULL ) {
-        /* no more */
-        LDAP_FREE( url );
-        *ludpp = ludp;
-        return LDAP_URL_SUCCESS;
-    }
-
-    /* scan forward for '?' that may marks end of extensions */
-    p = q;
-    q = strchr( p, '?' );
-
-    if( q != NULL ) {
-        /* extra '?' */
-        LDAP_FREE( url );
-        apr_ldap_free_urldesc( ludp );
-        return LDAP_URL_ERR_BADURL;
-    }
-
-    /* parse the extensions */
-    ludp->lud_exts = ldap_str2charray( p, "," );
-
-    if( ludp->lud_exts == NULL ) {
-        LDAP_FREE( url );
-        apr_ldap_free_urldesc( ludp );
-        return LDAP_URL_ERR_BADEXTS;
-    }
-
-    for( i=0; ludp->lud_exts[i] != NULL; i++ ) {
-        ldap_pvt_hex_unescape( ludp->lud_exts[i] );
-
-        if( *ludp->lud_exts[i] == '!' ) {
-            /* count the number of critical extensions */
-            ludp->lud_crit_exts++;
-        }
-    }
-
-    if( i == 0 ) {
-        /* must have 1 or more */
-        LDAP_FREE( url );
-        apr_ldap_free_urldesc( ludp );
-        return LDAP_URL_ERR_BADEXTS;
-    }
-
-    /* no more */
-    *ludpp = ludp;
-    LDAP_FREE( url );
-    return LDAP_URL_SUCCESS;
-}
-
-APU_DECLARE(int) apr_ldap_url_parse(const char *url_in, 
-                                    apr_ldap_url_desc_t **ludpp)
-{
-    int rc = ldap_url_parse_ext( url_in, ludpp );
-
-    if( rc != LDAP_URL_SUCCESS ) {
-        return rc;
-    }
-
-    if ((*ludpp)->lud_scope == -1) {
-        (*ludpp)->lud_scope = LDAP_SCOPE_BASE;
-    }
-
-    if ((*ludpp)->lud_host != NULL && *(*ludpp)->lud_host == '\0') {
-        LDAP_FREE( (*ludpp)->lud_host );
-        (*ludpp)->lud_host = NULL;
-    }
-
-    return rc;
-}
-
-APU_DECLARE(void) apr_ldap_free_urldesc(apr_ldap_url_desc_t *ludp)
-{
-    if ( ludp == NULL ) {
-        return;
-    }
-    
-    if ( ludp->lud_scheme != NULL ) {
-        LDAP_FREE( ludp->lud_scheme );
-    }
-
-    if ( ludp->lud_host != NULL ) {
-        LDAP_FREE( ludp->lud_host );
-    }
-
-    if ( ludp->lud_dn != NULL ) {
-        LDAP_FREE( ludp->lud_dn );
-    }
-
-    if ( ludp->lud_filter != NULL ) {
-        LDAP_FREE( ludp->lud_filter);
-    }
-
-    if ( ludp->lud_attrs != NULL ) {
-        LDAP_VFREE( ludp->lud_attrs );
-    }
-
-    if ( ludp->lud_exts != NULL ) {
-        LDAP_VFREE( ludp->lud_exts );
-    }
-
-    LDAP_FREE( ludp );
-}
-
-
-static void ldap_pvt_hex_unescape(char *s)
-{
-    /*
-     * Remove URL hex escapes from s... done in place.  The basic concept for
-     * this routine is borrowed from the WWW library HTUnEscape() routine.
-     */
-    char    *p;
-
-    for ( p = s; *s != '\0'; ++s ) {
-        if ( *s == '%' ) {
-            if ( *++s == '\0' ) {
-                break;
-            }
-            *p = ldap_pvt_unhex( *s ) << 4;
-            if ( *++s == '\0' ) {
-                break;
-            }
-            *p++ += ldap_pvt_unhex( *s );
-        } else {
-            *p++ = *s;
-        }
-    }
-
-    *p = '\0';
-}
-
-
-static int ldap_pvt_unhex(int c)
-{
-    return( c >= '0' && c <= '9' ? c - '0'
-        : c >= 'A' && c <= 'F' ? c - 'A' + 10
-        : c - 'a' + 10 );
-}
-
-
-static void ldap_charray_free(char **a)
-{
-    char    **p;
-
-    if ( a == NULL ) {
-        return;
-    }
-
-    for ( p = a; *p != NULL; p++ ) {
-        if ( *p != NULL ) {
-            LDAP_FREE( *p );
-        }
-    }
-
-    LDAP_FREE( (char *) a );
-}
-
-static char **ldap_str2charray(const char *str_in, const char *brkstr)
-{
-    char    **res;
-    char    *str, *s;
-    char    *lasts;
-    int i;
-
-    /* protect the input string from strtok */
-    str = LDAP_STRDUP( str_in );
-    if( str == NULL ) {
-        return NULL;
-    }
-
-    i = 1;
-    for ( s = str; *s; s++ ) {
-        if ( ldap_utf8_strchr( brkstr, s ) != NULL ) {
-            i++;
-        }
-    }
-
-    res = (char **) LDAP_MALLOC( (i + 1) * sizeof(char *) );
-
-    if( res == NULL ) {
-        LDAP_FREE( str );
-        return NULL;
-    }
-
-    i = 0;
-
-    for ( s = ldap_utf8_strtok( str, brkstr, &lasts );
-        s != NULL;
-        s = ldap_utf8_strtok( NULL, brkstr, &lasts ) )
-    {
-        res[i] = LDAP_STRDUP( s );
-
-        if(res[i] == NULL) {
-            for( --i ; i >= 0 ; i-- ) {
-                LDAP_FREE( res[i] );
-            }
-            LDAP_FREE( res );
-            LDAP_FREE( str );
-            return NULL;
-        }
-
-        i++;
-    }
-
-    res[i] = NULL;
-
-    LDAP_FREE( str );
-    return( res );
-}
-
-#endif /* !APR_HAS_LDAP_URL_PARSE */
-
-#endif /* APR_HAS_LDAP */
diff --git a/renames_pending b/renames_pending
deleted file mode 100644
index 0ebcfe2..0000000
--- a/renames_pending
+++ /dev/null
@@ -1,2 +0,0 @@
-Symbol renames pending for apr-util (keep ordered and complete, please!)
-
diff --git a/test/testrmm.c b/test/testrmm.c
index 8203be1..c4dc989 100644
--- a/test/testrmm.c
+++ b/test/testrmm.c
@@ -51,7 +51,7 @@
     }
 
     /* We're going to want 10 blocks of data from our target rmm. */
-    size = SHARED_SIZE + apr_rmm_overhead_get(FRAG_COUNT + 1);
+    size = SHARED_SIZE + apr_rmm_overhead_get(FRAG_COUNT);
     printf("Creating anonymous shared memory (%"
            APR_SIZE_T_FMT " bytes).....", size); 
     rv = apr_shm_create(&shm, size, NULL, pool);
@@ -87,24 +87,6 @@
     else {
         return APR_EGENERAL;  
     }
-
-    printf("Checking each fragment for address alignment.....");
-    for (i = 0; i < FRAG_COUNT; i++) {
-        char *c = apr_rmm_addr_get(rmm, off[i]);
-        apr_size_t sc = (apr_size_t)c;
-
-        if (off[i] == 0) {
-            printf("allocation failed for offset %d\n", i);
-            return APR_ENOMEM;
-        }
-
-        if (sc & 7) {
-            printf("Bad alignment for fragment %d; %p not %p!\n",
-                   i, c, (void *)APR_ALIGN_DEFAULT((apr_size_t)c));
-            return APR_EGENERAL;
-        }
-    }
-    fprintf(stdout, "OK\n");   
     
     printf("Setting each fragment to a unique value..........");
     for (i = 0; i < FRAG_COUNT; i++) {
diff --git a/xlate/xlate.c b/xlate/xlate.c
index 4a4f6b5..b75c15d 100644
--- a/xlate/xlate.c
+++ b/xlate/xlate.c
@@ -178,10 +178,9 @@
     else {
         /* reset the iconv descriptor, since it's now in an undefined
          * state. */
-        apr_iconv_close(convset->ich, convset->pool);
-        rv = apr_iconv_open(convset->topage, convset->frompage, 
-                            convset->pool, &convset->ich);
-     }
+        apr_iconv_close(convset->ich);
+        convset->ich = apr_iconv_open(convset->topage, convset->frompage);
+    }
 }
 #endif /* APU_HAVE_APR_ICONV */
 
diff --git a/xml/apr_xml.c b/xml/apr_xml.c
index 4520e8d..f7484ac 100644
--- a/xml/apr_xml.c
+++ b/xml/apr_xml.c
@@ -32,19 +32,15 @@
 
 #define DEBUG_CR "\r\n"
 
-static const char APR_KW_xmlns[] = { 0x78, 0x6D, 0x6C, 0x6E, 0x73, '\0' };
-static const char APR_KW_xmlns_lang[] = { 0x78, 0x6D, 0x6C, 0x3A, 0x6C, 0x61, 0x6E, 0x67, '\0' };
-static const char APR_KW_DAV[] = { 0x44, 0x41, 0x56, 0x3A, '\0' };
-
 /* errors related to namespace processing */
 #define APR_XML_NS_ERROR_UNKNOWN_PREFIX (-1000)
 #define APR_XML_NS_ERROR_INVALID_DECL (-1001)
 
 /* test for a namespace prefix that begins with [Xx][Mm][Ll] */
 #define APR_XML_NS_IS_RESERVED(name) \
-	( (name[0] == 0x58 || name[0] == 0x78) && \
-	  (name[1] == 0x4D || name[1] == 0x6D) && \
-	  (name[2] == 0x4C || name[2] == 0x6C) )
+	( (name[0] == 'X' || name[0] == 'x') && \
+	  (name[1] == 'M' || name[1] == 'm') && \
+	  (name[2] == 'L' || name[2] == 'l') )
 
 
 /* the real (internal) definition of the parser context */
@@ -171,12 +167,12 @@
     for (prev = NULL, attr = elem->attr;
 	 attr;
 	 attr = attr->next) {
-	if (strncmp(attr->name, APR_KW_xmlns, 5) == 0) {
+	if (strncmp(attr->name, "xmlns", 5) == 0) {
 	    const char *prefix = &attr->name[5];
 	    apr_xml_ns_scope *ns_scope;
 
 	    /* test for xmlns:foo= form and xmlns= form */
-	    if (*prefix == 0x3A) {
+	    if (*prefix == ':') {
                 /* a namespace prefix declaration must have a
                    non-empty value. */
                 if (attr->value[0] == '\0') {
@@ -210,7 +206,7 @@
 
 	    /* Note: prev will not be advanced since we just removed "attr" */
 	}
-	else if (strcmp(attr->name, APR_KW_xmlns_lang) == 0) {
+	else if (strcmp(attr->name, "xml:lang") == 0) {
 	    /* save away the language (in quoted form) */
 	    elem->lang = apr_xml_quote_string(parser->p, attr->value, 1);
 
@@ -238,7 +234,7 @@
 	elem->lang = elem->parent->lang;
 
     /* adjust the element's namespace */
-    colon = strchr(elem_name, 0x3A);
+    colon = strchr(elem_name, ':');
     if (colon == NULL) {
 	/*
 	 * The element is using the default namespace, which will always
@@ -270,7 +266,7 @@
          */
         char *attr_name = (char *)attr->name;
 
-	colon = strchr(attr_name, 0x3A);
+	colon = strchr(attr_name, ':');
 	if (colon == NULL) {
 	    /*
 	     * Attributes do NOT use the default namespace. Therefore,
@@ -352,7 +348,7 @@
     parser->doc->namespaces = apr_array_make(pool, 5, sizeof(const char *));
 
     /* ### is there a way to avoid hard-coding this? */
-    apr_xml_insert_uri(parser->doc->namespaces, APR_KW_DAV);
+    apr_xml_insert_uri(parser->doc->namespaces, "DAV:");
 
     parser->xp = XML_ParserCreate(NULL);
     if (parser->xp == NULL) {
@@ -886,90 +882,3 @@
     *pelt = uri;		/* assume uri is const or in a pool */
     return uri_array->nelts - 1;
 }
-
-/* convert the element to EBCDIC */
-#if APR_CHARSET_EBCDIC
-static apr_status_t apr_xml_parser_convert_elem(apr_xml_elem *e,
-                                                apr_xlate_t *convset)
-{
-    apr_xml_attr *a;
-    apr_xml_elem *ec;
-    apr_text *t;
-    apr_size_t inbytes_left, outbytes_left;
-    apr_status_t status;
-
-    inbytes_left = outbytes_left = strlen(e->name);
-    status = apr_xlate_conv_buffer(convset, e->name,  &inbytes_left, (char *) e->name, &outbytes_left);
-    if (status) {
-        return status;
-    }
-
-    for (t = e->first_cdata.first; t != NULL; t = t->next) {
-        inbytes_left = outbytes_left = strlen(t->text);
-        status = apr_xlate_conv_buffer(convset, t->text, &inbytes_left, (char *) t->text, &outbytes_left);
-        if (status) {
-            return status;
-        }
-    }
-
-    for (t = e->following_cdata.first;  t != NULL; t = t->next) {
-        inbytes_left = outbytes_left = strlen(t->text);
-        status = apr_xlate_conv_buffer(convset, t->text, &inbytes_left, (char *) t->text, &outbytes_left);
-        if (status) {
-            return status;
-        }
-    }
-
-    for (a = e->attr; a != NULL; a = a->next) {
-        inbytes_left = outbytes_left = strlen(a->name);
-        status = apr_xlate_conv_buffer(convset, a->name, &inbytes_left, (char *) a->name, &outbytes_left);
-        if (status) {
-            return status;
-        }
-        inbytes_left = outbytes_left = strlen(a->value);
-        status = apr_xlate_conv_buffer(convset, a->value, &inbytes_left, (char *) a->value, &outbytes_left);
-        if (status) {
-            return status;
-        }
-    }
-
-    for (ec = e->first_child; ec != NULL; ec = ec->next) {
-        status = apr_xml_parser_convert_elem(ec, convset);
-        if (status) {
-            return status;
-        }
-    }
-    return APR_SUCCESS;
-}
-
-/* convert the whole document to EBCDIC */
-APU_DECLARE(apr_status_t) apr_xml_parser_convert_doc(apr_pool_t *pool,
-                                                     apr_xml_doc *pdoc,
-                                                     apr_xlate_t *convset)
-{
-    apr_status_t status;
-    /* Don't convert the namespaces: they are constant! */
-    if (pdoc->namespaces != NULL) {
-        int i;
-        apr_array_header_t *namespaces;
-        namespaces = apr_array_make(pool, pdoc->namespaces->nelts, sizeof(const char *));
-        if (namespaces == NULL)
-            return APR_ENOMEM;
-        for (i = 0; i < pdoc->namespaces->nelts; i++) {
-            apr_size_t inbytes_left, outbytes_left;
-            char *ptr = (char *) APR_XML_GET_URI_ITEM(pdoc->namespaces, i);
-            ptr = apr_pstrdup(pool, ptr);
-            if ( ptr == NULL)
-                return APR_ENOMEM;
-            inbytes_left = outbytes_left = strlen(ptr);
-            status = apr_xlate_conv_buffer(convset, ptr, &inbytes_left, ptr, &outbytes_left);
-            if (status) {
-                return status;
-            }
-            apr_xml_insert_uri(namespaces, ptr);
-        }
-        pdoc->namespaces = namespaces;
-    }
-    return apr_xml_parser_convert_elem(pdoc->root, convset);
-}
-#endif