summaryrefslogtreecommitdiff
path: root/rpmdb
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2003-11-23 19:50:52 +0000
committerjbj <devnull@localhost>2003-11-23 19:50:52 +0000
commit3dcfeb3f9aaf003f29d2c8c0c3a545953f529c08 (patch)
treea78f3112c1c5b7b5c8cd2ce4307056c3db758c35 /rpmdb
parentfda9ddca9bcd46cefc145c14cfd901906600c9d2 (diff)
downloadrpm-3dcfeb3f9aaf003f29d2c8c0c3a545953f529c08.tar.gz
rpm-3dcfeb3f9aaf003f29d2c8c0c3a545953f529c08.tar.bz2
rpm-3dcfeb3f9aaf003f29d2c8c0c3a545953f529c08.zip
Merge changes from rpm-4.2.1 development.
CVS patchset: 6959 CVS date: 2003/11/23 19:50:52
Diffstat (limited to 'rpmdb')
-rw-r--r--rpmdb/.splintrc1
-rw-r--r--rpmdb/Makefile.am73
-rw-r--r--rpmdb/db3.c17
-rw-r--r--rpmdb/dbconfig.c8
4 files changed, 55 insertions, 44 deletions
diff --git a/rpmdb/.splintrc b/rpmdb/.splintrc
index 6a7ed8ff0..090235f93 100644
--- a/rpmdb/.splintrc
+++ b/rpmdb/.splintrc
@@ -3,7 +3,6 @@
+partial
+forcehints
-#-warnunixlib
-warnposix
+unixlib
diff --git a/rpmdb/Makefile.am b/rpmdb/Makefile.am
index cd8ff22ac..3e4e3ff46 100644
--- a/rpmdb/Makefile.am
+++ b/rpmdb/Makefile.am
@@ -36,9 +36,10 @@ mylibs = librpmdb.la
LIBS =
-DB3LOBJS = $(shell cat $(top_builddir)/$(WITH_DB_SUBDIR)/db3lobjs)
+DB3LO = $(shell cat $(top_builddir)/$(WITH_DB_SUBDIR)/db3lobjs)
+DB3LOBJS = $(DB3LO:%.lo=%.o)
-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
+LDFLAGS = -L$(DESTDIR)$(usrlibdir)
usrlibdir = $(libdir)@MARK64@
usrlib_LTLIBRARIES = librpmdb.la
@@ -47,7 +48,7 @@ librpmdb_la_SOURCES = \
hdrNVR.c header.c header_internal.c legacy.c merge.c \
poptDB.c rpmhash.c rpmdb.c \
tagname.c tagtbl.c
-librpmdb_la_LDFLAGS = -release @VERSION@ $(LDFLAGS) \
+librpmdb_la_LDFLAGS = -release 4.3 \
$(top_builddir)/rpmio/librpmio.la \
$(top_builddir)/popt/libpopt.la \
@WITH_LIBELF_LIB@ \
@@ -87,79 +88,79 @@ db.h:
rpmdb_archive_SOURCES =
rpmdb_archive_LDADD = \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_archive.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_archive.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
librpmdb.la
rpmdb_checkpoint_SOURCES =
rpmdb_checkpoint_LDADD = \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_checkpoint.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_log.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_checkpoint.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_log.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
librpmdb.la
rpmdb_deadlock_SOURCES =
rpmdb_deadlock_LDADD = \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_deadlock.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_log.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_deadlock.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_log.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
librpmdb.la
rpmdb_dump_SOURCES =
rpmdb_dump_LDADD = \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_dump.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_dump.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
librpmdb.la
rpmdb_load_SOURCES =
rpmdb_load_LDADD = \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_load.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_load.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
librpmdb.la
rpmdb_printlog_SOURCES =
rpmdb_printlog_LDADD = \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_printlog.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_printlog.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
librpmdb.la
rpmdb_recover_SOURCES =
rpmdb_recover_LDADD = \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_recover.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_recover.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
librpmdb.la
rpmdb_stat_SOURCES =
rpmdb_stat_LDADD = \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_stat.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_stat.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
librpmdb.la
rpmdb_svc_SOURCES =
rpmdb_svc_LDADD = \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_server_proc.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_server_svc.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_server_util.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/gen_db_server.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_log.lo \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_server_proc.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_server_svc.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_server_util.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/gen_db_server.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_log.o \
librpmdb.la
rpmdb_upgrade_SOURCES =
rpmdb_upgrade_LDADD = \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_upgrade.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_upgrade.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
librpmdb.la
rpmdb_verify_SOURCES =
rpmdb_verify_LDADD = \
- $(top_builddir)/$(WITH_DB_SUBDIR)/db_verify.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.lo \
- $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/db_verify.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
+ $(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
librpmdb.la
clean-local:
diff --git a/rpmdb/db3.c b/rpmdb/db3.c
index d142ef250..2fdfe2e4a 100644
--- a/rpmdb/db3.c
+++ b/rpmdb/db3.c
@@ -20,6 +20,10 @@ static int _debug = 1; /* XXX if < 0 debugging, > 0 unusual error returns */
#include "debug.h"
+#if !defined(DB_CLIENT) /* XXX db-4.2.42 retrofit */
+#define DB_CLIENT DB_RPCCLIENT
+#endif
+
/*@access rpmdb @*/
/*@access dbiIndex @*/
/*@access dbiIndexSet @*/
@@ -453,7 +457,7 @@ static int db3sync(dbiIndex dbi, unsigned int flags)
if (db != NULL)
rc = db->sync(db, flags);
/* XXX DB_INCOMPLETE is returned occaisionally with multiple access. */
-#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1)
+#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
_printit = _debug;
#else
_printit = (rc == DB_INCOMPLETE ? 0 : _debug);
@@ -690,13 +694,12 @@ static int db3associate(dbiIndex dbi, dbiIndex dbisecondary,
{
DB * db = dbi->dbi_db;
DB * secondary = dbisecondary->dbi_db;
-#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1)
- DB_TXN * txnid = NULL;
-#endif
int rc;
/*@-moduncon@*/ /* FIX: annotate db3 methods */
-#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1)
+#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
+ DB_TXN * txnid = NULL;
+
rc = db->associate(db, txnid, secondary, callback, flags);
#else
rc = db->associate(db, secondary, callback, flags);
@@ -892,7 +895,7 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
DB * db = NULL;
DB_ENV * dbenv = NULL;
-#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1)
+#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
DB_TXN * txnid = NULL;
#endif
u_int32_t oflags;
@@ -1254,7 +1257,7 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
? dbfullpath : dbfile;
#endif
-#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1)
+#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
rc = db->open(db, txnid, dbpath, dbsubfile,
dbi->dbi_type, oflags, dbi->dbi_perms);
#else
diff --git a/rpmdb/dbconfig.c b/rpmdb/dbconfig.c
index 86922368b..d20327c0c 100644
--- a/rpmdb/dbconfig.c
+++ b/rpmdb/dbconfig.c
@@ -34,8 +34,16 @@ static int dbi_tear_down;
/*@unchecked@*/
struct poptOption rdbOptions[] = {
/* XXX DB_CXX_NO_EXCEPTIONS */
+#if defined(DB_CLIENT)
{ "client", 0,POPT_BIT_SET, &db3dbi.dbi_ecflags, DB_CLIENT,
NULL, NULL },
+#endif
+#if defined(DB_RPCCLIENT)
+ { "client", 0,POPT_BIT_SET, &db3dbi.dbi_ecflags, DB_RPCCLIENT,
+ NULL, NULL },
+ { "rpcclient", 0,POPT_BIT_SET, &db3dbi.dbi_ecflags, DB_RPCCLIENT,
+ NULL, NULL },
+#endif
{ "xa_create", 0,POPT_BIT_SET, &db3dbi.dbi_cflags, DB_XA_CREATE,
NULL, NULL },