[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r35665 - in trunk: . build/ac-macros subversion subversion/libsvn_fs_base subversion/libsvn_fs_base/bdb subversion/libsvn_fs_base/util

From: Chris Foote <cafoote_at_yahoo.com>
Date: Wed, 4 Feb 2009 12:24:35 -0800 (PST)

----- Original Message ----
> From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
> To: Chris Foote <cafoote_at_yahoo.com>; Subversion Development <dev_at_subversion.tigris.org>
> Sent: Wednesday, 4 February, 2009 16:41:05
> Subject: Re: svn commit: r35665 - in trunk: . build/ac-macros subversion subversion/libsvn_fs_base subversion/libsvn_fs_base/bdb subversion/libsvn_fs_base/util
>
> 2009-02-04 17:25:44 Chris Foote napisał(a):
> > ----- Original Message ----
> > > From: Arfrever Frehtes Taifersar Arahesis
> > > To: svn_at_subversion.tigris.org
> > > Sent: Wednesday, 4 February, 2009 1:34:36
> > > Subject: svn commit: r35665 - in trunk: . build/ac-macros subversion
> subversion/libsvn_fs_base subversion/libsvn_fs_base/bdb
> subversion/libsvn_fs_base/util
> > >
> > > Author: arfrever
> > > Date: Tue Feb  3 17:34:36 2009
> > > New Revision: 35665
> > >
> > > Log:
> > > Follow-up to r35017:
> > > Allow to specify Berkeley DB header.
> > >
> > > * build/ac-macros/berkeley-db.m4
> > >  (SVN_LIB_BERKELEY_DB, SVN_LIB_BERKELEY_DB_TRY): Allow to specify Berkeley
> DB
> > >  header in argument of the '--with-berkeley-db' option. Add conditional
> > >  inclusion of Berkeley DB header to 'subversion/svn_private_config.h'.
> > >
> > > * configure.ac: Substitute '@SVN_DB_HEADER@' with appropriate value
> > >  in 'subversion/svn_private_config.h'.
> > >
> > > * subversion/svn_private_config.hw: Include Berkeley DB header when
> > >  SVN_WANT_BDB is defined.
> > >
> > > * subversion/libsvn_fs_base/bdb/bdb_compat.h:
> > > * subversion/libsvn_fs_base/bdb/bdb-err.c:
> > > * subversion/libsvn_fs_base/bdb/changes-table.h:
> > > * subversion/libsvn_fs_base/bdb/dbt.c:
> > > * subversion/libsvn_fs_base/bdb/dbt.h:
> > > * subversion/libsvn_fs_base/bdb/env.h:
> > > * subversion/libsvn_fs_base/bdb/nodes-table.h:
> > > * subversion/libsvn_fs_base/bdb/reps-table.h:
> > > * subversion/libsvn_fs_base/bdb/rev-table.h:
> > > * subversion/libsvn_fs_base/bdb/strings-table.h:
> > > * subversion/libsvn_fs_base/bdb/uuids-table.h:
> > > * subversion/libsvn_fs_base/fs.c:
> > > * subversion/libsvn_fs_base/fs.h:
> > > * subversion/libsvn_fs_base/node-rev.c:
> > > * subversion/libsvn_fs_base/node-rev.h:
> > > * subversion/libsvn_fs_base/reps-strings.c:
> > > * subversion/libsvn_fs_base/reps-strings.h:
> > > * subversion/libsvn_fs_base/revs-txns.h:
> > > * subversion/libsvn_fs_base/trail.c:
> > > * subversion/libsvn_fs_base/trail.h:
> > > * subversion/libsvn_fs_base/util/fs_skels.h: Define SVN_WANT_BDB and
> > >  include "svn_private_config.h" instead of defining APU_WANT_DB and
> > >  including .
> > >
> >
> > This also breaks the windows build.
> >
> >
> > The SVN_WANT_BDB define also needs to be added to the lock.c and tree.c files.
>
> Why? These files weren't changed in r35665 and they seem to not use anything
> from db.h.

Because when the svn_private_config.h file is included without SVN_WANT_BDB it
prevents later includes with SVN_WANT_BDB defined from including db.h.

For example in lock.c it includes lock.h which includes trail.h which in turn
includes svn_private_config.h (with SVN_WANT_BDB). But since lock.c has
already included it without SVN_WANT_BDB it doesn't include db.h.

These are the start of the compiler errors:
 o:\subversion\libsvn_fs_base\bdb/env.h(77): error C2016: C requires that a struct or union has at least one member
 o:\subversion\libsvn_fs_base\bdb/env.h(77): error C2061: syntax error : identifier 'DB_ENV'
 o:\subversion\libsvn_fs_base\bdb/env.h(84): error C2059: syntax error : '}'
 

An alternate solution is to move the #ifdef SVN_WANT_BDB block so that it is outside
of the #ifndef SVN_PRIVATE_CONFIG_HW block:

Index: subversion/svn_private_config.hw
===================================================================
--- subversion/svn_private_config.hw    (revision 35682)
+++ subversion/svn_private_config.hw    (working copy)
@@ -29,14 +29,6 @@
 #define SVN_FS_WANT_DB_MINOR   0
 #define SVN_FS_WANT_DB_PATCH   14
-
-/* Inclusion of Berkeley DB header */
-#ifdef SVN_WANT_BDB
-#define APU_WANT_DB
-#include <apu_want.h>
-#endif
-
-
 /* Path separator for local filesystem */
 #define SVN_PATH_LOCAL_SEPARATOR '\\'
@@ -87,3 +79,10 @@
 #endif
 #endif /* SVN_PRIVATE_CONFIG_HW */
+
+
+/* Inclusion of Berkeley DB header */
+#ifdef SVN_WANT_BDB
+#define APU_WANT_DB
+#include <apu_want.h>
+#endif

> --
> Arfrever Frehtes Taifersar Arahesis

Chris

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1103869
Received on 2009-02-04 21:24:54 CET

This is an archived mail posted to the Subversion Dev mailing list.