This commit was manufactured by cvs2svn to create tag
'APU_1_0_0_RC3'.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/tags/APU_1_0_0_RC3@59094 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/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/build/rpm/apr-util.spec.in b/build/rpm/apr-util.spec.in
new file mode 100644
index 0000000..72aa425
--- /dev/null
+++ b/build/rpm/apr-util.spec.in
@@ -0,0 +1,90 @@
+
+%define apuver 1
+
+Summary: Apache Portable Runtime Utility library
+Name: apr-util
+Version: APU_VERSION
+Release: APU_RELEASE
+License: Apache Software License
+Group: System Environment/Libraries
+URL: http://apr.apache.org/
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+BuildPrereq: autoconf, libtool, doxygen, apr-devel >= 0:{version}-{release}
+BuildPrereq: openldap-devel, db4-devel, expat-devel
+Conflicts: subversion < 0.20.1-2
+
+%description
+The mission of the Apache Portable Runtime (APR) is to provide a
+free library of C data structures and routines. This library
+contains additional utility interfaces for APR; including support
+for XML, LDAP, database interfaces, URI parsing and more.
+
+%package devel
+Group: Development/Libraries
+Summary: APR utility library development kit
+Requires: apr-util = %{version}-%{release}, apr-devel
+Requires: openldap-devel, db4-devel, expat-devel
+Conflicts: subversion-devel < 0.20.1-2
+
+%description devel
+This package provides the support files which can be used to
+build applications using the APR utility library. The mission
+of the Apache Portable Runtime (APR) is to provide a free
+library of C data structures and routines.
+
+%prep
+%setup -q
+
+%build
+%configure --with-apr=%{_prefix} \
+ --includedir=%{_includedir}/apr-%{apuver} \
+ --with-ldap --without-gdbm
+make %{?_smp_mflags} && make dox
+
+%check
+# Run non-interactive tests
+pushd test
+make %{?_smp_mflags} testall CFLAGS=-fno-strict-aliasing
+./testall -v || exit 1
+popd
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# Documentation
+mv docs/dox/html html
+
+# Unpackaged files
+rm -f $RPM_BUILD_ROOT%{_libdir}/aprutil.exp
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%doc CHANGES LICENSE NOTICE
+%{_libdir}/libaprutil-%{apuver}.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%{_bindir}/apu-config
+%{_bindir}/apu-%{apuver}-config
+%{_libdir}/libaprutil-%{apuver}.*a
+%{_libdir}/libaprutil-%{apuver}.so
+%{_libdir}/pkgconfig/apr-util-%{apuver}.pc
+%{_includedir}/apr-%{apuver}/*.h
+%doc --parents html
+
+%changelog
+* Tue Jun 22 2004 Graham Leggett <minfrin@sharp.fm> 1.0.0-1
+- update to support v1.0.0 of APR
+
+* Tue Jun 22 2004 Graham Leggett <minfrin@sharp.fm> 1.0.0-1
+- derived from Fedora Core apr.spec
+
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/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/Makefile.in b/test/Makefile.in
index cfae10f..aaf4261 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -3,7 +3,7 @@
INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@
PROGRAMS = testall testdbm testdate testmd4 testmd5 testxml testrmm \
- testreslist testqueue testpass
+ testreslist testqueue
TARGETS = $(PROGRAMS)
APRUTIL_DOTTED_VERSION=@APRUTIL_DOTTED_VERSION@
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 462c7a6..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,67 +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;
-
- inbytes_left = outbytes_left = strlen(e->name);
- apr_xlate_conv_buffer(convset, e->name, &inbytes_left, (char *) e->name, &outbytes_left);
-
- for (t = e->first_cdata.first; t != NULL; t = t->next) {
- inbytes_left = outbytes_left = strlen(t->text);
- apr_xlate_conv_buffer(convset, t->text, &inbytes_left, (char *) t->text, &outbytes_left);
- }
-
- for (t = e->following_cdata.first; t != NULL; t = t->next) {
- inbytes_left = outbytes_left = strlen(t->text);
- apr_xlate_conv_buffer(convset, t->text, &inbytes_left, (char *) t->text, &outbytes_left);
- }
-
- for (a = e->attr; a != NULL; a = a->next) {
- inbytes_left = outbytes_left = strlen(a->name);
- apr_xlate_conv_buffer(convset, a->name, &inbytes_left, (char *) a->name, &outbytes_left);
- inbytes_left = outbytes_left = strlen(a->value);
- apr_xlate_conv_buffer(convset, a->value, &inbytes_left, (char *) a->value, &outbytes_left);
- }
-
- for (ec = e->first_child; ec != NULL; ec = ec->next)
- apr_xml_parser_convert_elem(ec, convset);
- 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)
-{
- /* 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);
- apr_xlate_conv_buffer(convset, ptr, &inbytes_left, ptr, &outbytes_left);
- apr_xml_insert_uri(namespaces, ptr);
- }
- pdoc->namespaces = namespaces;
- }
- apr_xml_parser_convert_elem(pdoc->root, convset);
- return APR_SUCCESS;
-}
-#endif