diff --git a/README.md b/README.md index 5cd8eba..9408e2e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # db53 +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. + 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/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/db53.spec b/db53.spec new file mode 100644 index 0000000..75cc01d --- /dev/null +++ b/db53.spec @@ -0,0 +1,279 @@ +%define majver %(echo %version | cut -d . -f1-2) +%define MAJver %(echo %version | cut -d . -f1) +%define majvershort %(echo %version | cut -d . -f1-2 | tr -d .) +Name: db53 +Version: 5.3.21 +Release: 1mamba +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 +Source: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz +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 +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +%if "%{stage1}" != "1" +BuildRequires: jpackage-utils +BuildRequires: jdk +%endif +BuildRequires: sharutils +#Provides: db48 +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. + +%package -n libdb53 +Summary: The Berkeley DB database library +Group: System/Libraries + +%description -n libdb53 +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 db53-tools +Summary: Tools for the managing Berkeley DB +Group: System/Libraries +Requires: libdb53 = %{version}-%{release} + +%description -n db53-tools +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 tools for managing Berkeley DB. + +%package -n libdb53-devel +Summary: Development files for the Berkeley DB library. +Group: Development/Libraries +Requires: libdb53 = %{version}-%{release} + +%description -n libdb53-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 libdb53-static +Summary: Static library files for the Berkeley DB library. +Group: Development/Libraries +Requires: libdb53 = %{version}-%{release} + +%description -n libdb53-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 the static library files for the Berkeley DB library. + +%package -n libdb53-java +Summary: Java bindings for the Berkeley DB library +Group: System/Libraries +Requires: libdb53 = %{version}-%{release} + +%description -n libdb53-java +Java bindings for the Berkeley DB library. + +%prep +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%setup -q -n db-%{version} + +%build +cd build_unix + +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 + +JAVA_HOME=%{_jvmdir}/jdk/ \ +../dist/configure \ + --prefix=%{_prefix} \ + --datadir=%{_datadir} \ + --includedir=%{_includedir}/db53 \ + --enable-cxx \ + --enable-compat185 \ +%if "%{stage1}" != "1" + --enable-java \ +%endif + --with-mutex="$mutex" \ + --program-suffix=-53 + +%make + +%install +cd build_unix +%makeinstall +# prefix=%{buildroot}%{_prefix} includedir=%{buildroot}%{_includedir} + +mkdir -p %{buildroot}%{_datadir}/doc/libdb4-%{version} +mv %{buildroot}%{_prefix}/docs/* \ + %{buildroot}%{_datadir}/doc/libdb4-%{version} +rmdir %{buildroot}%{_prefix}/docs + +# make this version thre system default +pushd %{buildroot}%{_bindir} +find * -exec ln -s {} {}-%{majvershort} \; +popd + +for f in db.h db_185.h db_cxx.h; do + ln -s db53/$f %{buildroot}%{_includedir}/$f +done + +# fix strange permissions +chmod 755 %{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}/*.jar %{buildroot}%{_datadir}/java/ +%endif + +#rm -f %{buildroot}%{_libdir}/libdb.so +#rm -f %{buildroot}%{_libdir}/libdb_cxx.so + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files -n libdb53 +%defattr(-,root,root) +%{_libdir}/libdb-%{majver}.so +%{_libdir}/libdb_cxx-%{majver}.so +%{_libdir}/libdb.so.%{majver} + +%files -n db53-tools +%defattr(-,root,root) +%{_bindir}/* + +%files -n libdb53-devel +%defattr(-,root,root) +%dir %{_includedir}/db53 +%{_includedir}/db53/* +%{_includedir}/db.h +%{_includedir}/db_185.h +%{_includedir}/db_cxx.h +%{_libdir}/*.la +%{_libdir}/libdb-%{MAJver}.so +%{_libdir}/libdb_cxx.so +%{_libdir}/libdb_cxx-%{MAJver}.so +%{_libdir}/libdb.so +%{_docdir}/libdb4-%{version}/* + +%files -n libdb53-static +%defattr(-,root,root) +%{_libdir}/*.a + +%if "%{stage1}" != "1" +%files -n libdb53-java +%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/*.jar +%endif + +%changelog +* Tue May 28 2013 Silvan Calarco 5.3.21-1mamba +- update to 5.3.21 + +* Tue Sep 20 2011 Automatic Build System 5.2.36-1mamba +- automatic version update by autodist + +* Wed Aug 31 2011 Silvan Calarco 5.2.28-2mamba +- renamed from db51 to db52 using --program-suffix=-52 to keep 5.1 still the default + +* Tue Jun 14 2011 Automatic Build System 5.2.28-1mamba +- automatic update by autodist + +* Sat Mar 19 2011 Silvan Calarco 5.1.25-3mamba +- add libdb.so and libdb_cxx.so symlinks + +* Mon Mar 07 2011 Silvan Calarco 5.1.25-2mamba +- make this the system default Berkeley DB + +* Thu Feb 03 2011 Automatic Build System 5.1.25-1mamba +- automatic update by autodist + +* Fri Sep 10 2010 Automatic Build System 5.1.19-1mamba +- automatic update to 5.1.19 by autodist + +* Fri Jul 02 2010 Automatic Build System 5.0.26-1mamba +- automatic update to 5.0.26 by autodist + +* Sat May 22 2010 Automatic Build System 5.0.21-1mamba +- automatic update to 5.0.21 by autodist + +* 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 +