summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bdb/dist/RELEASE2
-rw-r--r--bdb/dist/configure.in88
-rw-r--r--bdb/env/env_method.c12
-rw-r--r--bdb/include/db.src7
-rw-r--r--bdb/include/log.h2
-rw-r--r--bdb/log/log_put.c3
6 files changed, 112 insertions, 2 deletions
diff --git a/bdb/dist/RELEASE b/bdb/dist/RELEASE
index 495c12637e2..7b7d7bde003 100644
--- a/bdb/dist/RELEASE
+++ b/bdb/dist/RELEASE
@@ -5,4 +5,4 @@ DB_VERSION_MINOR=2
DB_VERSION_PATCH=9
DB_RELEASE_DATE=`date "+%B %e, %Y"`
-DB_VERSION_STRING="Sleepycat Software: Berkeley DB $DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH: ($DB_RELEASE_DATE)"
+DB_VERSION_STRING="Sleepycat Software: Berkeley DB $DB_VERSION_MAJOR.$DB_VERSION_MINOR.${DB_VERSION_PATCH}a: ($DB_RELEASE_DATE)"
diff --git a/bdb/dist/configure.in b/bdb/dist/configure.in
index 6c2a0c5d0bf..d5196be9740 100644
--- a/bdb/dist/configure.in
+++ b/bdb/dist/configure.in
@@ -68,6 +68,40 @@ dnl Process all options before using them. This is necessary because there
dnl are dependencies among them.
AM_OPTIONS_SET
+# This is to determine what compiler is being used and to set options.
+# i.e. SCO OpenServer 5.0.X and UnixWare 7.X.X
+# option, cache_name, variable
+AC_DEFUN(AC_SYS_COMPILER_FLAG,
+[
+ AC_MSG_CHECKING($1)
+ OLD_CFLAGS="[$]CFLAGS"
+ AC_CACHE_VAL(db_cv_option_$2,
+ [
+ CFLAGS="[$]OLD_CFLAGS $1"
+ AC_TRY_RUN([int main(){exit(0);}],db_cv_option_$2=yes,db_cv_option_$2=no,db_cv_option_$2=no)
+ ])
+
+ CFLAGS="[$]OLD_CFLAGS"
+
+ if test x"[$]db_cv_option_$2" = "xyes" ; then
+ $3="[$]$3 $1"
+ AC_MSG_RESULT(yes)
+ $5
+ else
+ AC_MSG_RESULT(no)
+ $4
+ fi
+])
+
+
+# os, option, cache_name, variable
+AC_DEFUN(AC_SYS_OS_COMPILER_FLAG,
+[
+ if test "x$db_cv_sys_os" = "x$1" ; then
+ AC_SYS_COMPILER_FLAG($2,$3,$4)
+ fi
+])
+
dnl This is where we handle stuff that autoconf can't handle: compiler,
dnl preprocessor and load flags, libraries that the standard tests don't
dnl look for. The default optimization is -O. We would like to set the
@@ -111,6 +145,55 @@ osf*) CPPFLAGS="-D_REENTRANT $CPPFLAGS";;
*qnx) AC_DEFINE(HAVE_QNX);;
sco3.2v4*) CC=${CC-"cc -belf"}
LIBS="-lsocket -lnsl_s $LIBS";;
+sco3.2v5*) if test "$GCC" != "yes"; then
+ CFLAGS="$CFLAGS"
+ LD='$(CC) $(CFLAGS)'
+ LIBS="-lsocket -lnsl $LIBS"
+ CPPFLAGS="-D_THREAD_SAFE -pthread $CPPFLAGS"
+ case "$CFLAGS" in
+ *-belf*)
+ AC_SYS_COMPILER_FLAG(-belf,sco_belf_option,CFLAGS,[],[
+ case "$LDFLAGS" in
+ *-belf*) ;;
+ *) echo "Adding -belf option to ldflags."
+ LDFLAGS="$LDFLAGS -belf"
+ ;;
+ esac
+ ])
+ ;;
+ *)
+ AC_SYS_COMPILER_FLAG(-belf,sco_belf_option,CFLAGS,[],[
+ case "$LDFLAGS" in
+ *-belf*) ;;
+ *)
+ echo "Adding -belf option to ldflags."
+ LDFLAGS="$LDFLAGS -belf"
+ ;;
+ esac
+ ])
+ ;;
+ esac
+ else
+ CC="gcc"
+ LIBS="-lsocket -lnsl $LIBS"
+ CPPFLAGS="-D_THREAD_SAFE -pthread $CPPFLAGS"
+ fi
+ ;;
+sysv5uw7*) LIBS="-lsocket -lnsl $LIBS"
+ if test "$GCC" != "yes"; then
+ # We are using built-in inline function
+ CC="cc -belf"
+ CXX="CC -belf"
+ CFLAGS="$CFLAGS -Kalloca -Kthread"
+ CXX="$CXX -DNO_CPLUSPLUS_ALLOCA"
+ LIBS="-Kthread -lsocket -lnsl $LIBS"
+ else
+ CFLAGS="$CFLAGS -Kalloca -pthread"
+ CXX="$CXX -DNO_CPLUSPLUS_ALLOCA"
+ CPPFLAGS="-D_THREAD_SAFE -pthread $CPPFLAGS"
+ LIBS="-pthread -lsocket -lnsl $LIBS"
+ fi
+ ;;
sco*) CC=${CC-"cc -belf"}
LIBS="-lsocket -lnsl $LIBS";;
solaris*) CPPFLAGS="-D_REENTRANT $CPPFLAGS";;
@@ -340,7 +423,12 @@ fi
dnl Test Server.
dnl Include -lpthread if the library exists.
+SCOLIBS=$LIBS
AC_CHECK_LIB(pthread, pthread_create, DBS_LIBS=-lpthread)
+case "$host_os" in
+sysv5uw7*) LIBS=$SCOLIBS;;
+sco3.2v5*) LIBS=$SCOLIBS;;
+esac
dnl Checks for typedefs, structures, and system/compiler characteristics.
AC_C_BIGENDIAN
diff --git a/bdb/env/env_method.c b/bdb/env/env_method.c
index c5f45df7124..8acb293acca 100644
--- a/bdb/env/env_method.c
+++ b/bdb/env/env_method.c
@@ -51,6 +51,8 @@ static void __dbenv_set_errpfx __P((DB_ENV *, const char *));
static int __dbenv_set_feedback __P((DB_ENV *, void (*)(DB_ENV *, int, int)));
static int __dbenv_set_flags __P((DB_ENV *, u_int32_t, int));
static int __dbenv_set_mutexlocks __P((DB_ENV *, int));
+static void __dbenv_set_noticecall
+ __P((DB_ENV *, void (*)(DB_ENV *, db_notices)));
static int __dbenv_set_paniccall __P((DB_ENV *, void (*)(DB_ENV *, int)));
static int __dbenv_set_recovery_init __P((DB_ENV *, int (*)(DB_ENV *)));
static int __dbenv_set_server_noclnt
@@ -125,6 +127,7 @@ __dbenv_init(dbenv)
dbenv->set_feedback = __dbcl_env_set_feedback;
dbenv->set_flags = __dbcl_env_flags;
dbenv->set_mutexlocks = __dbcl_set_mutex_locks;
+ dbenv->set_noticecall = __dbcl_env_noticecall;
dbenv->set_paniccall = __dbcl_env_paniccall;
dbenv->set_recovery_init = __dbcl_set_recovery_init;
dbenv->set_server = __dbcl_envserver;
@@ -140,6 +143,7 @@ __dbenv_init(dbenv)
dbenv->set_feedback = __dbenv_set_feedback;
dbenv->set_flags = __dbenv_set_flags;
dbenv->set_mutexlocks = __dbenv_set_mutexlocks;
+ dbenv->set_noticecall = __dbenv_set_noticecall;
dbenv->set_paniccall = __dbenv_set_paniccall;
dbenv->set_recovery_init = __dbenv_set_recovery_init;
dbenv->set_server = __dbenv_set_server_noclnt;
@@ -303,6 +307,14 @@ __dbenv_set_feedback(dbenv, feedback)
return (0);
}
+static void
+__dbenv_set_noticecall(dbenv, noticecall)
+ DB_ENV *dbenv;
+ void (*noticecall) __P((DB_ENV *, db_notices));
+{
+ dbenv->db_noticecall = noticecall;
+}
+
static int
__dbenv_set_mutexlocks(dbenv, onoff)
DB_ENV *dbenv;
diff --git a/bdb/include/db.src b/bdb/include/db.src
index 6dc0071efae..bcb9033eed1 100644
--- a/bdb/include/db.src
+++ b/bdb/include/db.src
@@ -249,6 +249,11 @@ struct __db_dbt {
#define DB_REGION_MAGIC 0x120897 /* Environment magic number. */
typedef enum {
+ DB_NOTICE_LOGFILE_CHANGED
+ /* DB_NOTICE_DISK_LOW */
+} db_notices;
+
+typedef enum {
DB_TXN_ABORT,
DB_TXN_BACKWARD_ROLL,
DB_TXN_FORWARD_ROLL,
@@ -267,6 +272,7 @@ struct __db_env {
/* Callbacks. */
void (*db_errcall) __P((const char *, char *));
void (*db_feedback) __P((DB_ENV *, int, int));
+ void (*db_noticecall) __P((DB_ENV *, db_notices));
void (*db_paniccall) __P((DB_ENV *, int));
int (*db_recovery_init) __P((DB_ENV *));
@@ -395,6 +401,7 @@ struct __db_env {
int (*set_feedback) __P((DB_ENV *, void (*)(DB_ENV *, int, int)));
int (*set_flags) __P((DB_ENV *, u_int32_t, int));
int (*set_mutexlocks) __P((DB_ENV *, int));
+ void (*set_noticecall) __P((DB_ENV *, void (*)(DB_ENV *, db_notices)));
int (*set_paniccall) __P((DB_ENV *, void (*)(DB_ENV *, int)));
int (*set_recovery_init) __P((DB_ENV *, int (*)(DB_ENV *)));
int (*set_server) __P((DB_ENV *, char *, long, long, u_int32_t));
diff --git a/bdb/include/log.h b/bdb/include/log.h
index 08c2b8076be..1cac0492252 100644
--- a/bdb/include/log.h
+++ b/bdb/include/log.h
@@ -22,7 +22,7 @@ struct __log_persist; typedef struct __log_persist LOGP;
#define LG_MAX_DEFAULT (10 * MEGABYTE) /* 10 MB. */
#define LG_BSIZE_DEFAULT (32 * 1024) /* 32 KB. */
-#define LG_BASE_REGION_SIZE (60 * 1024) /* 60 KB. */
+#define LG_BASE_REGION_SIZE (480 * 1024) /* 480 KB. */
/*
* The per-process table that maps log file-id's to DB structures.
diff --git a/bdb/log/log_put.c b/bdb/log/log_put.c
index e5cdedb5493..c61f53e6c3d 100644
--- a/bdb/log/log_put.c
+++ b/bdb/log/log_put.c
@@ -143,6 +143,9 @@ __log_put(dbenv, lsn, dbt, flags)
/* Reset the file write offset. */
lp->w_off = 0;
+
+ if (dbenv->db_noticecall != NULL)
+ dbenv->db_noticecall(dbenv, DB_NOTICE_LOGFILE_CHANGED);
} else
lastoff = 0;