summaryrefslogtreecommitdiffstats
path: root/databases/evolution-data-server/files
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2006-04-30 09:41:24 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2006-04-30 09:41:24 +0800
commit2c04e2178d3ccce17af9d227a165f4025e1baf27 (patch)
treea95d6ef7b169e6753fca6a89006355f69851345e /databases/evolution-data-server/files
parent97baa1cd09aa858ef3a8e9ad473cc43e7dcacebb (diff)
downloadmarcuscom-ports-2c04e2178d3ccce17af9d227a165f4025e1baf27.tar
marcuscom-ports-2c04e2178d3ccce17af9d227a165f4025e1baf27.tar.gz
marcuscom-ports-2c04e2178d3ccce17af9d227a165f4025e1baf27.tar.bz2
marcuscom-ports-2c04e2178d3ccce17af9d227a165f4025e1baf27.tar.lz
marcuscom-ports-2c04e2178d3ccce17af9d227a165f4025e1baf27.tar.xz
marcuscom-ports-2c04e2178d3ccce17af9d227a165f4025e1baf27.tar.zst
marcuscom-ports-2c04e2178d3ccce17af9d227a165f4025e1baf27.zip
Remove these ports now that they are in the ports tree.
Next stop, GNOME 2.15. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@6155 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'databases/evolution-data-server/files')
-rw-r--r--databases/evolution-data-server/files/extra-patch-libedataserver_e-msgport.c53
-rw-r--r--databases/evolution-data-server/files/patch-addressbook_backends_ldap_e-book-backend-ldap.c13
-rw-r--r--databases/evolution-data-server/files/patch-calendar_libical_configure11
-rw-r--r--databases/evolution-data-server/files/patch-camel_camel-net-utils.c24
-rw-r--r--databases/evolution-data-server/files/patch-camel_camel-object.c22
-rw-r--r--databases/evolution-data-server/files/patch-configure44
-rw-r--r--databases/evolution-data-server/files/patch-libedataserverui_e-source-option-menu.c11
-rw-r--r--databases/evolution-data-server/files/patch-offical-sleepycat480
8 files changed, 0 insertions, 658 deletions
diff --git a/databases/evolution-data-server/files/extra-patch-libedataserver_e-msgport.c b/databases/evolution-data-server/files/extra-patch-libedataserver_e-msgport.c
deleted file mode 100644
index b39a8fe3c..000000000
--- a/databases/evolution-data-server/files/extra-patch-libedataserver_e-msgport.c
+++ /dev/null
@@ -1,53 +0,0 @@
---- libedataserver/e-msgport.c.orig Sat Dec 10 07:31:28 2005
-+++ libedataserver/e-msgport.c Mon Dec 19 02:19:10 2005
-@@ -1069,9 +1069,18 @@ thread_dispatch(void *din)
- void e_thread_put(EThread *e, EMsg *msg)
- {
- pthread_t id;
-+ pthread_attr_t attr;
- EMsg *dmsg = NULL;
-
- pthread_mutex_lock(&e->mutex);
-+ pthread_attr_init(&attr);
-+ /* Give us a 1 MB thread stacksize on 32-bit architectures, and
-+ * a 2 MB thread stacksize on 64-bit architectures. */
-+ if (sizeof (void *) == 8) {
-+ pthread_attr_setstacksize(&attr, 0x200000);
-+ } else {
-+ pthread_attr_setstacksize(&attr, 0x100000);
-+ }
-
- /* the caller forgot to tell us what to do, well, we can't do anything can we */
- if (e->received == NULL) {
-@@ -1110,13 +1119,14 @@ void e_thread_put(EThread *e, EMsg *msg)
- e_msgport_put(e->server_port, msg);
- if (e->waiting == 0
- && g_list_length(e->id_list) < e->queue_limit
-- && pthread_create(&id, NULL, thread_dispatch, e) == 0) {
-+ && pthread_create(&id, &attr, thread_dispatch, e) == 0) {
- struct _thread_info *info = g_malloc0(sizeof(*info));
- t(printf("created NEW thread %" G_GUINT64_FORMAT "\n", e_util_pthread_id(id)));
- info->id = id;
- info->busy = TRUE;
- e->id_list = g_list_append(e->id_list, info);
- }
-+ pthread_attr_destroy(&attr);
- pthread_mutex_unlock(&e->mutex);
- return;
- }
-@@ -1125,13 +1135,14 @@ void e_thread_put(EThread *e, EMsg *msg)
- if (!e->have_thread) {
- int err;
-
-- if ((err = pthread_create(&e->id, NULL, thread_dispatch, e)) != 0) {
-+ if ((err = pthread_create(&e->id, &attr, thread_dispatch, e)) != 0) {
- g_warning("Could not create dispatcher thread, message queued?: %s", strerror(err));
- } else {
- e->have_thread = TRUE;
- }
- }
-
-+ pthread_attr_destroy(&attr);
- pthread_mutex_unlock(&e->mutex);
-
- if (dmsg) {
diff --git a/databases/evolution-data-server/files/patch-addressbook_backends_ldap_e-book-backend-ldap.c b/databases/evolution-data-server/files/patch-addressbook_backends_ldap_e-book-backend-ldap.c
deleted file mode 100644
index 51f468867..000000000
--- a/databases/evolution-data-server/files/patch-addressbook_backends_ldap_e-book-backend-ldap.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- addressbook/backends/ldap/e-book-backend-ldap.c.orig Fri Sep 9 16:06:37 2005
-+++ addressbook/backends/ldap/e-book-backend-ldap.c Fri Sep 9 16:08:21 2005
-@@ -301,8 +301,8 @@ struct prop_info {
-
- /* misc fields */
- STRING_PROP (E_CONTACT_HOMEPAGE_URL, "labeledURI"),
-- /* map nickname to displayName */
-- STRING_PROP (E_CONTACT_NICKNAME, "displayName"),
-+ /* map nickname to nickname */
-+ STRING_PROP (E_CONTACT_NICKNAME, "nickname"),
- E_STRING_PROP (E_CONTACT_SPOUSE, "spouseName"),
- E_STRING_PROP (E_CONTACT_NOTE, "note"),
- E_COMPLEX_PROP (E_CONTACT_ANNIVERSARY, "anniversary", anniversary_populate, anniversary_ber, anniversary_compare),
diff --git a/databases/evolution-data-server/files/patch-calendar_libical_configure b/databases/evolution-data-server/files/patch-calendar_libical_configure
deleted file mode 100644
index 19028e5d4..000000000
--- a/databases/evolution-data-server/files/patch-calendar_libical_configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- calendar/libical/configure.orig Sun Dec 26 16:54:57 2004
-+++ calendar/libical/configure Sun Dec 26 16:55:23 2004
-@@ -19736,7 +19736,7 @@
-
-
-
--if test "x$USE_MAINTAINER_MODE" == xyes; then
-+if test "x$USE_MAINTAINER_MODE" = xyes; then
- DEV="yes"
- echo "$as_me:$LINENO: result: Setting up for development: -Wall, flex, bison" >&5
- echo "${ECHO_T}Setting up for development: -Wall, flex, bison" >&6
diff --git a/databases/evolution-data-server/files/patch-camel_camel-net-utils.c b/databases/evolution-data-server/files/patch-camel_camel-net-utils.c
deleted file mode 100644
index 17bddca39..000000000
--- a/databases/evolution-data-server/files/patch-camel_camel-net-utils.c
+++ /dev/null
@@ -1,24 +0,0 @@
---- camel/camel-net-utils.c.orig Tue Dec 21 13:38:52 2004
-+++ camel/camel-net-utils.c Tue Dec 21 13:40:34 2004
-@@ -143,12 +143,21 @@
- case EAI_SERVICE:
- return NO_DATA;
- break;
-+#ifdef EAI_ADDRFAMILY
- case EAI_ADDRFAMILY:
- return NO_ADDRESS;
- break;
-+#endif
-+#if defined(EAI_NODATA) && EAI_NODATA != EAI_NONAME
- case EAI_NODATA:
- return NO_DATA;
- break;
-+#endif
-+#ifdef EAI_NOFAMILY
-+ case EAI_NOFAMILY:
-+ return NO_ADDRESS;
-+ break;
-+#endif
- case EAI_MEMORY:
- return ENOMEM;
- break;
diff --git a/databases/evolution-data-server/files/patch-camel_camel-object.c b/databases/evolution-data-server/files/patch-camel_camel-object.c
deleted file mode 100644
index 03e011165..000000000
--- a/databases/evolution-data-server/files/patch-camel_camel-object.c
+++ /dev/null
@@ -1,22 +0,0 @@
---- camel/camel-object.c.orig Sun Feb 19 17:04:42 2006
-+++ camel/camel-object.c Sun Feb 19 17:06:06 2006
-@@ -454,7 +454,7 @@ cobject_state_read(CamelObject *obj, FIL
- }
-
- /* we batch up the properties and set them in one go */
-- if (!(argv = g_try_malloc (sizeof (*argv) + (count - CAMEL_ARGV_MAX) * sizeof (argv->argv[0]))))
-+ if (!(argv = g_try_malloc ((guint32) (sizeof (*argv) + (count - CAMEL_ARGV_MAX) * sizeof (argv->argv[0])))))
- return -1;
-
- argv->argc = 0;
-@@ -534,8 +534,8 @@ cobject_state_write(CamelObject *obj, FI
-
- count = g_slist_length(props);
-
-- arggetv = g_malloc0(sizeof(*arggetv) + (count - CAMEL_ARGV_MAX) * sizeof(arggetv->argv[0]));
-- argv = g_malloc0(sizeof(*argv) + (count - CAMEL_ARGV_MAX) * sizeof(argv->argv[0]));
-+ arggetv = g_malloc0((guint32) (sizeof(*arggetv) + (count - CAMEL_ARGV_MAX) * sizeof(arggetv->argv[0])));
-+ argv = g_malloc0((guint32) (sizeof(*argv) + (count - CAMEL_ARGV_MAX) * sizeof(argv->argv[0])));
- l = props;
- i = 0;
- while (l) {
diff --git a/databases/evolution-data-server/files/patch-configure b/databases/evolution-data-server/files/patch-configure
deleted file mode 100644
index 91d8b09b9..000000000
--- a/databases/evolution-data-server/files/patch-configure
+++ /dev/null
@@ -1,44 +0,0 @@
---- configure.orig Sun Dec 25 01:57:35 2005
-+++ configure Sun Dec 25 01:58:23 2005
-@@ -23542,6 +23542,14 @@
- SOFTOKN3_LIB=''
- LIBEXECDIR_IN_SERVER_FILE='../../../libexec'
- ;;
-+*freebsd*)
-+ os_win32=no
-+ NO_UNDEFINED=''
-+ SOCKET_LIBS=''
-+ DL_LIB=''
-+ SOFTOKN3_LIB='-lsoftokn3'
-+ LIBEXECDIR_IN_SERVER_FILE="$libexecdir"
-+ ;;
- *) os_win32=no
- NO_UNDEFINED=''
- SOCKET_LIBS=''
-@@ -27317,7 +27325,7 @@
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netdb.h>
--
-+ #include <stdio.h>
-
- int
- main ()
-@@ -27565,7 +27573,7 @@
- LDFLAGS_save="$LDFLAGS"
-
- mitlibs="-lkrb5 -lk5crypto -lcom_err -lgssapi_krb5"
-- heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken -lgssapi"
-+ heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken -lgssapi -lcrypt"
- echo "$as_me:$LINENO: checking for Kerberos 5" >&5
- echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
- if test "${ac_cv_lib_kerberos5+set}" = set; then
-@@ -31483,7 +31491,7 @@
- imagesdir="$datadir/pixmaps/evolution-data-server-$BASE_VERSION"
-
-
--serverdir="$libdir/bonobo/servers"
-+serverdir="$prefix/libdata/bonobo/servers"
-
-
- extensiondir='${libdir}'/evolution-data-server-$API_VERSION/extensions
diff --git a/databases/evolution-data-server/files/patch-libedataserverui_e-source-option-menu.c b/databases/evolution-data-server/files/patch-libedataserverui_e-source-option-menu.c
deleted file mode 100644
index 62532da02..000000000
--- a/databases/evolution-data-server/files/patch-libedataserverui_e-source-option-menu.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- libedataserverui/e-source-option-menu.c.orig Tue Nov 23 13:50:14 2004
-+++ libedataserverui/e-source-option-menu.c Tue Nov 23 13:50:33 2004
-@@ -24,6 +24,8 @@
- #include <config.h>
- #endif
-
-+#include <sys/types.h>
-+
- #include <gtk/gtkmenu.h>
- #include <gtk/gtkmenuitem.h>
-
diff --git a/databases/evolution-data-server/files/patch-offical-sleepycat b/databases/evolution-data-server/files/patch-offical-sleepycat
deleted file mode 100644
index 0cd4d7909..000000000
--- a/databases/evolution-data-server/files/patch-offical-sleepycat
+++ /dev/null
@@ -1,480 +0,0 @@
---- libdb/fileops/fop_util.c.orig Thu Nov 20 23:13:30 2003
-+++ libdb/fileops/fop_util.c Fri Mar 18 20:31:10 2005
-@@ -40,7 +40,7 @@
- u_int32_t __lockval; \
- \
- if (LOCKING_ON((ENV))) { \
-- __lockval = 0; \
-+ __lockval = 1; \
- __dbt.data = &__lockval; \
- __dbt.size = sizeof(__lockval); \
- if ((ret = (ENV)->lock_get((ENV), (ID), \
---- libdb/dbinc/mp.h.orig Thu Nov 20 23:13:17 2003
-+++ libdb/dbinc/mp.h Fri Mar 18 20:31:14 2005
-@@ -149,6 +149,13 @@
- * region lock).
- */
- DB_MPOOL_STAT stat; /* Per-cache mpool statistics. */
-+
-+ /*
-+ * We track page puts so that we can decide when allocation is never
-+ * going to succeed. We don't lock the field, all we care about is
-+ * if it changes.
-+ */
-+ u_int32_t put_counter; /* Count of page put calls. */
- };
-
- struct __db_mpool_hash {
---- libdb/mp/mp_fput.c.orig Thu Nov 20 23:13:36 2003
-+++ libdb/mp/mp_fput.c Fri Mar 18 20:31:14 2005
-@@ -19,6 +19,8 @@
- #include "dbinc/db_shash.h"
- #include "dbinc/mp.h"
-
-+static void __memp_reset_lru __P((DB_ENV *, REGINFO *));
-+
- /*
- * __memp_fput --
- * Mpool file put function.
-@@ -198,5 +200,56 @@
-
- MUTEX_UNLOCK(dbenv, &hp->hash_mutex);
-
-+ /*
-+ * On every buffer put we update the buffer generation number and check
-+ * for wraparound.
-+ */
-+ if (++c_mp->lru_count == UINT32_T_MAX)
-+ __memp_reset_lru(dbenv, dbmp->reginfo);
-+
- return (0);
-+}
-+
-+/*
-+ * __memp_reset_lru --
-+ * Reset the cache LRU counter.
-+ */
-+static void
-+__memp_reset_lru(dbenv, memreg)
-+ DB_ENV *dbenv;
-+ REGINFO *memreg;
-+{
-+ BH *bhp;
-+ DB_MPOOL_HASH *hp;
-+ MPOOL *c_mp;
-+ int bucket;
-+
-+ c_mp = memreg->primary;
-+
-+ /*
-+ * Update the counter so all future allocations will start at the
-+ * bottom.
-+ */
-+ c_mp->lru_count -= MPOOL_BASE_DECREMENT;
-+
-+ /* Adjust the priority of every buffer in the system. */
-+ for (hp = R_ADDR(memreg, c_mp->htab),
-+ bucket = 0; bucket < c_mp->htab_buckets; ++hp, ++bucket) {
-+ /*
-+ * Skip empty buckets.
-+ *
-+ * We can check for empty buckets before locking as we
-+ * only care if the pointer is zero or non-zero.
-+ */
-+ if (SH_TAILQ_FIRST(&hp->hash_bucket, __bh) == NULL)
-+ continue;
-+
-+ MUTEX_LOCK(dbenv, &hp->hash_mutex);
-+ for (bhp = SH_TAILQ_FIRST(&hp->hash_bucket, __bh);
-+ bhp != NULL; bhp = SH_TAILQ_NEXT(bhp, hq, __bh))
-+ if (bhp->priority != UINT32_T_MAX &&
-+ bhp->priority > MPOOL_BASE_DECREMENT)
-+ bhp->priority -= MPOOL_BASE_DECREMENT;
-+ MUTEX_UNLOCK(dbenv, &hp->hash_mutex);
-+ }
- }
---- libdb/mp/mp_alloc.c.orig Thu Nov 20 23:13:36 2003
-+++ libdb/mp/mp_alloc.c Fri Mar 18 20:31:14 2005
-@@ -25,7 +25,6 @@
- } HS;
-
- static void __memp_bad_buffer __P((DB_MPOOL_HASH *));
--static void __memp_reset_lru __P((DB_ENV *, REGINFO *, MPOOL *));
-
- /*
- * __memp_alloc --
-@@ -50,8 +49,9 @@
- MPOOL *c_mp;
- MPOOLFILE *bh_mfp;
- size_t freed_space;
-- u_int32_t buckets, buffers, high_priority, max_na, priority;
-- int aggressive, ret;
-+ u_int32_t buckets, buffers, high_priority, priority, put_counter;
-+ u_int32_t total_buckets;
-+ int aggressive, giveup, ret;
- void *p;
-
- dbenv = dbmp->dbenv;
-@@ -59,18 +59,13 @@
- dbht = R_ADDR(memreg, c_mp->htab);
- hp_end = &dbht[c_mp->htab_buckets];
-
-- buckets = buffers = 0;
-- aggressive = 0;
-+ buckets = buffers = put_counter = total_buckets = 0;
-+ aggressive = giveup = 0;
-+ hp_tmp = NULL;
-
- c_mp->stat.st_alloc++;
-
- /*
-- * Get aggressive if we've tried to flush the number of pages as are
-- * in the system without finding space.
-- */
-- max_na = 5 * c_mp->htab_buckets;
--
-- /*
- * If we're allocating a buffer, and the one we're discarding is the
- * same size, we don't want to waste the time to re-integrate it into
- * the shared memory free list. If the DB_MPOOLFILE argument isn't
-@@ -81,19 +76,10 @@
- len = (sizeof(BH) - sizeof(u_int8_t)) + mfp->stat.st_pagesize;
-
- R_LOCK(dbenv, memreg);
--
-- /*
-- * On every buffer allocation we update the buffer generation number
-- * and check for wraparound.
-- */
-- if (++c_mp->lru_count == UINT32_T_MAX)
-- __memp_reset_lru(dbenv, memreg, c_mp);
--
- /*
- * Anything newer than 1/10th of the buffer pool is ignored during
- * allocation (unless allocation starts failing).
- */
-- DB_ASSERT(c_mp->lru_count > c_mp->stat.st_pages / 10);
- high_priority = c_mp->lru_count - c_mp->stat.st_pages / 10;
-
- /*
-@@ -120,10 +106,11 @@
- * We're not holding the region locked here, these statistics
- * can't be trusted.
- */
-- if (buckets != 0) {
-- if (buckets > c_mp->stat.st_alloc_max_buckets)
-- c_mp->stat.st_alloc_max_buckets = buckets;
-- c_mp->stat.st_alloc_buckets += buckets;
-+ total_buckets += buckets;
-+ if (total_buckets != 0) {
-+ if (total_buckets > c_mp->stat.st_alloc_max_buckets)
-+ c_mp->stat.st_alloc_max_buckets = total_buckets;
-+ c_mp->stat.st_alloc_buckets += total_buckets;
- }
- if (buffers != 0) {
- if (buffers > c_mp->stat.st_alloc_max_pages)
-@@ -131,6 +118,12 @@
- c_mp->stat.st_alloc_pages += buffers;
- }
- return (0);
-+ } else if (giveup || c_mp->stat.st_pages == 0) {
-+ R_UNLOCK(dbenv, memreg);
-+
-+ __db_err(dbenv,
-+ "unable to allocate space from the buffer cache");
-+ return (ret);
- }
-
- /*
-@@ -138,26 +131,24 @@
- * we need. Reset our free-space counter.
- */
- freed_space = 0;
-+ total_buckets += buckets;
-+ buckets = 0;
-
- /*
- * Walk the hash buckets and find the next two with potentially useful
- * buffers. Free the buffer with the lowest priority from the buckets'
- * chains.
- */
-- for (hp_tmp = NULL;;) {
-+ for (;;) {
-+ /* All pages have been freed, make one last try */
-+ if (c_mp->stat.st_pages == 0)
-+ goto alloc;
-+
- /* Check for wrap around. */
- hp = &dbht[c_mp->last_checked++];
- if (hp >= hp_end) {
- c_mp->last_checked = 0;
--
-- /*
-- * If we've gone through all of the hash buckets, try
-- * an allocation. If the cache is small, the old page
-- * size is small, and the new page size is large, we
-- * might have freed enough memory (but not 3 times the
-- * memory).
-- */
-- goto alloc;
-+ hp = &dbht[c_mp->last_checked++];
- }
-
- /*
-@@ -172,39 +163,59 @@
- /*
- * The failure mode is when there are too many buffers we can't
- * write or there's not enough memory in the system. We don't
-- * have a metric for deciding if allocation has no possible way
-- * to succeed, so we don't ever fail, we assume memory will be
-- * available if we wait long enough.
-+ * have a way to know that allocation has no way to succeed.
-+ * We fail if there were no pages returned to the cache after
-+ * we've been trying for a relatively long time.
- *
-- * Get aggressive if we've tried to flush 5 times the number of
-- * hash buckets as are in the system -- it's possible we have
-- * been repeatedly trying to flush the same buffers, although
-- * it's unlikely. Aggressive means:
-+ * Get aggressive if we've tried to flush the number of hash
-+ * buckets as are in the system and have not found any more
-+ * space. Aggressive means:
- *
- * a: set a flag to attempt to flush high priority buffers as
- * well as other buffers.
- * b: sync the mpool to force out queue extent pages. While we
- * might not have enough space for what we want and flushing
- * is expensive, why not?
-- * c: sleep for a second -- hopefully someone else will run and
-- * free up some memory. Try to allocate memory too, in case
-- * the other thread returns its memory to the region.
-- * d: look at a buffer in every hash bucket rather than choose
-+ * c: look at a buffer in every hash bucket rather than choose
- * the more preferable of two.
-+ * d: start to think about giving up.
-+ *
-+ * If we get here twice, sleep for a second, hopefully someone
-+ * else will run and free up some memory.
-+ *
-+ * Always try to allocate memory too, in case some other thread
-+ * returns its memory to the region.
- *
- * !!!
- * This test ignores pathological cases like no buffers in the
- * system -- that shouldn't be possible.
- */
-- if ((++buckets % max_na) == 0) {
-- aggressive = 1;
--
-+ if ((++buckets % c_mp->htab_buckets) == 0) {
-+ if (freed_space > 0)
-+ goto alloc;
- R_UNLOCK(dbenv, memreg);
-
-- (void)__memp_sync_int(
-- dbenv, NULL, 0, DB_SYNC_ALLOC, NULL);
--
-- (void)__os_sleep(dbenv, 1, 0);
-+ switch (++aggressive) {
-+ case 1:
-+ break;
-+ case 2:
-+ put_counter = c_mp->put_counter;
-+ /* FALLTHROUGH */
-+ case 3:
-+ case 4:
-+ case 5:
-+ case 6:
-+ (void)__memp_sync_int(
-+ dbenv, NULL, 0, DB_SYNC_ALLOC, NULL);
-+
-+ (void)__os_sleep(dbenv, 1, 0);
-+ break;
-+ default:
-+ aggressive = 1;
-+ if (put_counter == c_mp->put_counter)
-+ giveup = 1;
-+ break;
-+ }
-
- R_LOCK(dbenv, memreg);
- goto alloc;
-@@ -277,7 +288,8 @@
- * thread may have acquired this buffer and incremented the ref
- * count after we wrote it, in which case we can't have it.
- *
-- * If there's a write error, avoid selecting this buffer again
-+ * If there's a write error and we're having problems finding
-+ * something to allocate, avoid selecting this buffer again
- * by making it the bucket's least-desirable buffer.
- */
- if (ret != 0 || bhp->ref != 0) {
-@@ -301,6 +313,8 @@
-
- freed_space += __db_shsizeof(bhp);
- __memp_bhfree(dbmp, hp, bhp, 1);
-+ if (aggressive > 1)
-+ aggressive = 1;
-
- /*
- * Unlock this hash bucket and re-acquire the region lock. If
-@@ -360,54 +374,6 @@
-
- /* Reset the hash bucket's priority. */
- hp->hash_priority = SH_TAILQ_FIRST(&hp->hash_bucket, __bh)->priority;
--}
--
--/*
-- * __memp_reset_lru --
-- * Reset the cache LRU counter.
-- */
--static void
--__memp_reset_lru(dbenv, memreg, c_mp)
-- DB_ENV *dbenv;
-- REGINFO *memreg;
-- MPOOL *c_mp;
--{
-- BH *bhp;
-- DB_MPOOL_HASH *hp;
-- int bucket;
--
-- /*
-- * Update the counter so all future allocations will start at the
-- * bottom.
-- */
-- c_mp->lru_count -= MPOOL_BASE_DECREMENT;
--
-- /* Release the region lock. */
-- R_UNLOCK(dbenv, memreg);
--
-- /* Adjust the priority of every buffer in the system. */
-- for (hp = R_ADDR(memreg, c_mp->htab),
-- bucket = 0; bucket < c_mp->htab_buckets; ++hp, ++bucket) {
-- /*
-- * Skip empty buckets.
-- *
-- * We can check for empty buckets before locking as we
-- * only care if the pointer is zero or non-zero.
-- */
-- if (SH_TAILQ_FIRST(&hp->hash_bucket, __bh) == NULL)
-- continue;
--
-- MUTEX_LOCK(dbenv, &hp->hash_mutex);
-- for (bhp = SH_TAILQ_FIRST(&hp->hash_bucket, __bh);
-- bhp != NULL; bhp = SH_TAILQ_NEXT(bhp, hq, __bh))
-- if (bhp->priority != UINT32_T_MAX &&
-- bhp->priority > MPOOL_BASE_DECREMENT)
-- bhp->priority -= MPOOL_BASE_DECREMENT;
-- MUTEX_UNLOCK(dbenv, &hp->hash_mutex);
-- }
--
-- /* Reacquire the region lock. */
-- R_LOCK(dbenv, memreg);
- }
-
- #ifdef DIAGNOSTIC
---- libdb/dbreg/dbreg_rec.c.orig Thu Nov 20 23:13:19 2003
-+++ libdb/dbreg/dbreg_rec.c Fri Mar 18 20:31:14 2005
-@@ -174,19 +174,20 @@
- * Typically, closes should match an open which means
- * that if this is a close, there should be a valid
- * entry in the dbentry table when we get here,
-- * however there is an exception. If this is an
-+ * however there are exceptions. 1. If this is an
- * OPENFILES pass, then we may have started from
- * a log file other than the first, and the
- * corresponding open appears in an earlier file.
-- * We can ignore that case, but all others are errors.
-+ * 2. If we are undoing an open on an abort or
-+ * recovery, it's possible that we failed after
-+ * the log record, but before we actually entered
-+ * a handle here.
- */
- dbe = &dblp->dbentry[argp->fileid];
- if (dbe->dbp == NULL && !dbe->deleted) {
- /* No valid entry here. */
-- if ((argp->opcode != LOG_CLOSE &&
-- argp->opcode != LOG_RCLOSE) ||
-- (op != DB_TXN_OPENFILES &&
-- op !=DB_TXN_POPENFILES)) {
-+ if (DB_REDO(op) ||
-+ argp->opcode == LOG_CHECKPOINT) {
- __db_err(dbenv,
- "Improper file close at %lu/%lu",
- (u_long)lsnp->file,
---- libdb/env/env_recover.c.orig Thu Nov 20 23:13:20 2003
-+++ libdb/env/env_recover.c Fri Mar 18 20:31:14 2005
-@@ -232,12 +232,9 @@
- * we'll still need to do a vtruncate based on information we haven't
- * yet collected.
- */
-- if (ret == DB_NOTFOUND) {
-+ if (ret == DB_NOTFOUND)
- ret = 0;
-- if (max_lsn == NULL)
-- goto done;
-- }
-- if (ret != 0)
-+ else if (ret != 0)
- goto err;
-
- hi_txn = txnid;
-@@ -331,7 +328,7 @@
-
- /* Find a low txnid. */
- ret = 0;
-- do {
-+ if (hi_txn != 0) do {
- /* txnid is after rectype, which is a u_int32. */
- memcpy(&txnid,
- (u_int8_t *)data.data + sizeof(u_int32_t), sizeof(txnid));
-@@ -344,11 +341,8 @@
- * There are no transactions and we're not recovering to an LSN (see
- * above), so there is nothing to do.
- */
-- if (ret == DB_NOTFOUND) {
-+ if (ret == DB_NOTFOUND)
- ret = 0;
-- if (max_lsn == NULL)
-- goto done;
-- }
-
- /* Reset to the first lsn. */
- if (ret != 0 || (ret = logc->get(logc, &first_lsn, &data, DB_SET)) != 0)
-@@ -367,6 +361,10 @@
- txninfo, &data, &first_lsn, &last_lsn, nfiles, 1)) != 0)
- goto err;
-
-+ /* If there were no transactions, then we can bail out early. */
-+ if (hi_txn == 0 && max_lsn == NULL)
-+ goto done;
-+
- /*
- * Pass #2.
- *
-@@ -483,6 +481,7 @@
- if ((ret = __dbreg_close_files(dbenv)) != 0)
- goto err;
-
-+done:
- if (max_lsn != NULL) {
- region->last_ckp = ((DB_TXNHEAD *)txninfo)->ckplsn;
-
-@@ -538,7 +537,8 @@
- __db_err(dbenv, "Recovery complete at %.24s", ctime(&now));
- __db_err(dbenv, "%s %lx %s [%lu][%lu]",
- "Maximum transaction ID",
-- ((DB_TXNHEAD *)txninfo)->maxid,
-+ txninfo == NULL ? TXN_MINIMUM :
-+ ((DB_TXNHEAD *)txninfo)->maxid,
- "Recovery checkpoint",
- (u_long)region->last_ckp.file,
- (u_long)region->last_ckp.offset);
-@@ -550,7 +550,6 @@
- (u_long)lsn.file, (u_long)lsn.offset, pass);
- }
-
--done:
- err: if (lockid != DB_LOCK_INVALIDID) {
- if ((t_ret = __rep_unlockpages(dbenv, lockid)) != 0 && ret == 0)
- ret = t_ret;