From 77570b74f0f4e2825d31aa726e68816b273d1d24 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 21:39:37 +0100 Subject: [PATCH] java-bdb48: don't obsolete libdb-java, provided by libdb51-java [release 4.8.30-4mamba;Thu Sep 15 2011] --- README.md | 7 + bdb-transactions.diff | 39 + btree.diff | 20 + db-1.85-errno.patch | 89 + db-4.6.21-1.85-compat.patch | 14 + db-4.8.30-jni-include-dir.patch | 11 + db4-jni-casting.diff | 3533 +++++++++++++++++++++++++++++++ db48.spec | 400 ++++ java.diff | 248 +++ patch.1.1 | 20 + patch.1.2 | 19 + patch.1.3 | 37 + patch.1.4 | 22 + patch.4.2.52.1 | 36 + patch.4.2.52.2 | 45 + 15 files changed, 4540 insertions(+) create mode 100644 bdb-transactions.diff create mode 100644 btree.diff create mode 100644 db-1.85-errno.patch create mode 100644 db-4.6.21-1.85-compat.patch create mode 100644 db-4.8.30-jni-include-dir.patch create mode 100644 db4-jni-casting.diff create mode 100644 db48.spec create mode 100644 java.diff create mode 100644 patch.1.1 create mode 100644 patch.1.2 create mode 100644 patch.1.3 create mode 100644 patch.1.4 create mode 100644 patch.4.2.52.1 create mode 100644 patch.4.2.52.2 diff --git a/README.md b/README.md index adfbafc..e7ef2a9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,9 @@ # db48 +The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. +The Berkeley DB includes B+tree, Extended Linear Hashing, Fixed and Variable-length record access methods, transactions, locking, logging, shared memory caching, and database recovery. +The Berkeley DB supports C, C++, Java, and Perl APIs. +It is used by many applications, including Python and Perl, so this should be installed on all systems. + +This package contains the tools for managing Berkeley DB. + diff --git a/bdb-transactions.diff b/bdb-transactions.diff new file mode 100644 index 0000000..2194604 --- /dev/null +++ b/bdb-transactions.diff @@ -0,0 +1,39 @@ +--- db4-4.2.52/dbinc/db.in.orig 2004-09-09 18:29:17.987387000 -0700 ++++ db4-4.2.52/dbinc/db.in 2004-09-09 18:30:00.547903000 -0700 +@@ -839,6 +839,7 @@ + #define TXN_NOWAIT 0x040 /* Do not wait on locks. */ + #define TXN_RESTORED 0x080 /* Transaction has been restored. */ + #define TXN_SYNC 0x100 /* Sync on prepare and commit. */ ++#define TXN_NOLOG 0x200 /* Do not log this transaction. */ + u_int32_t flags; + }; + +--- db4-4.2.52/txn/txn.c.orig 2004-09-09 18:30:36.348345000 -0700 ++++ db4-4.2.52/txn/txn.c 2004-09-09 18:32:14.559561000 -0700 +@@ -127,7 +127,7 @@ + if ((ret = __db_fchk(dbenv, + "txn_begin", flags, + DB_DIRTY_READ | DB_TXN_NOWAIT | +- DB_TXN_NOSYNC | DB_TXN_SYNC)) != 0) ++ DB_TXN_NOSYNC | DB_TXN_SYNC | DB_TXN_NOT_DURABLE )) != 0) + return (ret); + if ((ret = __db_fcchk(dbenv, + "txn_begin", flags, DB_TXN_NOSYNC, DB_TXN_SYNC)) != 0) +@@ -193,6 +193,8 @@ + F_SET(txn, TXN_SYNC); + if (LF_ISSET(DB_TXN_NOWAIT)) + F_SET(txn, TXN_NOWAIT); ++ if (LF_ISSET(DB_TXN_NOT_DURABLE)) ++ F_SET(txn, TXN_NOLOG); + + if ((ret = __txn_begin_int(txn, 0)) != 0) + goto err; +@@ -328,7 +330,7 @@ + * We should set this value when we write the first log record, not + * here. + */ +- if (DBENV_LOGGING(dbenv)) ++ if (DBENV_LOGGING(dbenv) && !F_ISSET(txn, TXN_NOLOG)) + __log_txn_lsn(dbenv, &begin_lsn, NULL, NULL); + else + ZERO_LSN(begin_lsn); diff --git a/btree.diff b/btree.diff new file mode 100644 index 0000000..3a71895 --- /dev/null +++ b/btree.diff @@ -0,0 +1,20 @@ +--- db4-4.2.52/btree/bt_rec.c.orig 2003-09-13 11:48:58.000000000 -0700 ++++ db4-4.2.52/btree/bt_rec.c 2005-05-04 13:25:29.349243000 -0700 +@@ -222,7 +222,7 @@ + * previous-page pointer updated to our new page. The next + * page must exist because we're redoing the operation. + */ +- if (!rootsplit && !IS_ZERO_LSN(argp->nlsn)) { ++ if (!rootsplit && argp->npgno != PGNO_INVALID ) { + if ((ret = + __memp_fget(mpf, &argp->npgno, 0, &np)) != 0) { + ret = __db_pgerr(file_dbp, argp->npgno, ret); +@@ -294,7 +294,7 @@ + * possible that the next-page never existed, we ignore it as + * if there's nothing to undo. + */ +- if (!rootsplit && !IS_ZERO_LSN(argp->nlsn)) { ++ if (!rootsplit && argp->npgno != PGNO_INVALID) { + if ((ret = + __memp_fget(mpf, &argp->npgno, 0, &np)) != 0) { + np = NULL; diff --git a/db-1.85-errno.patch b/db-1.85-errno.patch new file mode 100644 index 0000000..ccc9ddf --- /dev/null +++ b/db-1.85-errno.patch @@ -0,0 +1,89 @@ +glibc doesn't like errno as the name of a field. +--- db.1.85/hash/hash.h Mon Feb 18 19:12:14 2002 ++++ db.1.85/hash/hash.h Mon Feb 18 19:12:20 2002 +@@ -103,7 +103,7 @@ + BUFHEAD *cpage; /* Current page */ + int cbucket; /* Current bucket */ + int cndx; /* Index of next item on cpage */ +- int errno; /* Error Number -- for DBM ++ int err; /* Error Number -- for DBM + * compatability */ + int new_file; /* Indicates if fd is backing store + * or no */ +--- db.1.85/hash/hash.c Mon Feb 18 19:12:24 2002 ++++ db.1.85/hash/hash.c Mon Feb 18 19:12:44 2002 +@@ -505,7 +505,7 @@ + else + if (wsize != sizeof(HASHHDR)) { + errno = EFTYPE; +- hashp->errno = errno; ++ hashp->err = errno; + return (-1); + } + for (i = 0; i < NCACHED; i++) +@@ -536,7 +536,7 @@ + + hashp = (HTAB *)dbp->internal; + if (flag) { +- hashp->errno = errno = EINVAL; ++ hashp->err = errno = EINVAL; + return (ERROR); + } + return (hash_access(hashp, HASH_GET, (DBT *)key, data)); +@@ -553,11 +553,11 @@ + + hashp = (HTAB *)dbp->internal; + if (flag && flag != R_NOOVERWRITE) { +- hashp->errno = errno = EINVAL; ++ hashp->err = errno = EINVAL; + return (ERROR); + } + if ((hashp->flags & O_ACCMODE) == O_RDONLY) { +- hashp->errno = errno = EPERM; ++ hashp->err = errno = EPERM; + return (ERROR); + } + return (hash_access(hashp, flag == R_NOOVERWRITE ? +@@ -574,11 +574,11 @@ + + hashp = (HTAB *)dbp->internal; + if (flag && flag != R_CURSOR) { +- hashp->errno = errno = EINVAL; ++ hashp->err = errno = EINVAL; + return (ERROR); + } + if ((hashp->flags & O_ACCMODE) == O_RDONLY) { +- hashp->errno = errno = EPERM; ++ hashp->err = errno = EPERM; + return (ERROR); + } + return (hash_access(hashp, HASH_DELETE, (DBT *)key, NULL)); +@@ -729,7 +729,7 @@ + + hashp = (HTAB *)dbp->internal; + if (flag && flag != R_FIRST && flag != R_NEXT) { +- hashp->errno = errno = EINVAL; ++ hashp->err = errno = EINVAL; + return (ERROR); + } + #ifdef HASH_STATISTICS +--- db.1.85/hash/ndbm.c Mon Feb 18 19:12:58 2002 ++++ db.1.85/hash/ndbm.c Mon Feb 18 19:13:05 2002 +@@ -180,7 +180,7 @@ + HTAB *hp; + + hp = (HTAB *)db->internal; +- return (hp->errno); ++ return (hp->err); + } + + extern int +@@ -190,7 +190,7 @@ + HTAB *hp; + + hp = (HTAB *)db->internal; +- hp->errno = 0; ++ hp->err = 0; + return (0); + } + diff --git a/db-4.6.21-1.85-compat.patch b/db-4.6.21-1.85-compat.patch new file mode 100644 index 0000000..c65b6ac --- /dev/null +++ b/db-4.6.21-1.85-compat.patch @@ -0,0 +1,14 @@ +diff -ur db-4.6.21/dist/Makefile.in db-4.6.21-db.h_include-patched/dist/Makefile.in +--- db-4.6.21/dist/Makefile.in 2007-07-05 18:35:02.000000000 +0000 ++++ db-4.6.21-db.h_include-patched/dist/Makefile.in 2008-09-05 08:59:36.000000000 +0000 +@@ -139,8 +139,8 @@ + # local libraries, for example. Do that by adding -I options to the DB185INC + # line, and -l options to the DB185LIB line. + ################################################## +-DB185INC= -c @CFLAGS@ -I$(srcdir) @CPPFLAGS@ +-DB185LIB= ++DB185INC= -c @CFLAGS@ -I$(srcdir) -I$(srcdir)/db.1.85/PORT/linux/include @CPPFLAGS@ ++DB185LIB= ${srcdir}/db.1.85/PORT/linux/libdb.a + + ################################################## + # NOTHING BELOW THIS LINE SHOULD EVER NEED TO BE MODIFIED. diff --git a/db-4.8.30-jni-include-dir.patch b/db-4.8.30-jni-include-dir.patch new file mode 100644 index 0000000..4a64dbe --- /dev/null +++ b/db-4.8.30-jni-include-dir.patch @@ -0,0 +1,11 @@ +--- dist/configure.ac 2010-04-12 22:25:23.000000000 +0200 ++++ dist/configure.ac-gil 2011-02-26 19:15:53.000000000 +0100 +@@ -404,7 +404,7 @@ + AC_PROG_JAVAC + AC_PROG_JAR + AC_PROG_JAVA +- AC_JNI_INCLUDE_DIR ++ JNI_INCLUDE_DIRS="/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/include/" + + AC_MSG_CHECKING(java version) + case "$JAVA" in diff --git a/db4-jni-casting.diff b/db4-jni-casting.diff new file mode 100644 index 0000000..bf3d668 --- /dev/null +++ b/db4-jni-casting.diff @@ -0,0 +1,3533 @@ +*** misc/db-4.2.52.NC/libdb_java/db_java_wrap.c 2003-12-03 16:10:36.000000000 -0500 +--- misc/build/db-4.2.52.NC/libdb_java/db_java_wrap.c 2005-05-23 14:54:42.000000000 -0400 +*************** +*** 371,377 **** + memset(lsn_copy, 0, sizeof(DB_LSN)); + *lsn_copy = *lsn; + /* Magic to convert a pointer to a long - must match SWIG */ +! *(DB_LSN **)&jptr = lsn_copy; + return (*jenv)->NewObject(jenv, dblsn_class, dblsn_construct, + jptr, JNI_TRUE); + } +--- 371,378 ---- + memset(lsn_copy, 0, sizeof(DB_LSN)); + *lsn_copy = *lsn; + /* Magic to convert a pointer to a long - must match SWIG */ +! jptr = (intptr_t) lsn_copy; +! /* *(DB_LSN **)&jptr = lsn_copy; */ + return (*jenv)->NewObject(jenv, dblsn_class, dblsn_construct, + jptr, JNI_TRUE); + } +*************** +*** 632,638 **** + int completed; + + COMPQUIET(jcls, NULL); +! dbenv = *(DB_ENV **)&jdbenvp; + jdbenv = (jobject)DB_ENV_INTERNAL(dbenv); + + if (dbenv == NULL) { +--- 633,640 ---- + int completed; + + COMPQUIET(jcls, NULL); +! dbenv = (DB_ENV *)((intptr_t)jdbenvp); +! /* dbenv = *(DB_ENV **)&jdbenvp; */ + jdbenv = (jobject)DB_ENV_INTERNAL(dbenv); + + if (dbenv == NULL) { +*************** +*** 701,707 **** + "DbLockRequest lock field is NULL", NULL, jdbenv); + goto out2; + } +! lockp = *(DB_LOCK **)&jlockp; + prereq->lock = *lockp; + break; + case DB_LOCK_PUT_ALL: +--- 703,710 ---- + "DbLockRequest lock field is NULL", NULL, jdbenv); + goto out2; + } +! lockp = (DB_LOCK *)((intptr_t)jlockp); +! /* lockp = *(DB_LOCK **)&jlockp; */ + prereq->lock = *lockp; + break; + case DB_LOCK_PUT_ALL: +*************** +*** 745,751 **** + lockreq_lock_fid); + jlockp = (*jenv)->GetLongField(jenv, jlock, + lock_cptr_fid); +! lockp = *(DB_LOCK **)&jlockp; + __os_free(NULL, lockp); + (*jenv)->SetLongField(jenv, jlock, lock_cptr_fid, + (jlong)0); +--- 748,755 ---- + lockreq_lock_fid); + jlockp = (*jenv)->GetLongField(jenv, jlock, + lock_cptr_fid); +! lockp = (DB_LOCK *)((intptr_t)jlockp); +! /* lockp = *(DB_LOCK **)&jlockp; */ + __os_free(NULL, lockp); + (*jenv)->SetLongField(jenv, jlock, lock_cptr_fid, + (jlong)0); +*************** +*** 763,769 **** + } + + *lockp = lockreq[i].lock; +! *(DB_LOCK **)&jlockp = lockp; + + jlockreq = (*jenv)->GetObjectArrayElement(jenv, + list, i + offset); +--- 767,774 ---- + } + + *lockp = lockreq[i].lock; +! jlockp = (intptr_t)lockp; +! /* *(DB_LOCK **)&jlockp = lockp; */ + + jlockreq = (*jenv)->GetObjectArrayElement(jenv, + list, i + offset); +*************** +*** 1194,1200 **** + + JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbEnvRef0( + JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) { +! DB_ENV *self = *(DB_ENV **)&jarg1; + COMPQUIET(jcls, NULL); + + DB_ENV_INTERNAL(self) = (void *)(*jenv)->NewGlobalRef(jenv, jarg2); +--- 1199,1206 ---- + + JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbEnvRef0( + JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) { +! DB_ENV *self = (DB_ENV *)((intptr_t)jarg1); +! /* DB_ENV *self = *(DB_ENV **)&jarg1; */ + COMPQUIET(jcls, NULL); + + DB_ENV_INTERNAL(self) = (void *)(*jenv)->NewGlobalRef(jenv, jarg2); +*************** +*** 1204,1210 **** + + JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbRef0( + JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) { +! DB *self = *(DB **)&jarg1; + COMPQUIET(jcls, NULL); + + DB_INTERNAL(self) = (void *)(*jenv)->NewGlobalRef(jenv, jarg2); +--- 1210,1217 ---- + + JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbRef0( + JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) { +! DB *self = (DB *)((intptr_t)jarg1); +! /* DB *self = *(DB **)&jarg1; */ + COMPQUIET(jcls, NULL); + + DB_INTERNAL(self) = (void *)(*jenv)->NewGlobalRef(jenv, jarg2); +*************** +*** 1221,1227 **** + + JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_getDbRef0( + JNIEnv *jenv, jclass jcls, jlong jarg1) { +! DB *self = *(DB **)&jarg1; + COMPQUIET(jcls, NULL); + COMPQUIET(jenv, NULL); + +--- 1228,1235 ---- + + JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_getDbRef0( + JNIEnv *jenv, jclass jcls, jlong jarg1) { +! DB *self = (DB *)((intptr_t)jarg1); +! /* DB *self = *(DB **)&jarg1; */ + COMPQUIET(jcls, NULL); + COMPQUIET(jenv, NULL); + +*************** +*** 1230,1242 **** + + JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_getDbEnv0( + JNIEnv *jenv, jclass jcls, jlong jarg1) { +! DB *self = *(DB **)&jarg1; + jlong env_cptr; + + COMPQUIET(jenv, NULL); + COMPQUIET(jcls, NULL); + +! *(DB_ENV **)&env_cptr = self->dbenv; + return env_cptr; + } + +--- 1238,1252 ---- + + JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_getDbEnv0( + JNIEnv *jenv, jclass jcls, jlong jarg1) { +! DB *self = (DB *)((intptr_t)jarg1); +! /* DB *self = *(DB **)&jarg1; */ + jlong env_cptr; + + COMPQUIET(jenv, NULL); + COMPQUIET(jcls, NULL); + +! env_cptr = (jlong)((intptr_t)(self->dbenv)); +! /* *(DB_ENV **)&env_cptr = self->dbenv; */ + return env_cptr; + } + +*************** +*** 1997,2003 **** + + (void)jenv; + (void)jcls; +! arg1 = *(DB_ENV **)&jarg1; + arg2 = (u_int32_t)jarg2; + + errno = 0; +--- 2007,2014 ---- + + (void)jenv; + (void)jcls; +! arg1 = (DB_ENV *)((intptr_t)jarg1); +! /* arg1 = *(DB_ENV **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + errno = 0; +*************** +*** 2006,2012 **** + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, JDBENV); + +! *(struct __db **)&jresult = result; + return jresult; + } + +--- 2017,2024 ---- + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, JDBENV); + +! jresult = (jlong)((intptr_t)result); +! /* *(struct __db **)&jresult = result; */ + return jresult; + } + +*************** +*** 2021,2029 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; +! arg2 = *(DB_TXN **)&jarg2; +! arg3 = *(DB **)&jarg3; + + arg4 = (jarg4 == NULL) ? NULL : __dbj_seckey_create; + +--- 2033,2044 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ +! arg2 = (DB_TXN *)((intptr_t)jarg2); +! /* arg2 = *(DB_TXN **)&jarg2; */ +! arg3 = (DB *)((intptr_t)jarg3); +! /* arg3 = *(DB **)&jarg3; */ + + arg4 = (jarg4 == NULL) ? NULL : __dbj_seckey_create; + +*************** +*** 2051,2057 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 2066,2073 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 2080,2087 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; +! arg2 = *(DB_TXN **)&jarg2; + arg3 = (u_int32_t)jarg3; + + if (jarg1 == 0) { +--- 2096,2105 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ +! arg2 = (DB_TXN *)((intptr_t)jarg2); +! /* arg2 = *(DB_TXN **)&jarg2; */ + arg3 = (u_int32_t)jarg3; + + if (jarg1 == 0) { +*************** +*** 2096,2102 **** + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, DB2JDBENV); + +! *(DBC **)&jresult = result; + return jresult; + } + +--- 2114,2121 ---- + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, DB2JDBENV); + +! jresult = (jlong)((intptr_t)result); +! /* *(DBC **)&jresult = result; */ + return jresult; + } + +*************** +*** 2112,2119 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; +! arg2 = *(DB_TXN **)&jarg2; + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return 0; +--- 2131,2140 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ +! arg2 = (DB_TXN *)((intptr_t)jarg2); +! /* arg2 = *(DB_TXN **)&jarg2; */ + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return 0; +*************** +*** 2147,2153 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (int)jarg2; + { + arg3 = 0; +--- 2168,2175 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (int)jarg2; + { + arg3 = 0; +*************** +*** 2176,2182 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 2198,2205 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 2211,2218 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; +! arg2 = *(DB_TXN **)&jarg2; + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return 0; +--- 2234,2243 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ +! arg2 = (DB_TXN *)((intptr_t)jarg2); +! /* arg2 = *(DB_TXN **)&jarg2; */ + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return 0; +*************** +*** 2254,2260 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2279,2286 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2282,2288 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2308,2315 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2308,2314 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2335,2342 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2334,2340 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2362,2369 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2362,2368 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2391,2398 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2390,2396 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2420,2427 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2416,2422 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2447,2454 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2442,2448 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2474,2481 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2468,2474 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2501,2508 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2482,2488 **** + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, DB2JDBENV); + +! *(DB_MPOOLFILE **)&jresult = result; + return jresult; + } + +--- 2516,2523 ---- + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, DB2JDBENV); + +! jresult = (jlong)((intptr_t)result); +! /* *(DB_MPOOLFILE **)&jresult = result; */ + return jresult; + } + +*************** +*** 2494,2500 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2529,2536 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2520,2526 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2556,2563 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2546,2552 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2583,2590 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2572,2578 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2610,2617 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2598,2604 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2637,2644 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2624,2630 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2664,2671 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2650,2656 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2691,2698 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2676,2682 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2718,2725 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2702,2708 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2745,2752 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2730,2736 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2774,2781 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2756,2762 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2801,2808 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2782,2788 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2828,2835 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2810,2816 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 2857,2864 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 2838,2844 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + { + int i, count, err; + +--- 2886,2893 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + { + int i, count, err; + +*************** +*** 2858,2864 **** + }else { + jlong jptr = (*jenv)->GetLongField(jenv, jobj, + dbc_cptr_fid); +! arg2[i] = *(DBC **)&jptr; + } + } + arg2[count] = NULL; +--- 2907,2914 ---- + }else { + jlong jptr = (*jenv)->GetLongField(jenv, jobj, + dbc_cptr_fid); +! arg2[i] = (DBC *)((intptr_t)jptr); +! /* arg2[i] = *(DBC **)&jptr; */ + } + } + arg2[count] = NULL; +*************** +*** 2877,2883 **** + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, DB2JDBENV); + +! *(DBC **)&jresult = result; + + __os_free(NULL, arg2); + +--- 2927,2934 ---- + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, DB2JDBENV); + +! jresult = (jlong)((intptr_t)result); +! /* *(DBC **)&jresult = result; */ + + __os_free(NULL, arg2); + +*************** +*** 2897,2904 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; +! arg2 = *(DB_TXN **)&jarg2; + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return ; +--- 2948,2957 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ +! arg2 = (DB_TXN *)((intptr_t)jarg2); +! /* arg2 = *(DB_TXN **)&jarg2; */ + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return ; +*************** +*** 2943,2950 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; +! arg2 = *(DB_TXN **)&jarg2; + { + arg3 = 0; + if (jarg3) { +--- 2996,3005 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ +! arg2 = (DB_TXN *)((intptr_t)jarg2); +! /* arg2 = *(DB_TXN **)&jarg2; */ + { + arg3 = 0; + if (jarg3) { +*************** +*** 2998,3005 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; +! arg2 = *(DB_TXN **)&jarg2; + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return 0; +--- 3053,3062 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ +! arg2 = (DB_TXN *)((intptr_t)jarg2); +! /* arg2 = *(DB_TXN **)&jarg2; */ + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return 0; +*************** +*** 3055,3062 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; +! arg2 = *(DB_TXN **)&jarg2; + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return 0; +--- 3112,3121 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ +! arg2 = (DB_TXN *)((intptr_t)jarg2); +! /* arg2 = *(DB_TXN **)&jarg2; */ + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return 0; +*************** +*** 3100,3106 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 3159,3166 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 3147,3153 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 3207,3214 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 3201,3207 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + arg2 = (jarg2 == NULL) ? NULL : __dbj_append_recno; + +--- 3262,3269 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + arg2 = (jarg2 == NULL) ? NULL : __dbj_append_recno; + +*************** +*** 3227,3233 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + arg2 = (jarg2 == NULL) ? NULL : __dbj_bt_compare; + +--- 3289,3296 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + arg2 = (jarg2 == NULL) ? NULL : __dbj_bt_compare; + +*************** +*** 3253,3259 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 3316,3323 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 3277,3283 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 3341,3348 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 3301,3307 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + arg2 = (jarg2 == NULL) ? NULL : __dbj_bt_prefix; + +--- 3366,3373 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + arg2 = (jarg2 == NULL) ? NULL : __dbj_bt_prefix; + +*************** +*** 3328,3334 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = jarg2; + arg3 = (int)jarg3; + +--- 3394,3401 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = jarg2; + arg3 = (int)jarg3; + +*************** +*** 3353,3359 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + arg2 = (jarg2 == NULL) ? NULL : __dbj_dup_compare; + +--- 3420,3427 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + arg2 = (jarg2 == NULL) ? NULL : __dbj_dup_compare; + +*************** +*** 3380,3386 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 3448,3455 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 3414,3420 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + arg2 = (jarg2 == NULL) ? NULL : __dbj_db_feedback; + +--- 3483,3490 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + arg2 = (jarg2 == NULL) ? NULL : __dbj_db_feedback; + +*************** +*** 3440,3446 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 3510,3517 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 3464,3470 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 3535,3542 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 3488,3494 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + + arg2 = (jarg2 == NULL) ? NULL : __dbj_h_hash; + +--- 3560,3567 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + + arg2 = (jarg2 == NULL) ? NULL : __dbj_h_hash; + +*************** +*** 3514,3520 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 3587,3594 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 3538,3544 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (int)jarg2; + + if (jarg1 == 0) { +--- 3612,3619 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (int)jarg2; + + if (jarg1 == 0) { +*************** +*** 3562,3568 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 3637,3644 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 3586,3592 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (int)jarg2; + + if (jarg1 == 0) { +--- 3662,3669 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (int)jarg2; + + if (jarg1 == 0) { +*************** +*** 3610,3616 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 3687,3694 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 3634,3640 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (int)jarg2; + + if (jarg1 == 0) { +--- 3712,3719 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (int)jarg2; + + if (jarg1 == 0) { +*************** +*** 3658,3664 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 3737,3744 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 3691,3697 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 3771,3778 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 3716,3722 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 3797,3804 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 3793,3799 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 3875,3882 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 3819,3826 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; +! arg2 = *(DB_TXN **)&jarg2; + arg3 = (u_int32_t)jarg3; + + if (jarg1 == 0) { +--- 3902,3911 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ +! arg2 = (DB_TXN *)((intptr_t)jarg2); +! /* arg2 = *(DB_TXN **)&jarg2; */ + arg3 = (u_int32_t)jarg3; + + if (jarg1 == 0) { +*************** +*** 3848,3854 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 3933,3940 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 3886,3892 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 3972,3979 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db *)((intptr_t)jarg1); +! /* arg1 = *(struct __db **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 3937,3943 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __dbc **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 4024,4031 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __dbc *)((intptr_t)jarg1); +! /* arg1 = *(struct __dbc **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 3961,3967 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __dbc **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 4049,4056 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __dbc *)((intptr_t)jarg1); +! /* arg1 = *(struct __dbc **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 3989,3995 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __dbc **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 4078,4085 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __dbc *)((intptr_t)jarg1); +! /* arg1 = *(struct __dbc **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 4016,4022 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __dbc **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 4106,4113 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __dbc *)((intptr_t)jarg1); +! /* arg1 = *(struct __dbc **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 4031,4037 **** + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, DBC2JDBENV); + +! *(DBC **)&jresult = result; + return jresult; + } + +--- 4122,4129 ---- + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, DBC2JDBENV); + +! jresult = (jlong)((intptr_t)result); +! /* *(DBC **)&jresult = result; */ + return jresult; + } + +*************** +*** 4048,4054 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __dbc **)&jarg1; + + if (__dbj_dbt_copyin(jenv, &ldbt2, jarg2) != 0) + return 0; +--- 4140,4147 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __dbc *)((intptr_t)jarg1); +! /* arg1 = *(struct __dbc **)&jarg1; */ + + if (__dbj_dbt_copyin(jenv, &ldbt2, jarg2) != 0) + return 0; +*************** +*** 4097,4103 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __dbc **)&jarg1; + + if (__dbj_dbt_copyin(jenv, &ldbt2, jarg2) != 0) + return 0; +--- 4190,4198 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __dbc *)((intptr_t)jarg1); +! /* arg1 = *(struct __dbc **)&jarg1; */ +! + + if (__dbj_dbt_copyin(jenv, &ldbt2, jarg2) != 0) + return 0; +*************** +*** 4152,4158 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __dbc **)&jarg1; + + if (__dbj_dbt_copyin(jenv, &ldbt2, jarg2) != 0) + return 0; +--- 4247,4255 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __dbc *)((intptr_t)jarg1); +! /* arg1 = *(struct __dbc **)&jarg1; */ +! + + if (__dbj_dbt_copyin(jenv, &ldbt2, jarg2) != 0) + return 0; +*************** +*** 4202,4208 **** + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, NULL); + +! *(struct __db_env **)&jresult = result; + return jresult; + } + +--- 4299,4306 ---- + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, NULL); + +! jresult = (jlong)((intptr_t)result); +! /* *(struct __db_env **)&jresult = result; */ + return jresult; + } + +*************** +*** 4214,4220 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 4312,4319 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 4241,4248 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; +! arg2 = *(DB_TXN **)&jarg2; + { + arg3 = 0; + if (jarg3) { +--- 4340,4349 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ +! arg2 = (DB_TXN *)((intptr_t)jarg2); +! /* arg2 = *(DB_TXN **)&jarg2; */ + { + arg3 = 0; + if (jarg3) { +*************** +*** 4290,4297 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; +! arg2 = *(DB_TXN **)&jarg2; + { + arg3 = 0; + if (jarg3) { +--- 4391,4400 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ +! arg2 = (DB_TXN *)((intptr_t)jarg2); +! /* arg2 = *(DB_TXN **)&jarg2; */ + { + arg3 = 0; + if (jarg3) { +*************** +*** 4345,4351 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (int)jarg2; + { + arg3 = 0; +--- 4448,4455 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (int)jarg2; + { + arg3 = 0; +*************** +*** 4374,4380 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 4478,4485 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 4403,4409 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 4508,4515 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 4445,4451 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 4551,4558 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 4471,4477 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 4578,4585 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 4497,4503 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 4605,4612 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 4525,4531 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 4634,4641 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 4551,4557 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 4661,4668 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 4577,4583 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 4688,4695 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 4603,4609 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 4715,4722 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 4632,4638 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 4745,4752 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 4663,4669 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 4777,4784 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 4699,4705 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 4814,4821 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 4734,4740 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = jarg2; + arg3 = (int)jarg3; + +--- 4850,4857 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = jarg2; + arg3 = (int)jarg3; + +*************** +*** 4759,4765 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 4876,4883 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 4793,4799 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 4911,4918 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 4826,4832 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + arg2 = (jarg2 == NULL) ? NULL : __dbj_error; + +--- 4945,4952 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + arg2 = (jarg2 == NULL) ? NULL : __dbj_error; + +*************** +*** 4849,4855 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + arg3 = (jarg3 == JNI_TRUE); +--- 4969,4976 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + arg3 = (jarg3 == JNI_TRUE); +*************** +*** 4876,4882 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + arg2 = (jarg2 == NULL) ? NULL : __dbj_env_feedback; + +--- 4997,5004 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + arg2 = (jarg2 == NULL) ? NULL : __dbj_env_feedback; + +*************** +*** 4902,4908 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (size_t)jarg2; + + if (jarg1 == 0) { +--- 5024,5031 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (size_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 4926,4932 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + arg2 = (jarg2 == NULL) ? NULL : __dbj_panic; + +--- 5049,5056 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + arg2 = (jarg2 == NULL) ? NULL : __dbj_panic; + +*************** +*** 4956,4963 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; +! arg2 = *(void **)&jarg2; + { + arg3 = 0; + if (jarg3) { +--- 5080,5089 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ +! arg2 = (void *)((intptr_t)jarg2); +! /* arg2 = *(void **)&jarg2; */ + { + arg3 = 0; + if (jarg3) { +*************** +*** 5000,5006 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (long)jarg2; + + if (jarg1 == 0) { +--- 5126,5133 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (long)jarg2; + + if (jarg1 == 0) { +*************** +*** 5024,5030 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 5151,5158 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 5049,5055 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (db_timeout_t)jarg2; + arg3 = (u_int32_t)jarg3; + +--- 5177,5184 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (db_timeout_t)jarg2; + arg3 = (u_int32_t)jarg3; + +*************** +*** 5074,5080 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 5203,5210 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 5107,5113 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 5237,5244 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 5131,5137 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + arg2 = (jarg2 == NULL) ? NULL : __dbj_app_dispatch; + +--- 5262,5269 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + arg2 = (jarg2 == NULL) ? NULL : __dbj_app_dispatch; + +*************** +*** 5158,5164 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + time2 = (time_t)jarg2; + arg2 = &time2; +--- 5290,5297 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + time2 = (time_t)jarg2; + arg2 = &time2; +*************** +*** 5186,5192 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + arg3 = (jarg3 == JNI_TRUE); +--- 5319,5326 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + arg3 = (jarg3 == JNI_TRUE); +*************** +*** 5213,5219 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 5347,5354 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5255,5261 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 5390,5397 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5281,5287 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 5417,5424 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5307,5313 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 5444,5451 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5333,5339 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 5471,5478 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5361,5367 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + arg3 = (u_int32_t)jarg3; + +--- 5500,5507 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + arg3 = (u_int32_t)jarg3; + +*************** +*** 5394,5400 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + arg3 = (u_int32_t)jarg3; + +--- 5534,5541 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + arg3 = (u_int32_t)jarg3; + +*************** +*** 5421,5427 **** + }else if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, JDBENV); + +! *(DB_LOCK **)&jresult = result; + + if (ldbt4.jarr != NULL) { + (*jenv)->ReleaseByteArrayElements(jenv, ldbt4.jarr, +--- 5562,5569 ---- + }else if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, JDBENV); + +! jresult = (jlong)((intptr_t)result); +! /* *(DB_LOCK **)&jresult = result; */ + + if (ldbt4.jarr != NULL) { + (*jenv)->ReleaseByteArrayElements(jenv, ldbt4.jarr, +*************** +*** 5439,5445 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 5581,5588 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5465,5471 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 5608,5615 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 5489,5496 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; +! arg2 = *(DB_LOCK **)&jarg2; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 5633,5642 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ +! arg2 = (DB_LOCK *)((intptr_t)jarg2); +! /* arg2 = *(DB_LOCK **)&jarg2; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5514,5520 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 5660,5667 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 5546,5552 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + { + int i, len, err; + size_t bytesize; +--- 5693,5700 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + { + int i, len, err; + size_t bytesize; +*************** +*** 5591,5597 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 5739,5746 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 5615,5621 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 5764,5771 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 5639,5645 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 5789,5796 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 5663,5669 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 5814,5821 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 5687,5693 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 5839,5846 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5713,5719 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 5866,5873 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5741,5747 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 5895,5902 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5767,5773 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 5922,5929 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5794,5800 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 5950,5957 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 5839,5846 **** + + (void)jenv; + (void)jcls; +! arg1 = *(DB_LSN **)&jarg1; +! arg2 = *(DB_LSN **)&jarg2; + result = (int)DbEnv_log_compare((DB_LSN const *)arg1,(DB_LSN const *)arg2); + + jresult = (jint)result; +--- 5996,6005 ---- + + (void)jenv; + (void)jcls; +! arg1 = (DB_LSN *)((intptr_t)jarg1); +! /* arg1 = *(DB_LSN **)&jarg1; */ +! arg2 = (DB_LSN *)((intptr_t)jarg2); +! /* arg2 = *(DB_LSN **)&jarg2; */ + result = (int)DbEnv_log_compare((DB_LSN const *)arg1,(DB_LSN const *)arg2); + + jresult = (jint)result; +*************** +*** 5856,5862 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 6015,6022 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 5871,5877 **** + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, JDBENV); + +! *(DB_LOGC **)&jresult = result; + return jresult; + } + +--- 6031,6038 ---- + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, JDBENV); + +! jresult = (jlong)((intptr_t)result); +! /* *(DB_LOGC **)&jresult = result; */ + return jresult; + } + +*************** +*** 5884,5891 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; +! arg2 = *(DB_LSN **)&jarg2; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 6045,6054 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ +! arg2 = (DB_LSN *)((intptr_t)jarg2); +! /* arg2 = *(DB_LSN **)&jarg2; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5913,5920 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; +! arg2 = *(DB_LSN **)&jarg2; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 6076,6085 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ +! arg2 = (DB_LSN *)((intptr_t)jarg2); +! /* arg2 = *(DB_LSN **)&jarg2; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 5940,5947 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; +! arg2 = *(DB_LSN **)&jarg2; + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return ; +--- 6105,6114 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ +! arg2 = (DB_LSN *)((intptr_t)jarg2); +! /* arg2 = *(DB_LSN **)&jarg2; */ + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return ; +*************** +*** 5977,5983 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 6144,6151 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 6009,6015 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 6177,6184 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 6033,6039 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + { + arg2 = 0; + if (jarg2) { +--- 6202,6209 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + { + arg2 = 0; + if (jarg2) { +*************** +*** 6066,6072 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 6236,6243 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 6090,6096 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 6261,6268 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 6114,6120 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 6286,6293 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 6140,6146 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 6313,6320 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 6166,6172 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 6340,6347 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 6193,6199 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 6368,6375 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 6226,6232 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 6402,6409 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 6276,6282 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (int)jarg2; + + if (jarg1 == 0) { +--- 6453,6460 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (int)jarg2; + + if (jarg1 == 0) { +*************** +*** 6303,6309 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 6481,6488 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 6329,6335 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 6508,6515 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 6356,6362 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 6536,6543 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 6385,6392 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; +! arg2 = *(DB_TXN **)&jarg2; + arg3 = (u_int32_t)jarg3; + + if (jarg1 == 0) { +--- 6566,6575 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ +! arg2 = (DB_TXN *)((intptr_t)jarg2); +! /* arg2 = *(DB_TXN **)&jarg2; */ + arg3 = (u_int32_t)jarg3; + + if (jarg1 == 0) { +*************** +*** 6401,6407 **** + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, JDBENV); + +! *(DB_TXN **)&jresult = result; + return jresult; + } + +--- 6584,6591 ---- + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, JDBENV); + +! jresult = (jlong)((intptr_t)result); +! /* *(DB_TXN **)&jresult = result; */ + return jresult; + } + +*************** +*** 6415,6421 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + arg3 = (u_int32_t)jarg3; + arg4 = (u_int32_t)jarg4; +--- 6599,6606 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + arg3 = (u_int32_t)jarg3; + arg4 = (u_int32_t)jarg4; +*************** +*** 6443,6449 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (int)jarg2; + arg3 = (u_int32_t)jarg3; + +--- 6628,6635 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (int)jarg2; + arg3 = (u_int32_t)jarg3; + +*************** +*** 6498,6504 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 6684,6691 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 6551,6557 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 6738,6745 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 6580,6586 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (u_int32_t)jarg4; +--- 6768,6775 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (int)jarg2; + arg3 = (int)jarg3; + arg4 = (u_int32_t)jarg4; +*************** +*** 6616,6622 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (__dbj_dbt_copyin(jenv, &ldbt2, jarg2) != 0) + return 0; +--- 6805,6812 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (__dbj_dbt_copyin(jenv, &ldbt2, jarg2) != 0) + return 0; +*************** +*** 6631,6637 **** + id4 = (*jenv)->GetIntField(jenv, jarg4, rep_processmsg_envid); + arg4 = &id4; + +! arg5 = *(DB_LSN **)&jarg5; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 6821,6828 ---- + id4 = (*jenv)->GetIntField(jenv, jarg4, rep_processmsg_envid); + arg4 = &id4; + +! arg5 = (DB_LSN *)((intptr_t)jarg5); +! /* arg5 = *(DB_LSN **)&jarg5; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 6667,6673 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + + if (__dbj_dbt_copyin(jenv, &ldbt2, jarg2) != 0) + return ; +--- 6858,6865 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + + if (__dbj_dbt_copyin(jenv, &ldbt2, jarg2) != 0) + return ; +*************** +*** 6700,6706 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 6892,6899 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 6732,6738 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = jarg2; + + if (jarg1 == 0) { +--- 6925,6932 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = jarg2; + + if (jarg1 == 0) { +*************** +*** 6757,6763 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_env **)&jarg1; + arg2 = (int)jarg2; + + arg3 = (jarg3 == NULL) ? NULL : __dbj_rep_transport; +--- 6951,6958 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_env *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_env **)&jarg1; */ + arg2 = (int)jarg2; + + arg3 = (jarg3 == NULL) ? NULL : __dbj_rep_transport; +*************** +*** 6854,6860 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_txn **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 7049,7056 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_txn *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_txn **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 6877,6883 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_txn **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 7073,7080 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_txn *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_txn **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 6901,6907 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_txn **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 7098,7105 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_txn *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_txn **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 6925,6931 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_txn **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 7123,7130 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_txn *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_txn **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 6946,6952 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_txn **)&jarg1; + + arg2 = (u_int8_t *)(*jenv)->GetByteArrayElements(jenv, jarg2, NULL); + +--- 7145,7152 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_txn *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_txn **)&jarg1; */ + + arg2 = (u_int8_t *)(*jenv)->GetByteArrayElements(jenv, jarg2, NULL); + +*************** +*** 6983,6989 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_txn **)&jarg1; + arg2 = (db_timeout_t)jarg2; + arg3 = (u_int32_t)jarg3; + +--- 7183,7190 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_txn *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_txn **)&jarg1; */ + arg2 = (db_timeout_t)jarg2; + arg3 = (u_int32_t)jarg3; + +*************** +*** 7008,7014 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_log_cursor **)&jarg1; + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +--- 7209,7216 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_log_cursor *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_log_cursor **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + if (jarg1 == 0) { +*************** +*** 7036,7043 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_log_cursor **)&jarg1; +! arg2 = *(DB_LSN **)&jarg2; + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return 0; +--- 7238,7247 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_log_cursor *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_log_cursor **)&jarg1; */ +! arg2 = (DB_LSN *)((intptr_t)jarg2); +! /* arg2 = *(DB_LSN **)&jarg2; */ + + if (__dbj_dbt_copyin(jenv, &ldbt3, jarg3) != 0) + return 0; +*************** +*** 7069,7075 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_lock_u **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 7273,7280 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_lock_u *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_lock_u **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 7098,7104 **** + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, NULL); + +! *(struct __db_lsn **)&jresult = result; + return jresult; + } + +--- 7303,7310 ---- + if (!DB_RETOK_STD(errno)) + __dbj_throw(jenv, errno, NULL, NULL, NULL); + +! jresult = (jlong)((intptr_t)result); +! /* *(struct __db_lsn **)&jresult = result; */ + return jresult; + } + +*************** +*** 7108,7114 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_lsn **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 7314,7321 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_lsn *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_lsn **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 7127,7133 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_lsn **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 7334,7341 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_lsn *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_lsn **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 7148,7154 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_lsn **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 7356,7363 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_lsn *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_lsn **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 7169,7175 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_mpoolfile **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 7378,7385 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_mpoolfile *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_mpoolfile **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 7195,7201 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_mpoolfile **)&jarg1; + arg2 = (DB_CACHE_PRIORITY)jarg2; + + if (jarg1 == 0) { +--- 7405,7412 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_mpoolfile *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_mpoolfile **)&jarg1; */ + arg2 = (DB_CACHE_PRIORITY)jarg2; + + if (jarg1 == 0) { +*************** +*** 7219,7225 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_mpoolfile **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 7430,7437 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_mpoolfile *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_mpoolfile **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 7246,7252 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_mpoolfile **)&jarg1; + arg2 = (u_int32_t)jarg2; + + arg3 = (jarg3 == JNI_TRUE); +--- 7458,7465 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_mpoolfile *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_mpoolfile **)&jarg1; */ + arg2 = (u_int32_t)jarg2; + + arg3 = (jarg3 == JNI_TRUE); +*************** +*** 7273,7279 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_mpoolfile **)&jarg1; + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +--- 7486,7493 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_mpoolfile *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_mpoolfile **)&jarg1; */ + + if (jarg1 == 0) { + __dbj_throw(jenv, EINVAL, "call on closed handle", NULL, NULL); +*************** +*** 7299,7305 **** + + (void)jenv; + (void)jcls; +! arg1 = *(struct __db_mpoolfile **)&jarg1; + arg2 = jarg2; + + if (jarg1 == 0) { +--- 7513,7520 ---- + + (void)jenv; + (void)jcls; +! arg1 = (struct __db_mpoolfile *)((intptr_t)jarg1); +! /* arg1 = *(struct __db_mpoolfile **)&jarg1; */ + arg2 = jarg2; + + if (jarg1 == 0) { diff --git a/db48.spec b/db48.spec new file mode 100644 index 0000000..3e79156 --- /dev/null +++ b/db48.spec @@ -0,0 +1,400 @@ +%define majver %(echo %version | cut -d . -f1-2) +%define majvershort %(echo %version | cut -d . -f1-2 | tr -d .) +%define MAJver %(echo %version | cut -d . -f1) +Name: db48 +Version: 4.8.30 +Release: 4mamba +Summary: The Berkeley DB database library +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.oracle.com/technology/products/berkeley-db/index.html +Source0: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz +Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz +Patch0: patch.4.2.52.1 +Patch1: patch.4.2.52.2 +Patch2: db4-jni-casting.diff +# from http://www.stanford.edu/services/directory/openldap/configuration/patches/db/ +Patch3: bdb-transactions.diff +Patch4: btree.diff +Patch5: java.diff +# db-1.85 upstream patches +Patch6: http://www.oracle.com/technology/products/berkeley-db/db/update/1.85/patch.1.1 +Patch7: http://www.oracle.com/technology/products/berkeley-db/db/update/1.85/patch.1.2 +Patch8: http://www.oracle.com/technology/products/berkeley-db/db/update/1.85/patch.1.3 +Patch9: http://www.oracle.com/technology/products/berkeley-db/db/update/1.85/patch.1.4 +Patch10: db-1.85-errno.patch +Patch11: db-4.6.21-1.85-compat.patch +Patch12: db-4.8.30-jni-include-dir.patch +License: BSD, GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +BuildRequires: libtcl-devel +BuildRequires: gcc-java +BuildRequires: java-gcj-compat +#BuildRequires: java-openjdk +BuildRequires: jpackage-utils +BuildRequires: sharutils +Requires: libdb48 = %{version}-%{release} +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. +The Berkeley DB includes B+tree, Extended Linear Hashing, Fixed and Variable-length record access methods, transactions, locking, logging, shared memory caching, and database recovery. +The Berkeley DB supports C, C++, Java, and Perl APIs. +It is used by many applications, including Python and Perl, so this should be installed on all systems. + +This package contains the tools for managing Berkeley DB. + +%package docs +Summary: The Berkeley DB database Documentation +Group: Documentation +Requires: libdb48 = %{version}-%{release} + +%description docs +The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. +The Berkeley DB includes B+tree, Extended Linear Hashing, Fixed and Variable-length record access methods, transactions, locking, logging, shared memory caching, and database recovery. +The Berkeley DB supports C, C++, Java, and Perl APIs. +It is used by many applications, including Python and Perl, so this should be installed on all systems. + +This package contains documentation for %{name}. + +%package -n libdb48 +Summary: The Berkeley DB database library +Group: System/Libraries + +%description -n libdb48 +The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. +The Berkeley DB includes B+tree, Extended Linear Hashing, Fixed and Variable-length record access methods, transactions, locking, logging, shared memory caching, and database recovery. +The Berkeley DB supports C, C++, Java, and Perl APIs. +It is used by many applications, including Python and Perl, so this should be installed on all systems. + +%package -n libdb48-devel +Summary: Development files for the Berkeley DB library. +Group: Development/Libraries +Requires: libdb48 = %{version}-%{release} + + +%description -n libdb48-devel +The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. +This package contains the header files, libraries, and documentation for building programs which use the Berkeley DB. + +%package -n libdb48-static +Summary: Development files for the Berkeley DB library - static libraries. +Group: Development/Libraries +Requires: libdb48-devel = %{version}-%{release} + +%description -n libdb48-static +The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. +This package contains static libraries for building programs which use the Berkeley DB. + +%package -n java-bdb48 +Summary: Java bindings for the Berkeley DB library +Group: System/Libraries +Requires: libdb48 = %{version}-%{release} +Provides: libdb48-java + +%description -n java-bdb48 +Java bindings for the Berkeley DB library. + +%package -n libdb48-tcl +Summary: Development files for using the Berkeley DB (version 4) with tcl +Group: Development/Libraries +Requires: libdb48 = %{version}-%{release} + +%description -n libdb48-tcl +The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. This package contains the libraries for building programs which use the Berkeley DB in Tcl. + +%prep +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%setup -q -n db-%{version} -a 1 +#%patch0 -p0 +#%patch1 -p0 +#%patch2 -p2 +#%patch3 -p1 +#%patch4 -p1 +#%patch5 -p1 + +pushd db.1.85/PORT/linux +%patch6 -p0 -b .1.1 +popd +pushd db.1.85 +%patch7 -p0 -b .1.2 +%patch8 -p0 -b .1.3 +%patch9 -p0 -b .1.4 +%patch10 -p1 -b .errno +popd +%patch11 -p1 -b .185compat +%patch12 -p0 -b .4.8.30.jni + +cd dist +./s_config + +%build + +case "%{_target_cpu}" in + i586) mutex="x86/gcc-assembly" ;; + ppc) mutex="PPC/gcc-assembly" ;; + arm) mutex="ARM/gcc-assembly" ;; + x86_64) mutex="x86_64/gcc-assembly" ;; + *) mutex="UNIX/fcntl" ;; +esac + +CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"; export CFLAGS +# Build the old db-185 libraries. +make -C db.1.85/PORT/%{_os} OORG="$CFLAGS" + + +/bin/sh libtool --mode=compile %{__cc} $RPM_OPT_FLAGS -Idb.1.85/PORT/%{_os}/include -D_REENTRANT -c db_dump185/db_dump185.c -o dist/$1/db_dump185.lo +/bin/sh libtool --mode=link %{__cc} -o dist/$1/db_dump185 dist/$1/db_dump185.lo db.1.85/PORT/%{_os}/libdb.a + + +build() { + test -d dist/$1 || mkdir dist/$1 +# Static link db_dump185 with old db-185 libraries. + /bin/sh libtool --mode=compile %{__cc} $RPM_OPT_FLAGS -Idb.1.85/PORT/%{_os}/include -D_REENTRANT -c db_dump185/db_dump185.c -o dist/$1/db_dump185.lo + /bin/sh libtool --mode=link %{__cc} -o dist/$1/db_dump185 dist/$1/db_dump185.lo db.1.85/PORT/%{_os}/libdb.a + + pushd dist + popd + pushd dist/$1 + ln -sf ../configure . + JAVA_HOME=%{_jvmdir}/java/ \ + %configure -C \ + --prefix=%{_prefix} \ + --datadir=%{_datadir} \ + --includedir=%{_includedir}/db4 \ + --enable-compat185 \ + --enable-dump185 \ + --enable-shared \ + --enable-static \ + --enable-tcl \ + --with-tcl=%{_libdir} \ + --with-mutex="$mutex" \ + --enable-cxx \ +%if "%{stage1}" != "1" + --enable-java \ +%endif + --enable-test \ + +# --enable-diagnostic +# --enable-debug +# --enable-debug_rop +# --enable-debug_wop + + perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' libtool + perl -pi -e 's/^postdep_objects=".*$/postdep_objects=""/' libtool + perl -pi -e 's/-shared -nostdlib/-shared/' libtool + + %make + + LDBJ=./.libs/libdb_java-%{majver}.la + if test -f ${LDBJ} -a ! -f ${LDBJ}i; then + sed -e 's,^installed=no,installed=yes,' < ${LDBJ} > ${LDBJ}i + fi + + popd +} + +build dist-tls + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +mkdir -p %{buildroot}%{_includedir} +mkdir -p %{buildroot}%{_libdir} + +%makeinstall -C dist/dist-tls + +mkdir -p %{buildroot}%{_datadir}/doc/libdb4-%{version} +mv %{buildroot}%{_prefix}/docs/* \ + %{buildroot}%{_datadir}/doc/libdb4-%{version} +rmdir %{buildroot}%{_prefix}/docs + +## need for build pythonic extension +#for i in db.h db_cxx.h db_185.h; do +# ln -s db4/$i %{buildroot}%{_includedir} +#done + +pushd %{buildroot}%{_bindir} +find * -exec ln -s {} {}-%{majvershort} \; +popd + +# fix strange permissions +chmod u+w %{buildroot}%{_bindir} %{buildroot}%{_bindir}/* + +ln -s libdb-%{majver}.so %{buildroot}%{_libdir}/libdb.so.%{majver} + +%if "%{stage1}" != "1" + +ln -s libdb_java-%{majver}.so %{buildroot}%{_libdir}/libdb_java.so.%{majver} + +mkdir -p %{buildroot}%{_datadir}/java +mv %{buildroot}%{_libdir}/db.jar %{buildroot}%{_datadir}/java/db-%{version}.jar + +( + cd %{buildroot}%{_datadir}/java + for jar in *-%{version}*; do + ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` + done +) + +%endif + +# remove unneeded files +rm -f %{buildroot}%{_libdir}/*.la +rm -f %{buildroot}%{_libdir}/libdb.so +rm -f %{buildroot}%{_libdir}/libdb_cxx.so +rm -f %{buildroot}%{_libdir}/libdb.a +rm -f %{buildroot}%{_libdir}/libdb_cxx.a +rm -f %{buildroot}%{_libdir}/libdb_tcl.so +rm -f %{buildroot}%{_libdir}/libdb-%{MAJver}.so +rm -f %{buildroot}%{_libdir}/libdb_cxx-%{MAJver}.so +rm -f %{buildroot}%{_libdir}/libdb_tcl-%{MAJver}.so + +chmod +x %{buildroot}%{_libdir}/*.so* + +#ln -sf libdb-%{majver}.so %{buildroot}%{_libdir}/libdb.so +#ln -sf libdb_cxx-%{majver}.so %{buildroot}%{_libdir}/libdb_cxx.so + + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -n libdb48 -p /sbin/ldconfig + +%postun -n libdb48 -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_bindir}/* + +%files -n libdb48 +%defattr(-,root,root) +%{_libdir}/libdb-%{majver}.so +%{_libdir}/libdb_cxx-%{majver}.so +%{_libdir}/libdb.so.%{majver} + +%files -n libdb48-devel +%defattr(-,root,root) +%{_includedir}/* +#%{_libdir}/libdb_cxx.so +#%{_libdir}/libdb.so + +%files docs +%defattr(-,root,root) +%dir %{_datadir}/doc/libdb4-%{version} +%{_datadir}/doc/libdb4-%{version}/* + +%files -n libdb48-static +%defattr(-,root,root) +%{_libdir}/libdb-%{majver}.a +%{_libdir}/libdb_cxx-%{majver}.a +%{_libdir}/libdb_java-%{majver}.a +%{_libdir}/libdb_tcl-%{majver}.a + +%post -n libdb48-tcl -p /sbin/ldconfig + +%postun -n libdb48-tcl -p /sbin/ldconfig + +%files -n libdb48-tcl +%defattr(-,root,root) +%{_libdir}/libdb_tcl-%{majver}.so + +%post -n java-bdb48 -p /sbin/ldconfig + +%postun -n java-bdb48 -p /sbin/ldconfig + +%files -n java-bdb48 +%defattr(-,root,root) +%{_libdir}/libdb_java.so +%{_libdir}/libdb_java-%{MAJver}.so +%{_libdir}/libdb_java-%{majver}.so +%{_libdir}/libdb_java-%{majver}_g.so +%{_libdir}/libdb_java.so.%{majver} +%{_datadir}/java/db-%{version}.jar +%{_datadir}/java/db.jar + +%changelog +* Thu Sep 15 2011 Silvan Calarco 4.8.30-4mamba +- java-bdb48: don't obsolete libdb-java, provided by libdb51-java + +* Thu Mar 31 2011 Silvan Calarco 4.8.30-3mamba +- remove requirement for java-openjdk; current system jdk is used +- ok let's leave headers in %{_includedir}/db4 instead of %{_includedir}/db48 +- but don't make this the system default db version thus not installing %{_includedir}/db*.h + +* Sat Feb 26 2011 gil 4.8.30-2mamba +- rename to db48 +- add db48 libdb48-static docs sub packages + +* Mon Jan 17 2011 gil 4.8.30-1mamba +- update to 4.8.30 +- add java-openjdk support +- add db 185 support +- add libtcl support +- move headers files in %{_includedir}/db4 and create db.h db_cxx.h db_185.h links in %{_includedir} +- add db.jar with version +- add libdb-tcl sub package + +* Thu Dec 31 2009 Automatic Build System 4.8.26-1mamba +- automatic update to 4.8.26 by autodist + +* Fri Sep 25 2009 Silvan Calarco 4.8.24-1mamba +- update to 4.8.24 + +* Thu Jul 03 2008 gil 4.7.25-1mamba +- update to version 4.7.25 +- removed patches + +* Wed Jun 04 2008 Silvan Calarco 4.2.52-8mamba +- specfile updated + +* Thu Jul 13 2006 Davide Madrisan 4.2.52-7qilnx +- fixed openldap warning: "BerkeleyDB 4.2.52 library needs TXN patch!" +- official patches applied +- fixed permissions of binary files + +* Wed Oct 26 2005 Silvan Calarco 4.2.52-6qilnx +- add OpenOffice patch + +* Mon Oct 24 2005 Silvan Calarco 4.2.52-5qilnx +- do not link against libpthread + +* Mon Oct 24 2005 Silvan Calarco 4.2.52-4qilnx +- rebuild with gcj + +* Wed Feb 02 2005 Silvan Calarco 4.2.52-3qilnx +- rebuilt with java bindings + +* Tue Jul 27 2004 Silvan Calarco 4.2.25-8qilnx +- new version build +- source RPM renamed to db42 (should cohexist with libdb4) + +* Sun May 09 2004 Silvan Calarco 4.1.25-8qilnx +- added libdb.so provides + +* Fri May 07 2004 Silvan Calarco 4.1.25-7qilnx +- fixed symlinks for compatibility + +* Fri May 07 2004 Silvan Calarco 4.1.25-6qilnx +- rebuild with --enable-compat185 + +* Tue Sep 15 2003 Silvan Calarco 4.1.25-5qilnx +- Added symlink /usr/include/db.h so that db4 is system default version + +* Tue Sep 09 2003 Silvan Calarco 4.1.25-4qilnx +- Moved includes to /usr/include/db4 for devel packages co-existence + +* Fri Jul 25 2003 Silvan Calarco 4.1.25-3qilnx +- Removed compat185 (it looks broken, I'll try to use db2's compat185) + +* Thu Jul 24 2003 Silvan Calarco 4.1.25-2qilnx +- Enabled compatibiliy with version 185 + +* Tue Apr 22 2003 Luca Tinelli 4.1.25-1qilnx +- Creation of db4 package diff --git a/java.diff b/java.diff new file mode 100644 index 0000000..da4a20e --- /dev/null +++ b/java.diff @@ -0,0 +1,248 @@ +--- db4-4.2.52/java/src/com/sleepycat/db/DbEnv.java 2003-12-03 16:26:27.000000000 -0500 ++++ db4-4.2.52/java/src/com/sleepycat/db/DbEnv.java 2004-03-18 15:15:42.000000000 -0500 +@@ -61,7 +61,7 @@ + // Internally, the JNI layer creates a global reference to each DbEnv, + // which can potentially be different to this. We keep a copy here so + // we can clean up after destructors. +- private Object dbenv_ref; ++ private long dbenv_ref; + private DbAppDispatch app_dispatch_handler; + private DbEnvFeedbackHandler env_feedback_handler; + private DbErrorHandler error_handler; +@@ -94,7 +94,7 @@ + void cleanup() { + swigCPtr = 0; + db_java.deleteRef0(dbenv_ref); +- dbenv_ref = null; ++ dbenv_ref = 0L; + } + + +--- db4-4.2.52/java/src/com/sleepycat/db/Db.java 2003-12-03 16:26:25.000000000 -0500 ++++ db4-4.2.52/java/src/com/sleepycat/db/Db.java 2004-03-18 15:15:55.000000000 -0500 +@@ -57,7 +57,7 @@ + // Internally, the JNI layer creates a global reference to each Db, + // which can potentially be different to this. We keep a copy here so + // we can clean up after destructors. +- private Object db_ref; ++ private long db_ref; + private DbEnv dbenv; + private boolean private_dbenv; + private DbAppendRecno append_recno_handler; +@@ -84,7 +84,7 @@ + private void cleanup() { + swigCPtr = 0; + db_java.deleteRef0(db_ref); +- db_ref = null; ++ db_ref = 0L; + if (private_dbenv) { + dbenv.cleanup(); + } +--- db4-4.2.52/java/src/com/sleepycat/db/db_java.java 2003-12-03 16:10:54.000000000 -0500 ++++ db4-4.2.52/java/src/com/sleepycat/db/db_java.java 2004-03-18 15:17:24.000000000 -0500 +@@ -14,15 +14,15 @@ + db_javaJNI.DbEnv_lock_vec(DbEnv.getCPtr(dbenv), locker, flags, list, offset, nlist); + } + +- static Object initDbEnvRef0(DbEnv self, Object handle) { ++ static long initDbEnvRef0(DbEnv self, Object handle) { + return db_javaJNI.initDbEnvRef0(DbEnv.getCPtr(self), handle); + } + +- static Object initDbRef0(Db self, Object handle) { ++ static long initDbRef0(Db self, Object handle) { + return db_javaJNI.initDbRef0(Db.getCPtr(self), handle); + } + +- static void deleteRef0(Object ref) { ++ static void deleteRef0(long ref) { + db_javaJNI.deleteRef0(ref); + } + +--- db4-4.2.52/java/src/com/sleepycat/db/db_javaJNI.java 2003-12-03 16:10:55.000000000 -0500 ++++ db4-4.2.52/java/src/com/sleepycat/db/db_javaJNI.java 2004-03-18 15:16:18.000000000 -0500 +@@ -45,9 +45,9 @@ + static native final void initialize(); + + public final static native void DbEnv_lock_vec(long jarg1, int jarg2, int jarg3, DbLockRequest[] jarg4, int jarg5, int jarg6) throws DbException; +- final static native Object initDbEnvRef0(long jarg1, Object jarg2); +- final static native Object initDbRef0(long jarg1, Object jarg2); +- final static native void deleteRef0(Object jarg1); ++ final static native long initDbEnvRef0(long jarg1, Object jarg2); ++ final static native long initDbRef0(long jarg1, Object jarg2); ++ final static native void deleteRef0(long jarg1); + final static native long getDbEnv0(long jarg1); + public final static native long new_Db(long jarg1, int jarg2) throws DbException; + public final static native void Db_associate(long jarg1, long jarg2, long jarg3, DbSecondaryKeyCreate jarg4, int jarg5) throws DbException; +--- db4-4.2.52/libdb_java/db_java.i 2003-11-17 15:00:52.000000000 -0500 ++++ db4-4.2.52/libdb_java/db_java.i 2004-03-18 09:21:14.000000000 -0500 +@@ -53,7 +53,7 @@ + // Internally, the JNI layer creates a global reference to each DbEnv, + // which can potentially be different to this. We keep a copy here so + // we can clean up after destructors. +- private Object dbenv_ref; ++ private long dbenv_ref; + private DbAppDispatch app_dispatch_handler; + private DbEnvFeedbackHandler env_feedback_handler; + private DbErrorHandler error_handler; +@@ -76,7 +76,7 @@ + void cleanup() { + swigCPtr = 0; + db_java.deleteRef0(dbenv_ref); +- dbenv_ref = null; ++ dbenv_ref = 0L; + } + + public synchronized void close(int flags) throws DbException { +@@ -220,7 +220,7 @@ + // Internally, the JNI layer creates a global reference to each Db, + // which can potentially be different to this. We keep a copy here so + // we can clean up after destructors. +- private Object db_ref; ++ private long db_ref; + private DbEnv dbenv; + private boolean private_dbenv; + private DbAppendRecno append_recno_handler; +@@ -245,7 +245,7 @@ + private void cleanup() { + swigCPtr = 0; + db_java.deleteRef0(db_ref); +- db_ref = null; ++ db_ref = 0L; + if (private_dbenv) + dbenv.cleanup(); + dbenv = null; +@@ -503,46 +503,42 @@ + } + %} + +-%native(initDbEnvRef0) jobject initDbEnvRef0(DB_ENV *self, void *handle); +-%native(initDbRef0) jobject initDbRef0(DB *self, void *handle); +-%native(deleteRef0) void deleteRef0(jobject ref); ++%native(initDbEnvRef0) jlong initDbEnvRef0(DB_ENV *self, void *handle); ++%native(initDbRef0) jlong initDbRef0(DB *self, void *handle); ++%native(deleteRef0) void deleteRef0(jlong ref); + %native(getDbEnv0) DB_ENV *getDbEnv0(DB *self); + + %{ +-JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbEnvRef0( ++JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbEnvRef0( + JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) { + DB_ENV *self = *(DB_ENV **)&jarg1; ++ jlong ret; + COMPQUIET(jcls, NULL); + + DB_ENV_INTERNAL(self) = (void *)(*jenv)->NewGlobalRef(jenv, jarg2); + self->set_errpfx(self, (const char*)self); +- return (jobject)DB_ENV_INTERNAL(self); ++ *(jobject *)&ret = (jobject)DB_ENV_INTERNAL(self); ++ return (ret); + } + +-JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbRef0( ++JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbRef0( + JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) { + DB *self = *(DB **)&jarg1; ++ jlong ret; + COMPQUIET(jcls, NULL); + + DB_INTERNAL(self) = (void *)(*jenv)->NewGlobalRef(jenv, jarg2); +- return (jobject)DB_INTERNAL(self); ++ *(jobject *)&ret = (jobject)DB_INTERNAL(self); ++ return (ret); + } + + JNIEXPORT void JNICALL Java_com_sleepycat_db_db_1javaJNI_deleteRef0( +- JNIEnv *jenv, jclass jcls, jobject jref) { +- COMPQUIET(jcls, NULL); +- +- if (jref != NULL) +- (*jenv)->DeleteGlobalRef(jenv, jref); +-} +- +-JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_getDbRef0( + JNIEnv *jenv, jclass jcls, jlong jarg1) { +- DB *self = *(DB **)&jarg1; ++ jobject jref = *(jobject *)&jarg1; + COMPQUIET(jcls, NULL); +- COMPQUIET(jenv, NULL); + +- return (jobject)DB_INTERNAL(self); ++ if (jref != 0L) ++ (*jenv)->DeleteGlobalRef(jenv, jref); + } + + JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_getDbEnv0( +@@ -554,7 +550,7 @@ + COMPQUIET(jcls, NULL); + + *(DB_ENV **)&env_cptr = self->dbenv; +- return env_cptr; ++ return (env_cptr); + } + + JNIEXPORT jboolean JNICALL +--- db4-4.2.52/libdb_java/db_java_wrap.c 2003-12-03 16:10:36.000000000 -0500 ++++ db4-4.2.52/libdb_java/db_java_wrap.c 2004-03-18 12:18:58.000000000 -0500 +@@ -1192,40 +1192,36 @@ + } + + +-JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbEnvRef0( ++JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbEnvRef0( + JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) { + DB_ENV *self = *(DB_ENV **)&jarg1; ++ jlong ret; + COMPQUIET(jcls, NULL); + + DB_ENV_INTERNAL(self) = (void *)(*jenv)->NewGlobalRef(jenv, jarg2); + self->set_errpfx(self, (const char*)self); +- return (jobject)DB_ENV_INTERNAL(self); ++ *(jobject *)&ret = (jobject)DB_ENV_INTERNAL(self); ++ return (ret); + } + +-JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbRef0( ++JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbRef0( + JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) { + DB *self = *(DB **)&jarg1; ++ jlong ret; + COMPQUIET(jcls, NULL); + + DB_INTERNAL(self) = (void *)(*jenv)->NewGlobalRef(jenv, jarg2); +- return (jobject)DB_INTERNAL(self); ++ *(jobject *)&ret = (jobject)DB_INTERNAL(self); ++ return (ret); + } + + JNIEXPORT void JNICALL Java_com_sleepycat_db_db_1javaJNI_deleteRef0( +- JNIEnv *jenv, jclass jcls, jobject jref) { +- COMPQUIET(jcls, NULL); +- +- if (jref != NULL) +- (*jenv)->DeleteGlobalRef(jenv, jref); +-} +- +-JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_getDbRef0( + JNIEnv *jenv, jclass jcls, jlong jarg1) { +- DB *self = *(DB **)&jarg1; ++ jobject jref = *(jobject *)&jarg1; + COMPQUIET(jcls, NULL); +- COMPQUIET(jenv, NULL); + +- return (jobject)DB_INTERNAL(self); ++ if (jref != 0L) ++ (*jenv)->DeleteGlobalRef(jenv, jref); + } + + JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_getDbEnv0( +@@ -1237,7 +1233,7 @@ + COMPQUIET(jcls, NULL); + + *(DB_ENV **)&env_cptr = self->dbenv; +- return env_cptr; ++ return (env_cptr); + } + + JNIEXPORT jboolean JNICALL + diff --git a/patch.1.1 b/patch.1.1 new file mode 100644 index 0000000..fe3177d --- /dev/null +++ b/patch.1.1 @@ -0,0 +1,20 @@ +*** Makefile.orig Wed Jul 13 21:43:16 1994 +--- Makefile Wed Dec 31 19:00:00 1969 +*************** +*** 15,22 **** + + ${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} + rm -f $@ +! ar cq $@ \ +! `lorder ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} | tsort` + ranlib $@ + + clean: +--- 15,21 ---- + + ${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} + rm -f $@ +! ar cq $@ ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} + ranlib $@ + + clean: diff --git a/patch.1.2 b/patch.1.2 new file mode 100644 index 0000000..a343909 --- /dev/null +++ b/patch.1.2 @@ -0,0 +1,19 @@ +*** btree/bt_split.c Tue Jul 26 14:22:02 1994 +--- btree/bt_split.c Sat Jan 4 14:38:55 1997 +*************** +*** 673,679 **** + * where we decide to try and copy too much onto the left page. + * Make sure that doesn't happen. + */ +! if (skip <= off && used + nbytes >= full) { + --off; + break; + } +--- 673,679 ---- + * where we decide to try and copy too much onto the left page. + * Make sure that doesn't happen. + */ +! if (skip <= off && used + nbytes >= full || nxt == top - 1) { + --off; + break; + } diff --git a/patch.1.3 b/patch.1.3 new file mode 100644 index 0000000..5ca03df --- /dev/null +++ b/patch.1.3 @@ -0,0 +1,37 @@ +*** btree/bt_split.c.orig Sat Feb 8 10:14:10 1997 +--- btree/bt_split.c Sat Feb 8 10:14:51 1997 +*************** +*** 673,679 **** + * where we decide to try and copy too much onto the left page. + * Make sure that doesn't happen. + */ +! if (skip <= off && used + nbytes >= full || nxt == top - 1) { + --off; + break; + } +--- 673,680 ---- + * where we decide to try and copy too much onto the left page. + * Make sure that doesn't happen. + */ +! if (skip <= off && +! used + nbytes + sizeof(indx_t) >= full || nxt == top - 1) { + --off; + break; + } +*************** +*** 686,692 **** + memmove((char *)l + l->upper, src, nbytes); + } + +! used += nbytes; + if (used >= half) { + if (!isbigkey || bigkeycnt == 3) + break; +--- 687,693 ---- + memmove((char *)l + l->upper, src, nbytes); + } + +! used += nbytes + sizeof(indx_t); + if (used >= half) { + if (!isbigkey || bigkeycnt == 3) + break; diff --git a/patch.1.4 b/patch.1.4 new file mode 100644 index 0000000..cec5fbc --- /dev/null +++ b/patch.1.4 @@ -0,0 +1,22 @@ +*** btree/bt_page.c.orig Wed Jul 13 21:29:02 1994 +--- btree/bt_page.c Wed Jun 11 20:14:43 1997 +*************** +*** 65,70 **** +--- 65,71 ---- + h->prevpg = P_INVALID; + h->nextpg = t->bt_free; + t->bt_free = h->pgno; ++ F_SET(t, B_METADIRTY); + + /* Make sure the page gets written back. */ + return (mpool_put(t->bt_mp, h, MPOOL_DIRTY)); +*************** +*** 92,97 **** +--- 93,99 ---- + (h = mpool_get(t->bt_mp, t->bt_free, 0)) != NULL) { + *npg = t->bt_free; + t->bt_free = h->nextpg; ++ F_SET(t, B_METADIRTY); + return (h); + } + return (mpool_new(t->bt_mp, npg)); diff --git a/patch.4.2.52.1 b/patch.4.2.52.1 new file mode 100644 index 0000000..474cb87 --- /dev/null +++ b/patch.4.2.52.1 @@ -0,0 +1,36 @@ +*** mp/mp_fget.c.orig 25 Sep 2003 02:15:16 -0000 11.81 +--- mp/mp_fget.c 9 Dec 2003 19:06:28 -0000 11.82 +*************** +*** 440,446 **** + c_mp->stat.st_pages--; + alloc_bhp = NULL; + R_UNLOCK(dbenv, &dbmp->reginfo[n_cache]); +- MUTEX_LOCK(dbenv, &hp->hash_mutex); + + /* + * We can't use the page we found in the pool if DB_MPOOL_NEW +--- 440,445 ---- +*************** +*** 455,460 **** +--- 454,462 ---- + b_incr = 0; + goto alloc; + } ++ ++ /* We can use the page -- get the bucket lock. */ ++ MUTEX_LOCK(dbenv, &hp->hash_mutex); + break; + case SECOND_MISS: + /* +*** mp/mp_fput.c.orig 30 Sep 2003 17:12:00 -0000 11.48 +--- mp/mp_fput.c 13 Dec 2003 00:08:29 -0000 11.49 +*************** +*** 285,290 **** +--- 285,291 ---- + 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); + } + } diff --git a/patch.4.2.52.2 b/patch.4.2.52.2 new file mode 100644 index 0000000..3dc13c1 --- /dev/null +++ b/patch.4.2.52.2 @@ -0,0 +1,45 @@ +*** lock/lock.c.save 2004-01-30 10:48:33.000000000 -0800 +--- lock/lock.c 2004-01-30 10:55:58.000000000 -0800 +*************** +*** 2216,2226 **** + dp = (u_int8_t *)dp + \ + sizeof(db_pgno_t); \ + } while (0) +! #define COPY_OBJ(dp, obj) do { \ +! memcpy(dp, obj->data, obj->size); \ +! dp = (u_int8_t *)dp + \ +! ALIGN(obj->size, \ +! sizeof(u_int32_t)); \ + } while (0) + + #define GET_COUNT(dp, count) do { \ +--- 2216,2227 ---- + dp = (u_int8_t *)dp + \ + sizeof(db_pgno_t); \ + } while (0) +! #define COPY_OBJ(dp, obj) do { \ +! memcpy(dp, \ +! (obj)->data, (obj)->size); \ +! dp = (u_int8_t *)dp + \ +! ALIGN((obj)->size, \ +! sizeof(u_int32_t)); \ + } while (0) + + #define GET_COUNT(dp, count) do { \ +*************** +*** 2339,2345 **** + for (i = 0; i < nlocks; i = j) { + PUT_PCOUNT(dp, obj[i].ulen); + PUT_SIZE(dp, obj[i].size); +! COPY_OBJ(dp, obj); + lock = (DB_LOCK_ILOCK *)obj[i].data; + for (j = i + 1; j <= i + obj[i].ulen; j++) { + lock = (DB_LOCK_ILOCK *)obj[j].data; +--- 2340,2346 ---- + for (i = 0; i < nlocks; i = j) { + PUT_PCOUNT(dp, obj[i].ulen); + PUT_SIZE(dp, obj[i].size); +! COPY_OBJ(dp, &obj[i]); + lock = (DB_LOCK_ILOCK *)obj[i].data; + for (j = i + 1; j <= i + obj[i].ulen; j++) { + lock = (DB_LOCK_ILOCK *)obj[j].data;