You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Justin Erenkrantz <je...@apache.org> on 2002/04/16 07:48:37 UTC
[PATCH] Use apr-util's expat
This patch switches us to using apr-util's detected expat.
'make check' succeeded with installed expat-1.95.2.
Thoughts? This should allow us to remove expat-lite from our
tree and rely on apr-util either finding an installed expat
or using its bundled expat.
This requires recent commits/fixes to apr-util, so if you test
this out, please make sure you are running off HEAD of
apr-util. -- justin
* Makefile.in: Remove SVN_EXPAT_INCLUDES since we rely on apr-util
to determine where expat includes are.
* build.conf: Add SVN_APRUTIL_LIBS in place of libexpat for
dependencies and to all targets that include SVN_APR_LIBS. Remove
libexpat target.
* configure.in: Add usage of --old-expat switch in apu-config
(see recent commits to apr-util) to determine what expat version
we really have. If apr-util says we have an old expat, define
SVN_HAVE_OLD_EXPAT. Remove addition of expat-lite includes.
* subversion/include/svn_xml.h: Add check for SVN_HAVE_OLD_EXPAT
to determine the header name we need to include.
* subversion/libsvn_delta/xml_parse.c: Ditto.
Index: ./Makefile.in
===================================================================
--- ./Makefile.in
+++ ./Makefile.in Mon Apr 15 23:57:28 2002
@@ -52,7 +52,7 @@
LT_LDFLAGS =
INCLUDES = @SVN_EXTRA_INCLUDES@ @SVN_NEON_INCLUDES@ \
- @SVN_EXPAT_INCLUDES@ @SVN_DB_INCLUDES@
+ @SVN_DB_INCLUDES@
APACHE_INCLUDES = @APACHE_INCLUDES@
APACHE_TARGET = @APACHE_TARGET@
Index: ./build.conf
===================================================================
--- ./build.conf
+++ ./build.conf Tue Apr 16 00:22:31 2002
@@ -67,7 +67,7 @@
type = exe
path = subversion/clients/cmdline
libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr
- $(SVN_APR_LIBS) libexpat
+ $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
manpages = subversion/clients/cmdline/man/svn.1
infopages = doc/user/manual/svn-manual.info
doc/user/svn_for_cvs_users/svn_for_cvs_users.info
@@ -81,41 +81,41 @@
type = exe
path = subversion/svnadmin
install = fs-bin
-libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# The subversion repository inspection tool
[svnlook]
type = exe
path = subversion/svnlook
install = fs-bin
-libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# Library needed by all subversion clients
[libsvn_client]
type = lib
path = subversion/libsvn_client
-libs = libsvn_wc libsvn_ra libsvn_delta libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_wc libsvn_ra libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# Routines for binary diffing and tree-deltas
[libsvn_delta]
type = lib
install = base-lib
path = subversion/libsvn_delta
-libs = libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# The repository filesystem library
[libsvn_fs]
type = lib
path = subversion/libsvn_fs
install = fs-lib
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) $(SVN_DB_LIBS)
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_DB_LIBS) $(SVN_APR_LIBS)
# General API for accessing repositories
[libsvn_ra]
type = lib
path = subversion/libsvn_ra
# conditionally link in some more libs
-libs = libsvn_subr $(SVN_RA_LIB_LINK) $(SVN_APR_LIBS)
+libs = libsvn_subr $(SVN_RA_LIB_LINK) $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# conditionally add more dependencies
add-deps = $(SVN_RA_LIB_DEPS)
@@ -124,34 +124,34 @@
type = lib
path = subversion/libsvn_ra_dav
install = base-lib
-libs = libsvn_subr $(SVN_APR_LIBS) $(NEON_LIBS)
+libs = libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(NEON_LIBS)
# Accessing repositories via direct libsvn_fs
[libsvn_ra_local]
type = lib
path = subversion/libsvn_ra_local
install = fs-lib
-libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# Routines built on top of libsvn_fs
[libsvn_repos]
type = lib
path = subversion/libsvn_repos
install = fs-lib
-libs = libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# Low-level grab bag of utilities
[libsvn_subr]
type = lib
install = base-lib
path = subversion/libsvn_subr
-libs = $(SVN_APR_LIBS) libexpat
+libs = $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# Working copy management lib
[libsvn_wc]
type = lib
path = subversion/libsvn_wc
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# Subversion plugin for Apache's mod_dav
[mod_dav_svn]
@@ -165,14 +165,6 @@
custom = apache-mod
install = apache-mod
-# Simple XML-parsing lib
-[libexpat]
-type = lib
-install = base-lib
-path = expat-lite
-# there are some .c files included by others, so *.c isn't appropriate
-sources = hashtable.c xmlparse.c xmlrole.c xmltok.c
-
# ----------------------------------------------------------------------------
#
# TARGETS FOR SWIG SUPPORT
@@ -182,7 +174,7 @@
[libsvn_swig_py]
type = lib
path = subversion/bindings/swig
-libs = $(SVN_APR_LIBS)
+libs = $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
install = swig-py-lib
# need special build rule to include -DSWIGPYTHON
custom = swig-py
@@ -198,7 +190,7 @@
path = subversion/tests
sources = svn_tests_main.c svn_test_editor.c
install = test
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# shared utils for writing fs tests
[libsvn_test_fs]
@@ -215,7 +207,7 @@
sources = fs-test.c
install = fs-test
libs = libsvn_test libsvn_test_fs libsvn_fs libsvn_delta libsvn_subr
- $(SVN_APR_LIBS) libexpat
+ $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# run-fs-tests.sh will run this for us
testing = skip
@@ -225,7 +217,7 @@
path = subversion/tests/libsvn_fs
sources = skel-test.c
install = fs-test
-libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# run-fs-tests.sh will run this for us
testing = skip
@@ -235,7 +227,7 @@
path = subversion/tests/libsvn_fs
sources = key-test.c
install = fs-test
-libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# run-fs-tests.sh will run this for us
testing = skip
@@ -246,7 +238,7 @@
sources = strings-reps-test.c
install = fs-test
libs = libsvn_test libsvn_test_fs libsvn_fs libsvn_delta libsvn_subr
- $(SVN_APR_LIBS) libexpat
+ $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# run-fs-tests.sh will run this for us
testing = skip
@@ -256,7 +248,7 @@
path = subversion/tests/libsvn_repos
sources = md5args.c
install = test
-libs = libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# run-repos-tests.sh will run this for us
testing = skip
@@ -267,7 +259,7 @@
sources = repos-test.c dir-delta-editor.c
install = fs-test
libs = libsvn_test libsvn_test_fs libsvn_repos libsvn_fs libsvn_delta
- libsvn_subr $(SVN_APR_LIBS) libexpat
+ libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# run-repos-tests.sh will run this for us
testing = skip
@@ -277,7 +269,7 @@
path = subversion/tests/libsvn_subr
sources = hashdump-test.c
install = test
-libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# test svn_stringbuf_t utilities
[stringtest]
@@ -285,7 +277,7 @@
path = subversion/tests/libsvn_subr
sources = stringtest.c
install = test
-libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# test path library
[path-test]
@@ -293,7 +285,7 @@
path = subversion/tests/libsvn_subr
sources = path-test.c
install = test
-libs = libsvn_test libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_test libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# test eol conversion and keyword substitution routines
[translate-test]
@@ -301,7 +293,7 @@
path = subversion/tests/libsvn_wc
sources = translate-test.c
install = test
-libs = libsvn_test libsvn_delta libsvn_wc libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_delta libsvn_wc libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# use random data to test delta processing
[random-test]
@@ -309,7 +301,7 @@
path = subversion/tests/libsvn_delta
sources = random-test.c
install = test
-libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
### Tests that are simply broken (fix?) ----------
@@ -320,7 +312,7 @@
path = subversion/tests/libsvn_delta
sources = delta-combine-test.c
install = test
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# disabled for now -- the delta combiner isn't written, and we
# don't really have any idea if the interface would be compatible
# with this test, anyway.
@@ -333,7 +325,7 @@
sources = ra-local-test.c
install = fs-test
libs = libsvn_test libsvn_ra libsvn_fs libsvn_delta libsvn_subr
- $(SVN_APR_LIBS) libexpat
+ $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# disabled for now, BROKEN.
testing = skip
@@ -346,7 +338,7 @@
path = subversion/tests/libsvn_subr
sources = target-test.c
install = test
-libs = libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# target-test.sh will run this for us
testing = skip
@@ -356,7 +348,7 @@
path = subversion/tests/libsvn_delta
sources = xml-output-test.c
install = test
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# this is really redundant with our XML svn-test*.sh tests.
testing = skip
@@ -366,7 +358,7 @@
path = subversion/tests/libsvn_wc
sources = checkout-test.c
install = test
-libs = libsvn_wc libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_wc libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
# this is really redundant with our XML svn-test*.sh tests.
testing = skip
@@ -378,7 +370,7 @@
path = subversion/tests/libsvn_delta
sources = deltaparse-test.c
install = test
-libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
testing = skip
@@ -391,7 +383,7 @@
path = subversion/tests/libsvn_delta
sources = svndiff-test.c
install = test
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
testing = skip
# compare two files, print txdelta windows
@@ -400,7 +392,7 @@
path = subversion/tests/libsvn_delta
sources = vdelta-test.c
install = test
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
testing = skip
Index: ./configure.in
===================================================================
--- ./configure.in
+++ ./configure.in Tue Apr 16 00:33:59 2002
@@ -90,9 +90,10 @@
dnl Set include dir and module library lists for Makefiles -----------------
-dnl Expat
-SVN_EXPAT_INCLUDES='-I$(top_srcdir)/expat-lite'
-AC_SUBST(SVN_EXPAT_INCLUDES)
+APU_HAVE_OLD_EXPAT="`$apu_config --old-expat`"
+if test "$APU_HAVE_OLD_EXPAT" = "yes"; then
+ AC_DEFINE(SVN_HAVE_OLD_EXPAT, 1, [Defined if Expat 1.0 or 1.1 was found])
+fi
dnl Check for programs ---------------------
Index: ./subversion/include/svn_xml.h
===================================================================
--- ./subversion/include/svn_xml.h
+++ ./subversion/include/svn_xml.h Tue Apr 16 00:11:12 2002
@@ -24,7 +24,11 @@
#include <apr_pools.h>
#include <apr_hash.h>
+#ifdef SVN_HAVE_OLD_EXPAT
#include "xmlparse.h"
+#else
+#include "expat.h"
+#endif
#include "svn_error.h"
#include "svn_delta.h"
Index: ./subversion/libsvn_delta/xml_parse.c
===================================================================
--- ./subversion/libsvn_delta/xml_parse.c
+++ ./subversion/libsvn_delta/xml_parse.c Tue Apr 16 00:13:14 2002
@@ -47,7 +47,11 @@
#include "svn_base64.h"
#include "svn_quoprint.h"
#include "apr_strings.h"
+#ifdef SVN_HAVE_OLD_EXPAT
#include "xmlparse.h"
+#else
+#include "expat.h"
+#endif
#include "delta.h"
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Use apr-util's expat
Posted by Christian Schaffner <sc...@eeh.ee.ethz.ch>.
At 7:48 Uhr -0400 16.4.2002, Garrett Rooney wrote:
>On Tue, Apr 16, 2002 at 12:48:37AM -0700, Justin Erenkrantz wrote:
>> This patch switches us to using apr-util's detected expat.
>>
>> 'make check' succeeded with installed expat-1.95.2.
>>
>> Thoughts? This should allow us to remove expat-lite from our
>> tree and rely on apr-util either finding an installed expat
>> or using its bundled expat.
>
>i haven't given this a close review, but in concept i'm +1. i already
>have to hack build.conf for the FreeBSD port to get it to use the
>correct expat, and the rpm's are done the same way, so this would siplify
>things greatly for those two cases.
I applied this patch for the fink package on MacOS X (using the
r1682+ tarbal) and it seems to work fine. If this could be included
into the subversion source tree I wouldn't need to patch anymore for
building a package using the installed expat libraries (version of
expat: 1.95.1).
The only thing that seems different are a few warning messages similar to:
In file included from apr_xml.c:69:
/sw/include/expat.h:706: warning: function declaration isn't a prototype
Is this a problem?
Chris.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Use apr-util's expat
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Tue, Apr 16, 2002 at 12:48:37AM -0700, Justin Erenkrantz wrote:
> This patch switches us to using apr-util's detected expat.
>
> 'make check' succeeded with installed expat-1.95.2.
>
> Thoughts? This should allow us to remove expat-lite from our
> tree and rely on apr-util either finding an installed expat
> or using its bundled expat.
i haven't given this a close review, but in concept i'm +1. i already
have to hack build.conf for the FreeBSD port to get it to use the
correct expat, and the rpm's are done the same way, so this would siplify
things greatly for those two cases.
-garrett
--
garrett rooney Remember, any design flaw you're
rooneg@electricjellyfish.net sufficiently snide about becomes
http://electricjellyfish.net/ a feature. -- Dan Sugalski
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Use apr-util's expat
Posted by Branko Čibej <br...@xbc.nu>.
Justin Erenkrantz wrote:
>This patch switches us to using apr-util's detected expat.
>
This is nice. +1. But *please* give me a chance to change the Win32
build to use the expat in apr-util before removing expat-lite from the tree!
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: [PATCH] Use apr-util's expat
Posted by Sander Striker <st...@apache.org>.
> From: Justin Erenkrantz [mailto:jerenkrantz@apache.org]
> Sent: 18 April 2002 18:55
> On Tue, Apr 16, 2002 at 12:48:37AM -0700, Justin Erenkrantz wrote:
> > This patch switches us to using apr-util's detected expat.
>
> In case you aren't watching svn@, this landed in revision 1738.
>
> I believe Branko needs to update the Win32 build to use APR-util's
> expat and we should be good to remove expat-lite from the repos.
>
> Does svn rm work on dirs? =) -- justin
Ofcourse it does ;)
Sander
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Use apr-util's expat
Posted by Justin Erenkrantz <je...@apache.org>.
On Tue, Apr 16, 2002 at 12:48:37AM -0700, Justin Erenkrantz wrote:
> This patch switches us to using apr-util's detected expat.
In case you aren't watching svn@, this landed in revision 1738.
I believe Branko needs to update the Win32 build to use APR-util's
expat and we should be good to remove expat-lite from the repos.
Does svn rm work on dirs? =) -- justin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Use apr-util's expat
Posted by Justin Erenkrantz <je...@apache.org>.
On Tue, Apr 16, 2002 at 12:48:37AM -0700, Justin Erenkrantz wrote:
> * build.conf: Add SVN_APRUTIL_LIBS in place of libexpat for
> dependencies and to all targets that include SVN_APR_LIBS. Remove
> libexpat target.
As gstein has pointed out on IRC, this is not technically required.
The minimum would be to place SVN_APRUTIL_LIBS wherever libexpat
was. However, I believe there are a number of places where we can
start to leverage apr-util (url parsing for one) that I believe it
will be beneficial to add these dependencies now rather than
piece-mealing them later on. -- justin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org