diff options
Diffstat (limited to 'bdb/dist')
-rw-r--r-- | bdb/dist/RELEASE | 17 | ||||
-rw-r--r-- | bdb/dist/s_all | 10 | ||||
-rw-r--r-- | bdb/dist/s_crypto | 2 | ||||
-rw-r--r-- | bdb/dist/s_dir | 42 | ||||
-rwxr-xr-x | bdb/dist/s_java | 2 | ||||
-rwxr-xr-x | bdb/dist/s_perm | 2 | ||||
-rwxr-xr-x | bdb/dist/s_recover | 2 | ||||
-rw-r--r-- | bdb/dist/s_rpc | 7 | ||||
-rwxr-xr-x | bdb/dist/s_symlink | 1 | ||||
-rwxr-xr-x | bdb/dist/s_tags | 2 | ||||
-rw-r--r-- | bdb/dist/template/rec_dbreg | 75 | ||||
-rw-r--r-- | bdb/dist/template/rec_fileops | 323 |
12 files changed, 77 insertions, 408 deletions
diff --git a/bdb/dist/RELEASE b/bdb/dist/RELEASE index fe9b6667bbe..61151b8589c 100644 --- a/bdb/dist/RELEASE +++ b/bdb/dist/RELEASE @@ -9,3 +9,20 @@ DB_VERSION_UNIQUE_NAME=`printf "_%d%03d" $DB_VERSION_MAJOR $DB_VERSION_MINOR` DB_RELEASE_DATE=`date "+%B %e, %Y"` DB_VERSION_STRING="Sleepycat Software: Berkeley DB $DB_VERSION: ($DB_RELEASE_DATE)" + +# this file is included by all s_* scripts, so it's the way to apply +# hacks :) + +# bitkeeper doesn't like somebody to mess with permissions! +chmod() +{ + echo "chmod $1 $2" >/dev/null +} + +# useful trick to find auto-generated files +#cmp() +#{ +# echo "==>> CMP $1 $2" >/dev/tty +# /usr/bin/cmp "$1" "$2" +#} + diff --git a/bdb/dist/s_all b/bdb/dist/s_all index c0e3ac72f3a..ee0041032d8 100644 --- a/bdb/dist/s_all +++ b/bdb/dist/s_all @@ -1,7 +1,9 @@ #!/bin/sh - # $Id: s_all,v 1.10 2001/08/04 14:01:44 bostic Exp $ -sh s_perm # permissions. +sh s_dir + +#sh s_perm # permissions. sh s_symlink # symbolic links. sh s_readme # db/README file. @@ -15,7 +17,7 @@ sh s_include # standard include files. sh s_win32 # Win32 include files. sh s_win32_dsp # Win32 build environment. -sh s_vxworks # VxWorks include files. -sh s_java # Java support. +#sh s_vxworks # VxWorks include files. +#sh s_java # Java support. sh s_test # Test suite support. -sh s_tags # Tags files. +#sh s_tags # Tags files. diff --git a/bdb/dist/s_crypto b/bdb/dist/s_crypto index be7e5de0474..f7947cb3e10 100644 --- a/bdb/dist/s_crypto +++ b/bdb/dist/s_crypto @@ -3,6 +3,8 @@ # Remove crypto from the DB source tree. +. ./RELEASE + d=.. t=/tmp/__db_a diff --git a/bdb/dist/s_dir b/bdb/dist/s_dir new file mode 100644 index 00000000000..58513a8321d --- /dev/null +++ b/bdb/dist/s_dir @@ -0,0 +1,42 @@ +#!/bin/sh - + +make_dir() +{ + if test ! -d $1; then + echo "mkdir $1" + mkdir $1 + status=$? + if test $status -ne 0 && test ! -d $1; then + echo "error: $status" + fi + fi +} + +echo "Creating directories..." + +make_dir ../test_server +make_dir ../dbinc_auto +make_dir ../build_vxworks/BerkeleyDB +make_dir ../build_vxworks/db_archive +make_dir ../build_vxworks/db_archive/db_archive +make_dir ../build_vxworks/db_checkpoint +make_dir ../build_vxworks/db_checkpoint/db_checkpoint +make_dir ../build_vxworks/db_deadlock +make_dir ../build_vxworks/db_deadlock/db_deadlock +make_dir ../build_vxworks/db_dump +make_dir ../build_vxworks/db_dump/db_dump +make_dir ../build_vxworks/db_load +make_dir ../build_vxworks/db_load/db_load +make_dir ../build_vxworks/db_printlog +make_dir ../build_vxworks/db_printlog/db_printlog +make_dir ../build_vxworks/db_recover +make_dir ../build_vxworks/db_recover/db_recover +make_dir ../build_vxworks/db_stat +make_dir ../build_vxworks/db_stat/db_stat +make_dir ../build_vxworks/db_upgrade +make_dir ../build_vxworks/db_upgrade/db_upgrade +make_dir ../build_vxworks/db_verify +make_dir ../build_vxworks/db_verify/db_verify +make_dir ../build_vxworks/dbdemo/dbdemo +make_dir ../dbinc_auto + diff --git a/bdb/dist/s_java b/bdb/dist/s_java index 2a65da60a73..f3c856d0532 100755 --- a/bdb/dist/s_java +++ b/bdb/dist/s_java @@ -38,7 +38,7 @@ cmp $t $f > /dev/null 2>&1 || (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f) # Build Db.java. -f=../java/src/com/sleepycat/db/Db.java +f=../java/src/com/sleepycat/db/Db.java.in sed '/BEGIN-JAVA-SPECIAL-CONSTANTS/q' < $f > $t (echo " $msgjava" && for i in `egrep '^DB_.*C$' pubdef.in | awk '{print $1}'`; do \ diff --git a/bdb/dist/s_perm b/bdb/dist/s_perm index 03cc4a35a8a..c35278b8c83 100755 --- a/bdb/dist/s_perm +++ b/bdb/dist/s_perm @@ -4,6 +4,8 @@ d=.. echo 'Updating Berkeley DB source tree permissions...' +. ./RELEASE + run() { echo " $1 ($2)" diff --git a/bdb/dist/s_recover b/bdb/dist/s_recover index 331ae623d3f..869b5bfd363 100755 --- a/bdb/dist/s_recover +++ b/bdb/dist/s_recover @@ -3,6 +3,8 @@ # # Build the automatically generated logging/recovery files. +. ./RELEASE + tmp=/tmp/__db_a loglist=/tmp/__db_b source=/tmp/__db_c diff --git a/bdb/dist/s_rpc b/bdb/dist/s_rpc index 302930068ca..cdafa669d85 100644 --- a/bdb/dist/s_rpc +++ b/bdb/dist/s_rpc @@ -25,14 +25,12 @@ server_file=../rpc_server/c/gen_db_server.c stmpl_file=./template/db_server_proc xdr_file=../rpc_server/db_server.x -# -# NOTE: We do NOT want to remove proc_file. It is what we apply $sed_file -# to, but we do not want to remove it, it does not get built in place. rm -f $client_file \ $ctmpl_file \ $header_file \ $rpcclnt_file \ $rpcsvc_file \ + $proc_file \ $rpcxdr_file \ $sed_file \ $server_file \ @@ -92,8 +90,7 @@ ENDOFSEDTEXT sed -f $t $rpcsvc_file > ${rpcsvc_file}.new mv ${rpcsvc_file}.new $rpcsvc_file -sed -f $sed_file $proc_file > ${proc_file}.new -mv ${proc_file}.new $proc_file +sed -f $sed_file ${proc_file}.in > ${proc_file} # Run rpcgen files through sed to add HAVE_RPC ifdef and appropriate # includes. diff --git a/bdb/dist/s_symlink b/bdb/dist/s_symlink index e69bb57dc46..ee80a220a83 100755 --- a/bdb/dist/s_symlink +++ b/bdb/dist/s_symlink @@ -2,6 +2,7 @@ # $Id: s_symlink,v 1.28 2002/08/18 21:15:45 bostic Exp $ echo 'Creating Berkeley DB source tree symbolic links...' +. ./RELEASE build() { diff --git a/bdb/dist/s_tags b/bdb/dist/s_tags index d5037896443..18b6025aa86 100755 --- a/bdb/dist/s_tags +++ b/bdb/dist/s_tags @@ -3,6 +3,8 @@ # # Build tags files. +. ./RELEASE + files="../dbinc/*.h \ ../dbinc/*.in \ ../btree/*.[ch] \ diff --git a/bdb/dist/template/rec_dbreg b/bdb/dist/template/rec_dbreg deleted file mode 100644 index bbdf19d5ffc..00000000000 --- a/bdb/dist/template/rec_dbreg +++ /dev/null @@ -1,75 +0,0 @@ -#include "db_config.h" - -#ifndef NO_SYSTEM_INCLUDES -#include <sys/types.h> - -#include <string.h> -#endif - -#include "db_int.h" -#include "dbinc/db_page.h" -#include "dbinc/__dbreg.h" -#include "dbinc/log.h" - -/* - * __dbreg_register_recover -- - * Recovery function for register. - * - * PUBLIC: int __dbreg_register_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -__dbreg_register_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - __dbreg_register_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(__dbreg_register_print); - REC_INTRO(__dbreg_register_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - diff --git a/bdb/dist/template/rec_fileops b/bdb/dist/template/rec_fileops deleted file mode 100644 index c1487835ea9..00000000000 --- a/bdb/dist/template/rec_fileops +++ /dev/null @@ -1,323 +0,0 @@ -#include "db_config.h" - -#ifndef NO_SYSTEM_INCLUDES -#include <sys/types.h> - -#include <string.h> -#endif - -#include "db_int.h" -#include "dbinc/db_page.h" -#include "dbinc/__fop.h" -#include "dbinc/log.h" - -/* - * __fop_create_recover -- - * Recovery function for create. - * - * PUBLIC: int __fop_create_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -__fop_create_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - __fop_create_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(__fop_create_print); - REC_INTRO(__fop_create_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - -/* - * __fop_remove_recover -- - * Recovery function for remove. - * - * PUBLIC: int __fop_remove_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -__fop_remove_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - __fop_remove_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(__fop_remove_print); - REC_INTRO(__fop_remove_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - -/* - * __fop_write_recover -- - * Recovery function for write. - * - * PUBLIC: int __fop_write_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -__fop_write_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - __fop_write_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(__fop_write_print); - REC_INTRO(__fop_write_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - -/* - * __fop_rename_recover -- - * Recovery function for rename. - * - * PUBLIC: int __fop_rename_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -__fop_rename_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - __fop_rename_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(__fop_rename_print); - REC_INTRO(__fop_rename_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - -/* - * __fop_file_remove_recover -- - * Recovery function for file_remove. - * - * PUBLIC: int __fop_file_remove_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -__fop_file_remove_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - __fop_file_remove_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(__fop_file_remove_print); - REC_INTRO(__fop_file_remove_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - |