summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2015-03-06 13:44:45 -0330
committerMatthew Newhook <matthew@zeroc.com>2015-03-06 13:44:45 -0330
commit54635b6ce5bf1cbb331370ce53e901515209ab59 (patch)
tree4310131dda6102219852bf4a53e8c1c2db0bc03a
parentFixed php operations test on Windows (diff)
downloadice-54635b6ce5bf1cbb331370ce53e901515209ab59.tar.bz2
ice-54635b6ce5bf1cbb331370ce53e901515209ab59.tar.xz
ice-54635b6ce5bf1cbb331370ce53e901515209ab59.zip
Added missing BerkeleyDB patch.
-rw-r--r--distribution/src/thirdparty/README4
-rw-r--r--distribution/src/thirdparty/db/patch.db.5.3.21242
-rw-r--r--distribution/src/thirdparty/db/patch.db.5.3.2870
3 files changed, 72 insertions, 244 deletions
diff --git a/distribution/src/thirdparty/README b/distribution/src/thirdparty/README
index ef4610c4765..30bf5ec1785 100644
--- a/distribution/src/thirdparty/README
+++ b/distribution/src/thirdparty/README
@@ -63,8 +63,8 @@ Berkeley DB
-----------
The file db/patch.db.5.3.28 in this archive contains several fixes
-required to build Berkeley DB with Apple Clang. This patch is
-not needed if you use another C++ compiler.
+required to build Berkeley DB with Apple Clang & Java 8. This patch
+is not needed if you use another C++ compiler.
After extracting the Berkeley DB source distribution, change to the
top-level directory and apply the patch as shown below:
diff --git a/distribution/src/thirdparty/db/patch.db.5.3.21 b/distribution/src/thirdparty/db/patch.db.5.3.21
deleted file mode 100644
index 65250be56d0..00000000000
--- a/distribution/src/thirdparty/db/patch.db.5.3.21
+++ /dev/null
@@ -1,242 +0,0 @@
-#
-# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
-#
-diff -r -c -N ../db-5.3.28.NC-old/src/dbinc/atomic.h ./src/dbinc/atomic.h
-*** ../db-5.3.28.NC-old/src/dbinc/atomic.h 2012-05-11 19:57:53.000000000 +0200
---- ./src/dbinc/atomic.h 2013-02-04 18:47:26.000000000 +0100
-***************
-*** 70,76 ****
- * 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))
-
- #ifdef HAVE_ATOMIC_SUPPORT
-
---- 70,76 ----
- * These have no memory barriers; the caller must include them when necessary.
- */
- #define atomic_read(p) ((p)->value)
-! #define db_atomic_init(p, val) ((p)->value = (val))
-
- #ifdef HAVE_ATOMIC_SUPPORT
-
-***************
-*** 144,150 ****
- #define atomic_inc(env, p) __atomic_inc(p)
- #define atomic_dec(env, p) __atomic_dec(p)
- #define atomic_compare_exchange(env, p, o, n) \
-! __atomic_compare_exchange((p), (o), (n))
- static inline int __atomic_inc(db_atomic_t *p)
- {
- int temp;
---- 144,150 ----
- #define atomic_inc(env, p) __atomic_inc(p)
- #define atomic_dec(env, p) __atomic_dec(p)
- #define atomic_compare_exchange(env, p, o, n) \
-! db__atomic_compare_exchange((p), (o), (n))
- static inline int __atomic_inc(db_atomic_t *p)
- {
- int temp;
-***************
-*** 176,182 ****
- * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
- * which configure could be changed to use.
- */
-! static inline int __atomic_compare_exchange(
- db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
- {
- atomic_value_t was;
---- 176,182 ----
- * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
- * which configure could be changed to use.
- */
-! static inline int db__atomic_compare_exchange(
- db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
- {
- atomic_value_t was;
-***************
-*** 206,212 ****
- #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)
- #else
- #define atomic_inc(env, p) __atomic_inc(env, p)
- #define atomic_dec(env, p) __atomic_dec(env, p)
---- 206,212 ----
- #define atomic_dec(env, p) (--(p)->value)
- #define atomic_compare_exchange(env, p, oldval, newval) \
- (DB_ASSERT(env, atomic_read(p) == (oldval)), \
-! 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 -r -c -N ../db-5.3.28.NC-old/src/mp/mp_fget.c ./src/mp/mp_fget.c
-*** ../db-5.3.28.NC-old/src/mp/mp_fget.c 2012-05-11 19:57:53.000000000 +0200
---- ./src/mp/mp_fget.c 2013-02-04 18:48:28.000000000 +0100
-***************
-*** 649,655 ****
-
- /* Initialize enough so we can call __memp_bhfree. */
- alloc_bhp->flags = 0;
-! atomic_init(&alloc_bhp->ref, 1);
- #ifdef DIAGNOSTIC
- if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
- __db_errx(env, DB_STR("3025",
---- 649,655 ----
-
- /* Initialize enough so we can call __memp_bhfree. */
- alloc_bhp->flags = 0;
-! 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,961 ****
- MVCC_MPROTECT(bhp->buf, mfp->pagesize,
- PROT_READ);
-
-! atomic_init(&alloc_bhp->ref, 1);
- MUTEX_LOCK(env, alloc_bhp->mtx_buf);
- alloc_bhp->priority = bhp->priority;
- alloc_bhp->pgno = bhp->pgno;
---- 955,961 ----
- MVCC_MPROTECT(bhp->buf, mfp->pagesize,
- PROT_READ);
-
-! 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 -r -c -N ../db-5.3.28.NC-old/src/mp/mp_mvcc.c ./src/mp/mp_mvcc.c
-*** ../db-5.3.28.NC-old/src/mp/mp_mvcc.c 2012-05-11 19:57:53.000000000 +0200
---- ./src/mp/mp_mvcc.c 2013-02-04 18:48:28.000000000 +0100
-***************
-*** 276,282 ****
- #else
- memcpy(frozen_bhp, bhp, SSZA(BH, buf));
- #endif
-! atomic_init(&frozen_bhp->ref, 0);
- if (mutex != MUTEX_INVALID)
- frozen_bhp->mtx_buf = mutex;
- else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
---- 276,282 ----
- #else
- memcpy(frozen_bhp, bhp, SSZA(BH, buf));
- #endif
-! 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,434 ****
- #endif
- alloc_bhp->mtx_buf = mutex;
- MUTEX_LOCK(env, alloc_bhp->mtx_buf);
-! atomic_init(&alloc_bhp->ref, 1);
- F_CLR(alloc_bhp, BH_FROZEN);
- }
-
---- 428,434 ----
- #endif
- alloc_bhp->mtx_buf = mutex;
- MUTEX_LOCK(env, alloc_bhp->mtx_buf);
-! db_atomic_init(&alloc_bhp->ref, 1);
- F_CLR(alloc_bhp, BH_FROZEN);
- }
-
-diff -r -c -N ../db-5.3.28.NC-old/src/mp/mp_region.c ./src/mp/mp_region.c
-*** ../db-5.3.28.NC-old/src/mp/mp_region.c 2012-05-11 19:57:53.000000000 +0200
---- ./src/mp/mp_region.c 2013-02-04 18:48:28.000000000 +0100
-***************
-*** 245,251 ****
- 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);
- }
-
- /*
---- 245,251 ----
- MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
- return (ret);
- SH_TAILQ_INIT(&htab[i].hash_bucket);
-! db_atomic_init(&htab[i].hash_page_dirty, 0);
- }
-
- /*
-***************
-*** 302,308 ****
- } else
- hp->mtx_hash = mtx_base + (i % dbenv->mp_mtxcount);
- SH_TAILQ_INIT(&hp->hash_bucket);
-! 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;
---- 302,308 ----
- } else
- hp->mtx_hash = mtx_base + (i % dbenv->mp_mtxcount);
- SH_TAILQ_INIT(&hp->hash_bucket);
-! 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 -r -c -N ../db-5.3.28.NC-old/src/mutex/mut_method.c ./src/mutex/mut_method.c
-*** ../db-5.3.28.NC-old/src/mutex/mut_method.c 2012-05-11 19:57:53.000000000 +0200
---- ./src/mutex/mut_method.c 2013-02-04 18:48:28.000000000 +0100
-***************
-*** 474,480 ****
- MUTEX_LOCK(env, mtx);
- ret = atomic_read(v) == oldval;
- if (ret)
-! atomic_init(v, newval);
- MUTEX_UNLOCK(env, mtx);
-
- return (ret);
---- 474,480 ----
- MUTEX_LOCK(env, mtx);
- ret = atomic_read(v) == oldval;
- if (ret)
-! db_atomic_init(v, newval);
- MUTEX_UNLOCK(env, mtx);
-
- return (ret);
-diff -r -c -N ../db-5.3.28.NC-old/src/mutex/mut_tas.c ./src/mutex/mut_tas.c
-*** ../db-5.3.28.NC-old/src/mutex/mut_tas.c 2012-05-11 19:57:54.000000000 +0200
---- ./src/mutex/mut_tas.c 2013-02-04 18:48:28.000000000 +0100
-***************
-*** 47,53 ****
-
- #ifdef HAVE_SHARED_LATCHES
- if (F_ISSET(mutexp, DB_MUTEX_SHARED))
-! atomic_init(&mutexp->sharecount, 0);
- else
- #endif
- if (MUTEX_INIT(&mutexp->tas)) {
---- 47,53 ----
-
- #ifdef HAVE_SHARED_LATCHES
- if (F_ISSET(mutexp, DB_MUTEX_SHARED))
-! db_atomic_init(&mutexp->sharecount, 0);
- else
- #endif
- if (MUTEX_INIT(&mutexp->tas)) {
-***************
-*** 536,542 ****
- F_CLR(mutexp, DB_MUTEX_LOCKED);
- /* Flush flag update before zeroing count */
- MEMBAR_EXIT();
-! atomic_init(&mutexp->sharecount, 0);
- } else {
- DB_ASSERT(env, sharecount > 0);
- MEMBAR_EXIT();
---- 536,542 ----
- F_CLR(mutexp, DB_MUTEX_LOCKED);
- /* Flush flag update before zeroing count */
- MEMBAR_EXIT();
-! db_atomic_init(&mutexp->sharecount, 0);
- } else {
- DB_ASSERT(env, sharecount > 0);
- MEMBAR_EXIT();
diff --git a/distribution/src/thirdparty/db/patch.db.5.3.28 b/distribution/src/thirdparty/db/patch.db.5.3.28
new file mode 100644
index 00000000000..eef9d328c9e
--- /dev/null
+++ b/distribution/src/thirdparty/db/patch.db.5.3.28
@@ -0,0 +1,70 @@
+diff -r -c -N ../db-5.3.28.orig/lang/java/src/com/sleepycat/asm/ClassReader.java ./lang/java/src/com/sleepycat/asm/ClassReader.java
+*** ../db-5.3.28.orig/lang/java/src/com/sleepycat/asm/ClassReader.java 2013-09-09 13:05:04.000000000 -0230
+--- ./lang/java/src/com/sleepycat/asm/ClassReader.java 2015-02-20 15:34:50.000000000 -0330
+***************
+*** 163,169 ****
+ public ClassReader(final byte[] b, final int off, final int len) {
+ this.b = b;
+ // checks the class version
+! if (readShort(6) > Opcodes.V1_7) {
+ throw new IllegalArgumentException();
+ }
+ // parses the constant pool
+--- 163,169 ----
+ public ClassReader(final byte[] b, final int off, final int len) {
+ this.b = b;
+ // checks the class version
+! if (readShort(6) > Opcodes.V1_8) {
+ throw new IllegalArgumentException();
+ }
+ // parses the constant pool
+diff -r -c -N ../db-5.3.28.orig/lang/java/src/com/sleepycat/asm/Opcodes.java ./lang/java/src/com/sleepycat/asm/Opcodes.java
+*** ../db-5.3.28.orig/lang/java/src/com/sleepycat/asm/Opcodes.java 2013-09-09 13:05:04.000000000 -0230
+--- ./lang/java/src/com/sleepycat/asm/Opcodes.java 2015-02-20 15:35:09.000000000 -0330
+***************
+*** 56,61 ****
+--- 56,62 ----
+ int V1_5 = 0 << 16 | 49;
+ int V1_6 = 0 << 16 | 50;
+ int V1_7 = 0 << 16 | 51;
++ int V1_8 = 0 << 16 | 52;
+
+ // access flags
+
+diff -r -c -N ../db-5.3.28.orig/src/dbinc/atomic.h ./src/dbinc/atomic.h
+*** ../db-5.3.28.orig/src/dbinc/atomic.h 2013-09-09 13:05:08.000000000 -0230
+--- ./src/dbinc/atomic.h 2015-02-20 15:33:31.000000000 -0330
+***************
+*** 144,150 ****
+ #define atomic_inc(env, p) __atomic_inc(p)
+ #define atomic_dec(env, p) __atomic_dec(p)
+ #define atomic_compare_exchange(env, p, o, n) \
+! __atomic_compare_exchange((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ int temp;
+--- 144,150 ----
+ #define atomic_inc(env, p) __atomic_inc(p)
+ #define atomic_dec(env, p) __atomic_dec(p)
+ #define atomic_compare_exchange(env, p, o, n) \
+! __atomic_compare_exchange_db((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ int temp;
+***************
+*** 176,182 ****
+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+ * which configure could be changed to use.
+ */
+! static inline int __atomic_compare_exchange(
+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ atomic_value_t was;
+--- 176,182 ----
+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+ * which configure could be changed to use.
+ */
+! static inline int __atomic_compare_exchange_db(
+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ atomic_value_t was;