summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2015-09-08 18:51:27 +0000
committerjoerg <joerg@pkgsrc.org>2015-09-08 18:51:27 +0000
commitdf86fcf6981908a8336c852edca1c68974b977e7 (patch)
tree178529745f11264236861b7c068a00c240abaca5
parentc21fe531d9e7893b4c57432cce5de8c6956f7c9d (diff)
downloadpkgsrc-df86fcf6981908a8336c852edca1c68974b977e7.tar.gz
Avoid overlap between db's atomic.h and stdatomic.h.
-rw-r--r--databases/db4/distinfo9
-rw-r--r--databases/db4/patches/patch-dbinc_atomic.h24
-rw-r--r--databases/db4/patches/patch-mp_mp__fget.c22
-rw-r--r--databases/db4/patches/patch-mp_mp__mvcc.c22
-rw-r--r--databases/db4/patches/patch-mp_mp__region.c22
-rw-r--r--databases/db4/patches/patch-mutex_mut__method.c13
-rw-r--r--databases/db5/distinfo9
-rw-r--r--databases/db5/patches/patch-src_dbinc_atomic.h22
-rw-r--r--databases/db5/patches/patch-src_mp_mp__fget.c22
-rw-r--r--databases/db5/patches/patch-src_mp_mp__mvcc.c22
-rw-r--r--databases/db5/patches/patch-src_mp_mp__region.c22
-rw-r--r--databases/db5/patches/patch-src_mutex_mut__method.c13
-rw-r--r--databases/db5/patches/patch-src_mutex_mut__tas.c22
-rw-r--r--databases/db6/distinfo9
-rw-r--r--databases/db6/patches/patch-src_dbinc_atomic.h22
-rw-r--r--databases/db6/patches/patch-src_mp_mp__fget.c22
-rw-r--r--databases/db6/patches/patch-src_mp_mp__mvcc.c22
-rw-r--r--databases/db6/patches/patch-src_mp_mp__region.c22
-rw-r--r--databases/db6/patches/patch-src_mutex_mut__method.c13
-rw-r--r--databases/db6/patches/patch-src_mutex_mut__tas.c22
20 files changed, 366 insertions, 10 deletions
diff --git a/databases/db4/distinfo b/databases/db4/distinfo
index cd145631c39..b41e4937db5 100644
--- a/databases/db4/distinfo
+++ b/databases/db4/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.43 2014/07/23 00:22:42 ryoon Exp $
+$NetBSD: distinfo,v 1.44 2015/09/08 18:51:27 joerg Exp $
SHA1 (db-4.8.30.tar.gz) = ab36c170dda5b2ceaad3915ced96e41c6b7e493c
RMD160 (db-4.8.30.tar.gz) = dd2fcd4c9b857a91e2f491fd4fadb0c51b993a9c
@@ -7,7 +7,12 @@ SHA1 (patch-aa) = 1004feec022eefbf3fd57b6d9af99edc5a2bf17a
SHA1 (patch-ab) = 961c4ef5ad84739bd7eae57f407b89f42864b66e
SHA1 (patch-ac) = 045a3b83b9c6c164382ec546b06ae248620552cf
SHA1 (patch-ae) = 43e574154de93dba60392b09d6ebddbca1036849
-SHA1 (patch-dbinc_atomic.h) = ff60e3af41ac1b000ebccc91bc673adde5c7463b
+SHA1 (patch-dbinc_atomic.h) = d68db1b7e07b35ec070a18f0195b9f3b386114dd
SHA1 (patch-dist_s__sig) = d891a6fabd27a07776bdaa21843563638ecb89f2
SHA1 (patch-env_env__sig.c) = 93199a4147de946d1285fa006c751f4569f2cdb5
+SHA1 (patch-mp_mp__fget.c) = 697955fec5e492ba22c1bf6832527d115c3782ad
+SHA1 (patch-mp_mp__mvcc.c) = 72ceab20696d0391823c02b0f6b6cd485f40249b
+SHA1 (patch-mp_mp__region.c) = ac9f5934864b14027b417ab032679aee237208e3
+SHA1 (patch-mutex_mut__method.c) = 6134e13ea1d9c30e3f6ad61bd043f0add56f5c95
+SHA1 (patch-mutex_mut__tas.c) = a07b51a18d04cb3ab4abd5b0c675cf0170083210
SHA1 (patch-repmgr_repmgr__posix.c) = 98ca8bbb1a82b02db2be6f0a69c5d74d8563fe74
diff --git a/databases/db4/patches/patch-dbinc_atomic.h b/databases/db4/patches/patch-dbinc_atomic.h
index 1ac36262a8a..ccf09f7be35 100644
--- a/databases/db4/patches/patch-dbinc_atomic.h
+++ b/databases/db4/patches/patch-dbinc_atomic.h
@@ -1,10 +1,21 @@
-$NetBSD: patch-dbinc_atomic.h,v 1.1 2012/05/29 20:18:28 joerg Exp $
+$NetBSD: patch-dbinc_atomic.h,v 1.2 2015/09/08 18:51:27 joerg Exp $
Don't define inline functions in the protected namespace.
This conflicts with Clang builtins.
---- dbinc/atomic.h.orig 2012-05-24 10:38:34.000000000 +0000
+Avoid overlap with stdatomic.h, the C++ binding uses <atomic>.
+
+--- dbinc/atomic.h.orig 2010-04-12 20:25:22.000000000 +0000
+++ dbinc/atomic.h
+@@ -70,7 +70,7 @@ typedef struct {
+ * These have no memory barriers; the caller must include them when necessary.
+ */
+ #define atomic_read(p) ((p)->value)
+-#define atomic_init(p, val) ((p)->value = (val))
++#define db_atomic_init(p, val) ((p)->value = (val))
+
+ #ifdef HAVE_ATOMIC_SUPPORT
+
@@ -141,11 +141,7 @@ typedef LONG volatile *interlocked_val;
#if defined(HAVE_ATOMIC_X86_GCC_ASSEMBLY)
@@ -36,3 +47,12 @@ This conflicts with Clang builtins.
db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
{
atomic_value_t was;
+@@ -206,7 +202,7 @@ static inline int __atomic_compare_excha
+ #define atomic_dec(env, p) (--(p)->value)
+ #define atomic_compare_exchange(env, p, oldval, newval) \
+ (DB_ASSERT(env, atomic_read(p) == (oldval)), \
+- atomic_init(p, (newval)), 1)
++ db_atomic_init(p, (newval)), 1)
+ #else
+ #define atomic_inc(env, p) __atomic_inc(env, p)
+ #define atomic_dec(env, p) __atomic_dec(env, p)
diff --git a/databases/db4/patches/patch-mp_mp__fget.c b/databases/db4/patches/patch-mp_mp__fget.c
new file mode 100644
index 00000000000..5090323ee65
--- /dev/null
+++ b/databases/db4/patches/patch-mp_mp__fget.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-mp_mp__fget.c,v 1.1 2015/09/08 18:51:27 joerg Exp $
+
+--- mp/mp_fget.c.orig 2015-08-29 23:35:11.000000000 +0000
++++ mp/mp_fget.c
+@@ -617,7 +617,7 @@ alloc: /* Allocate a new buffer header
+
+ /* Initialize enough so we can call __memp_bhfree. */
+ alloc_bhp->flags = 0;
+- atomic_init(&alloc_bhp->ref, 1);
++ db_atomic_init(&alloc_bhp->ref, 1);
+ #ifdef DIAGNOSTIC
+ if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
+ __db_errx(env,
+@@ -911,7 +911,7 @@ alloc: /* Allocate a new buffer header
+ MVCC_MPROTECT(bhp->buf, mfp->stat.st_pagesize,
+ PROT_READ);
+
+- atomic_init(&alloc_bhp->ref, 1);
++ db_atomic_init(&alloc_bhp->ref, 1);
+ MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+ alloc_bhp->priority = bhp->priority;
+ alloc_bhp->pgno = bhp->pgno;
diff --git a/databases/db4/patches/patch-mp_mp__mvcc.c b/databases/db4/patches/patch-mp_mp__mvcc.c
new file mode 100644
index 00000000000..a89c562435a
--- /dev/null
+++ b/databases/db4/patches/patch-mp_mp__mvcc.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-mp_mp__mvcc.c,v 1.1 2015/09/08 18:51:27 joerg Exp $
+
+--- mp/mp_mvcc.c.orig 2015-08-29 23:35:09.000000000 +0000
++++ mp/mp_mvcc.c
+@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, n
+ #else
+ memcpy(frozen_bhp, bhp, SSZA(BH, buf));
+ #endif
+- atomic_init(&frozen_bhp->ref, 0);
++ db_atomic_init(&frozen_bhp->ref, 0);
+ if (mutex != MUTEX_INVALID)
+ frozen_bhp->mtx_buf = mutex;
+ else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
+@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_b
+ #endif
+ alloc_bhp->mtx_buf = mutex;
+ MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+- atomic_init(&alloc_bhp->ref, 1);
++ db_atomic_init(&alloc_bhp->ref, 1);
+ F_CLR(alloc_bhp, BH_FROZEN);
+ }
+
diff --git a/databases/db4/patches/patch-mp_mp__region.c b/databases/db4/patches/patch-mp_mp__region.c
new file mode 100644
index 00000000000..b113d68201f
--- /dev/null
+++ b/databases/db4/patches/patch-mp_mp__region.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-mp_mp__region.c,v 1.1 2015/09/08 18:51:27 joerg Exp $
+
+--- mp/mp_region.c.orig 2015-08-29 23:35:05.000000000 +0000
++++ mp/mp_region.c
+@@ -224,7 +224,7 @@ __memp_init(env, dbmp, reginfo_off, htab
+ MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
+ return (ret);
+ SH_TAILQ_INIT(&htab[i].hash_bucket);
+- atomic_init(&htab[i].hash_page_dirty, 0);
++ db_atomic_init(&htab[i].hash_page_dirty, 0);
+ }
+
+ /*
+@@ -269,7 +269,7 @@ __memp_init(env, dbmp, reginfo_off, htab
+ hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID :
+ mtx_base + i;
+ SH_TAILQ_INIT(&hp->hash_bucket);
+- atomic_init(&hp->hash_page_dirty, 0);
++ db_atomic_init(&hp->hash_page_dirty, 0);
+ #ifdef HAVE_STATISTICS
+ hp->hash_io_wait = 0;
+ hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0;
diff --git a/databases/db4/patches/patch-mutex_mut__method.c b/databases/db4/patches/patch-mutex_mut__method.c
new file mode 100644
index 00000000000..5264f4faf59
--- /dev/null
+++ b/databases/db4/patches/patch-mutex_mut__method.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-mutex_mut__method.c,v 1.1 2015/09/08 18:51:27 joerg Exp $
+
+--- mutex/mut_method.c.orig 2015-08-29 23:35:02.000000000 +0000
++++ mutex/mut_method.c
+@@ -426,7 +426,7 @@ atomic_compare_exchange(env, v, oldval,
+ MUTEX_LOCK(env, mtx);
+ ret = atomic_read(v) == oldval;
+ if (ret)
+- atomic_init(v, newval);
++ db_atomic_init(v, newval);
+ MUTEX_UNLOCK(env, mtx);
+
+ return (ret);
diff --git a/databases/db5/distinfo b/databases/db5/distinfo
index 7174a05615a..9cfde3f6269 100644
--- a/databases/db5/distinfo
+++ b/databases/db5/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2014/10/06 14:29:45 adam Exp $
+$NetBSD: distinfo,v 1.11 2015/09/08 18:51:27 joerg Exp $
SHA1 (db-5.3.28.tar.gz) = fa3f8a41ad5101f43d08bc0efb6241c9b6fc1ae9
RMD160 (db-5.3.28.tar.gz) = a4898908ef6dccb137df02e43843f7d3cfab6a3c
@@ -7,4 +7,9 @@ SHA1 (patch-aa) = 9450e95f46787ddc1d661beaa239ea0ff4673f20
SHA1 (patch-ab) = b09fac68d7d847c5660078de90a16f27268e9858
SHA1 (patch-ac) = 0a243583ae2b66290fb83b112c539001bf3feef2
SHA1 (patch-dist_aclocal_libtool.m4) = 2d56b318b4f0d14a9352f6c1eb14a4c2b8315fc0
-SHA1 (patch-src_dbinc_atomic.h) = 6d1e97317c20021d13ff5b59f587730301b4a795
+SHA1 (patch-src_dbinc_atomic.h) = c4fbe421d2c8ba68dc81aeeda1cad09a2c68fbe5
+SHA1 (patch-src_mp_mp__fget.c) = c5050193279db979d51d47f5e2c8d7c5cace0fa7
+SHA1 (patch-src_mp_mp__mvcc.c) = 2e8b4e5ff7a7534681597261ba82ca08e9231567
+SHA1 (patch-src_mp_mp__region.c) = 1c33dc783660515ff24ba018d1ef99cedf9eb3f8
+SHA1 (patch-src_mutex_mut__method.c) = 0d13673db042bc0a3d2a49f6636b12f8d2b6e7ca
+SHA1 (patch-src_mutex_mut__tas.c) = 873d5b4ef69ad0e792c28567e54beda76f1b126c
diff --git a/databases/db5/patches/patch-src_dbinc_atomic.h b/databases/db5/patches/patch-src_dbinc_atomic.h
index c2e8d26992b..f08d8f5af43 100644
--- a/databases/db5/patches/patch-src_dbinc_atomic.h
+++ b/databases/db5/patches/patch-src_dbinc_atomic.h
@@ -1,9 +1,18 @@
-$NetBSD: patch-src_dbinc_atomic.h,v 1.1 2012/05/31 09:37:21 adam Exp $
+$NetBSD: patch-src_dbinc_atomic.h,v 1.2 2015/09/08 18:51:28 joerg Exp $
Avoid 'definition of builtin function' error.
---- src/dbinc/atomic.h.orig 2012-05-30 14:59:06.000000000 +0000
+--- src/dbinc/atomic.h.orig 2013-09-09 15:35:08.000000000 +0000
+++ src/dbinc/atomic.h
+@@ -70,7 +70,7 @@ typedef struct {
+ * These have no memory barriers; the caller must include them when necessary.
+ */
+ #define atomic_read(p) ((p)->value)
+-#define atomic_init(p, val) ((p)->value = (val))
++#define db_atomic_init(p, val) ((p)->value = (val))
+
+ #ifdef HAVE_ATOMIC_SUPPORT
+
@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
#define atomic_inc(env, p) __atomic_inc(p)
#define atomic_dec(env, p) __atomic_dec(p)
@@ -22,3 +31,12 @@ Avoid 'definition of builtin function' error.
db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
{
atomic_value_t was;
+@@ -206,7 +206,7 @@ static inline int __atomic_compare_excha
+ #define atomic_dec(env, p) (--(p)->value)
+ #define atomic_compare_exchange(env, p, oldval, newval) \
+ (DB_ASSERT(env, atomic_read(p) == (oldval)), \
+- atomic_init(p, (newval)), 1)
++ db_atomic_init(p, (newval)), 1)
+ #else
+ #define atomic_inc(env, p) __atomic_inc(env, p)
+ #define atomic_dec(env, p) __atomic_dec(env, p)
diff --git a/databases/db5/patches/patch-src_mp_mp__fget.c b/databases/db5/patches/patch-src_mp_mp__fget.c
new file mode 100644
index 00000000000..e050c3dccf6
--- /dev/null
+++ b/databases/db5/patches/patch-src_mp_mp__fget.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_mp_mp__fget.c,v 1.1 2015/09/08 18:51:28 joerg Exp $
+
+--- src/mp/mp_fget.c.orig 2015-09-02 11:12:45.000000000 +0000
++++ src/mp/mp_fget.c
+@@ -649,7 +649,7 @@ alloc: /* Allocate a new buffer header
+
+ /* Initialize enough so we can call __memp_bhfree. */
+ alloc_bhp->flags = 0;
+- atomic_init(&alloc_bhp->ref, 1);
++ db_atomic_init(&alloc_bhp->ref, 1);
+ #ifdef DIAGNOSTIC
+ if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
+ __db_errx(env, DB_STR("3025",
+@@ -955,7 +955,7 @@ alloc: /* Allocate a new buffer header
+ MVCC_MPROTECT(bhp->buf, mfp->pagesize,
+ PROT_READ);
+
+- atomic_init(&alloc_bhp->ref, 1);
++ db_atomic_init(&alloc_bhp->ref, 1);
+ MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+ alloc_bhp->priority = bhp->priority;
+ alloc_bhp->pgno = bhp->pgno;
diff --git a/databases/db5/patches/patch-src_mp_mp__mvcc.c b/databases/db5/patches/patch-src_mp_mp__mvcc.c
new file mode 100644
index 00000000000..cc9c99e685f
--- /dev/null
+++ b/databases/db5/patches/patch-src_mp_mp__mvcc.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_mp_mp__mvcc.c,v 1.1 2015/09/08 18:51:28 joerg Exp $
+
+--- src/mp/mp_mvcc.c.orig 2015-09-02 11:12:47.000000000 +0000
++++ src/mp/mp_mvcc.c
+@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, n
+ #else
+ memcpy(frozen_bhp, bhp, SSZA(BH, buf));
+ #endif
+- atomic_init(&frozen_bhp->ref, 0);
++ db_atomic_init(&frozen_bhp->ref, 0);
+ if (mutex != MUTEX_INVALID)
+ frozen_bhp->mtx_buf = mutex;
+ else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
+@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_b
+ #endif
+ alloc_bhp->mtx_buf = mutex;
+ MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+- atomic_init(&alloc_bhp->ref, 1);
++ db_atomic_init(&alloc_bhp->ref, 1);
+ F_CLR(alloc_bhp, BH_FROZEN);
+ }
+
diff --git a/databases/db5/patches/patch-src_mp_mp__region.c b/databases/db5/patches/patch-src_mp_mp__region.c
new file mode 100644
index 00000000000..a5be8857e68
--- /dev/null
+++ b/databases/db5/patches/patch-src_mp_mp__region.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_mp_mp__region.c,v 1.1 2015/09/08 18:51:28 joerg Exp $
+
+--- src/mp/mp_region.c.orig 2015-09-02 11:12:49.000000000 +0000
++++ src/mp/mp_region.c
+@@ -245,7 +245,7 @@ __memp_init(env, dbmp, reginfo_off, htab
+ MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
+ return (ret);
+ SH_TAILQ_INIT(&htab[i].hash_bucket);
+- atomic_init(&htab[i].hash_page_dirty, 0);
++ db_atomic_init(&htab[i].hash_page_dirty, 0);
+ }
+
+ /*
+@@ -302,7 +302,7 @@ no_prealloc:
+ } else
+ hp->mtx_hash = mtx_base + (i % dbenv->mp_mtxcount);
+ SH_TAILQ_INIT(&hp->hash_bucket);
+- atomic_init(&hp->hash_page_dirty, 0);
++ db_atomic_init(&hp->hash_page_dirty, 0);
+ #ifdef HAVE_STATISTICS
+ hp->hash_io_wait = 0;
+ hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0;
diff --git a/databases/db5/patches/patch-src_mutex_mut__method.c b/databases/db5/patches/patch-src_mutex_mut__method.c
new file mode 100644
index 00000000000..9826bbd3673
--- /dev/null
+++ b/databases/db5/patches/patch-src_mutex_mut__method.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_mutex_mut__method.c,v 1.1 2015/09/08 18:51:28 joerg Exp $
+
+--- src/mutex/mut_method.c.orig 2015-09-02 11:12:53.000000000 +0000
++++ src/mutex/mut_method.c
+@@ -474,7 +474,7 @@ atomic_compare_exchange(env, v, oldval,
+ MUTEX_LOCK(env, mtx);
+ ret = atomic_read(v) == oldval;
+ if (ret)
+- atomic_init(v, newval);
++ db_atomic_init(v, newval);
+ MUTEX_UNLOCK(env, mtx);
+
+ return (ret);
diff --git a/databases/db5/patches/patch-src_mutex_mut__tas.c b/databases/db5/patches/patch-src_mutex_mut__tas.c
new file mode 100644
index 00000000000..fdff343fca3
--- /dev/null
+++ b/databases/db5/patches/patch-src_mutex_mut__tas.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_mutex_mut__tas.c,v 1.1 2015/09/08 18:51:28 joerg Exp $
+
+--- src/mutex/mut_tas.c.orig 2015-09-02 11:12:55.000000000 +0000
++++ src/mutex/mut_tas.c
+@@ -47,7 +47,7 @@ __db_tas_mutex_init(env, mutex, flags)
+
+ #ifdef HAVE_SHARED_LATCHES
+ if (F_ISSET(mutexp, DB_MUTEX_SHARED))
+- atomic_init(&mutexp->sharecount, 0);
++ db_atomic_init(&mutexp->sharecount, 0);
+ else
+ #endif
+ if (MUTEX_INIT(&mutexp->tas)) {
+@@ -536,7 +536,7 @@ __db_tas_mutex_unlock(env, mutex)
+ F_CLR(mutexp, DB_MUTEX_LOCKED);
+ /* Flush flag update before zeroing count */
+ MEMBAR_EXIT();
+- atomic_init(&mutexp->sharecount, 0);
++ db_atomic_init(&mutexp->sharecount, 0);
+ } else {
+ DB_ASSERT(env, sharecount > 0);
+ MEMBAR_EXIT();
diff --git a/databases/db6/distinfo b/databases/db6/distinfo
index 5229f663113..21af3e8dafe 100644
--- a/databases/db6/distinfo
+++ b/databases/db6/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2015/01/01 18:52:52 ryoon Exp $
+$NetBSD: distinfo,v 1.2 2015/09/08 18:51:28 joerg Exp $
SHA1 (db-6.1.19.tar.gz) = e266f8ab73f4f1ea276d203ce85426e5a6831501
RMD160 (db-6.1.19.tar.gz) = fcb5fbe20e18339e18a244afbcfa13819aecad36
@@ -6,5 +6,10 @@ Size (db-6.1.19.tar.gz) = 37492835 bytes
SHA1 (patch-dist_Makefile.in) = dbc5f8fd26e715f6dff8ff261a08b2856ea3c46e
SHA1 (patch-dist_aclocal_libtool.m4) = 37367e10d9d856cf233b7a0efd3680f35728039e
SHA1 (patch-dist_configure) = 2fb4c6cdd29ac5a9ad520af411517660b24e8768
-SHA1 (patch-src_dbinc_atomic.h) = da39a3ee5e6b4b0d3255bfef95601890afd80709
+SHA1 (patch-src_dbinc_atomic.h) = 240a4a6ec094e868d9a5e95ec4ab72d5b9ddfc23
SHA1 (patch-src_hmac_sha1.c) = 0e98e6383c214adbb939839bb345e55efe8d89da
+SHA1 (patch-src_mp_mp__fget.c) = 059ecdb74bef29c17b445c305b6d4934b5a3c59b
+SHA1 (patch-src_mp_mp__mvcc.c) = 7a543c4e56d72bba607d6e8ec6b667b944e418f1
+SHA1 (patch-src_mp_mp__region.c) = bba0d8e3046d5d571ec00e8b07d7d10a375e6057
+SHA1 (patch-src_mutex_mut__method.c) = 5a8695160913f6a70be39c02aff7a4c7240fec6b
+SHA1 (patch-src_mutex_mut__tas.c) = 3bf893026bfc0878fe35050b8339c5a6a59f95e6
diff --git a/databases/db6/patches/patch-src_dbinc_atomic.h b/databases/db6/patches/patch-src_dbinc_atomic.h
index e69de29bb2d..8d3125f86bd 100644
--- a/databases/db6/patches/patch-src_dbinc_atomic.h
+++ b/databases/db6/patches/patch-src_dbinc_atomic.h
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_dbinc_atomic.h,v 1.2 2015/09/08 18:51:28 joerg Exp $
+
+--- src/dbinc/atomic.h.orig 2015-09-02 11:18:22.000000000 +0000
++++ src/dbinc/atomic.h
+@@ -70,7 +70,7 @@ typedef struct {
+ * These have no memory barriers; the caller must include them when necessary.
+ */
+ #define atomic_read(p) ((p)->value)
+-#define atomic_init(p, val) ((p)->value = (val))
++#define db_atomic_init(p, val) ((p)->value = (val))
+
+ #ifdef HAVE_ATOMIC_SUPPORT
+
+@@ -205,7 +205,7 @@ static inline int __atomic_compare_excha
+ #define atomic_dec(env, p) (--(p)->value)
+ #define atomic_compare_exchange(env, p, oldval, newval) \
+ (DB_ASSERT(env, atomic_read(p) == (oldval)), \
+- atomic_init(p, (newval)), 1)
++ db_atomic_init(p, (newval)), 1)
+ #else
+ #define atomic_inc(env, p) __atomic_inc(env, p)
+ #define atomic_dec(env, p) __atomic_dec(env, p)
diff --git a/databases/db6/patches/patch-src_mp_mp__fget.c b/databases/db6/patches/patch-src_mp_mp__fget.c
new file mode 100644
index 00000000000..bc41cea4136
--- /dev/null
+++ b/databases/db6/patches/patch-src_mp_mp__fget.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_mp_mp__fget.c,v 1.1 2015/09/08 18:51:28 joerg Exp $
+
+--- src/mp/mp_fget.c.orig 2015-09-02 11:18:18.000000000 +0000
++++ src/mp/mp_fget.c
+@@ -654,7 +654,7 @@ alloc: /* Allocate a new buffer header
+
+ /* Initialize enough so we can call __memp_bhfree. */
+ alloc_bhp->flags = 0;
+- atomic_init(&alloc_bhp->ref, 1);
++ db_atomic_init(&alloc_bhp->ref, 1);
+ #ifdef DIAGNOSTIC
+ if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
+ __db_errx(env, DB_STR("3025",
+@@ -969,7 +969,7 @@ alloc: /* Allocate a new buffer header
+ MVCC_MPROTECT(bhp->buf, mfp->pagesize,
+ PROT_READ);
+
+- atomic_init(&alloc_bhp->ref, 1);
++ db_atomic_init(&alloc_bhp->ref, 1);
+ MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+ alloc_bhp->priority = bhp->priority;
+ alloc_bhp->pgno = bhp->pgno;
diff --git a/databases/db6/patches/patch-src_mp_mp__mvcc.c b/databases/db6/patches/patch-src_mp_mp__mvcc.c
new file mode 100644
index 00000000000..58f73ae2e93
--- /dev/null
+++ b/databases/db6/patches/patch-src_mp_mp__mvcc.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_mp_mp__mvcc.c,v 1.1 2015/09/08 18:51:28 joerg Exp $
+
+--- src/mp/mp_mvcc.c.orig 2015-09-02 11:18:15.000000000 +0000
++++ src/mp/mp_mvcc.c
+@@ -281,7 +281,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, n
+ #else
+ memcpy(frozen_bhp, bhp, SSZA(BH, buf));
+ #endif
+- atomic_init(&frozen_bhp->ref, 0);
++ db_atomic_init(&frozen_bhp->ref, 0);
+ if (mutex != MUTEX_INVALID)
+ frozen_bhp->mtx_buf = mutex;
+ else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
+@@ -440,7 +440,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_b
+ #endif
+ alloc_bhp->mtx_buf = mutex;
+ MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+- atomic_init(&alloc_bhp->ref, 1);
++ db_atomic_init(&alloc_bhp->ref, 1);
+ F_CLR(alloc_bhp, BH_FROZEN);
+ }
+
diff --git a/databases/db6/patches/patch-src_mp_mp__region.c b/databases/db6/patches/patch-src_mp_mp__region.c
new file mode 100644
index 00000000000..8e6ff5fa800
--- /dev/null
+++ b/databases/db6/patches/patch-src_mp_mp__region.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_mp_mp__region.c,v 1.1 2015/09/08 18:51:28 joerg Exp $
+
+--- src/mp/mp_region.c.orig 2015-09-02 11:18:13.000000000 +0000
++++ src/mp/mp_region.c
+@@ -278,7 +278,7 @@ __memp_init(env, dbmp, reginfo_off, htab
+ MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
+ return (ret);
+ SH_TAILQ_INIT(&htab[i].hash_bucket);
+- atomic_init(&htab[i].hash_page_dirty, 0);
++ db_atomic_init(&htab[i].hash_page_dirty, 0);
+ }
+
+ mtx_base = mtx_prev = MUTEX_INVALID;
+@@ -332,7 +332,7 @@ no_prealloc:
+ DB_MUTEX_SHARED, &hp->mtx_hash)) != 0)
+ return (ret);
+ SH_TAILQ_INIT(&hp->hash_bucket);
+- atomic_init(&hp->hash_page_dirty, 0);
++ db_atomic_init(&hp->hash_page_dirty, 0);
+ #ifdef HAVE_STATISTICS
+ hp->hash_io_wait = 0;
+ hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0;
diff --git a/databases/db6/patches/patch-src_mutex_mut__method.c b/databases/db6/patches/patch-src_mutex_mut__method.c
new file mode 100644
index 00000000000..606dcff2660
--- /dev/null
+++ b/databases/db6/patches/patch-src_mutex_mut__method.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_mutex_mut__method.c,v 1.1 2015/09/08 18:51:28 joerg Exp $
+
+--- src/mutex/mut_method.c.orig 2015-09-02 11:18:11.000000000 +0000
++++ src/mutex/mut_method.c
+@@ -501,7 +501,7 @@ atomic_compare_exchange(env, v, oldval,
+ MUTEX_LOCK(env, mtx);
+ ret = atomic_read(v) == oldval;
+ if (ret)
+- atomic_init(v, newval);
++ db_atomic_init(v, newval);
+ MUTEX_UNLOCK(env, mtx);
+
+ return (ret);
diff --git a/databases/db6/patches/patch-src_mutex_mut__tas.c b/databases/db6/patches/patch-src_mutex_mut__tas.c
new file mode 100644
index 00000000000..ef9185aab44
--- /dev/null
+++ b/databases/db6/patches/patch-src_mutex_mut__tas.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_mutex_mut__tas.c,v 1.1 2015/09/08 18:51:28 joerg Exp $
+
+--- src/mutex/mut_tas.c.orig 2015-09-02 11:18:09.000000000 +0000
++++ src/mutex/mut_tas.c
+@@ -47,7 +47,7 @@ __db_tas_mutex_init(env, mutex, flags)
+
+ #ifdef HAVE_SHARED_LATCHES
+ if (F_ISSET(mutexp, DB_MUTEX_SHARED))
+- atomic_init(&mutexp->sharecount, 0);
++ db_atomic_init(&mutexp->sharecount, 0);
+ else
+ #endif
+ if (MUTEX_INIT(&mutexp->tas)) {
+@@ -642,7 +642,7 @@ was_not_locked:
+ F_CLR(mutexp, DB_MUTEX_LOCKED);
+ /* Flush flag update before zeroing count */
+ MEMBAR_EXIT();
+- atomic_init(&mutexp->sharecount, 0);
++ db_atomic_init(&mutexp->sharecount, 0);
+ } else {
+ DB_ASSERT(env, sharecount > 0);
+ MEMBAR_EXIT();