From: <cli...@li...> - 2004-06-23 17:19:40
|
Send clisp-cvs mailing list submissions to cli...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/clisp-cvs or, via email, send a message with subject or body 'help' to cli...@li... You can reach the person managing the list at cli...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of clisp-cvs digest..." CLISP CVS commits for today Today's Topics: 1. clisp/src ChangeLog,1.3231,1.3232 (Sam Steingold) 2. clisp/src time.d,1.38,1.39 genclisph.d,1.128,1.129 ChangeLog,1.3232,1.3233 (Sam Steingold) 3. clisp/src ChangeLog,1.3233,1.3234 (Sam Steingold) 4. clisp/modules/berkeley-db berkeley-db.xml,1.4,1.5 bdb.c,1.18,1.19 (Sam Steingold) 5. clisp/doc unix-ent.xml,1.33,1.34 (Sam Steingold) 6. clisp/modules/syscalls calls.c,1.34,1.35 (Sam Steingold) 7. clisp/src ChangeLog,1.3234,1.3235 (Sam Steingold) 8. clisp/modules/pcre cpcre.c,1.16,1.17 (Sam Steingold) 9. clisp/modules/pcre cpcre.c,1.17,1.18 (Sam Steingold) 10. clisp/src ChangeLog,1.3235,1.3236 (Sam Steingold) 11. clisp/modules/berkeley-db berkeley-db.xml,1.5,1.6 bdb.c,1.19,1.20 (Sam Steingold) 12. clisp/src ChangeLog,1.3236,1.3237 (Sam Steingold) 13. clisp/doc unix-ent.xml,1.34,1.35 (Sam Steingold) 14. clisp/src ChangeLog,1.3237,1.3238 (Sam Steingold) --__--__-- Message: 1 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.3231,1.3232 Date: Wed, 23 Jun 2004 15:07:11 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21346/src Modified Files: ChangeLog Log Message: include "config.h" after "clisp.h" to avoid some warnings Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.3231 retrieving revision 1.3232 diff -u -d -r1.3231 -r1.3232 --- ChangeLog 23 Jun 2004 14:52:07 -0000 1.3231 +++ ChangeLog 23 Jun 2004 15:07:07 -0000 1.3232 @@ -1,6 +1,8 @@ 2004-06-23 Sam Steingold <sd...@gn...> * genclisph.d (main): undef PACKAGE_* to avoid some warnings + * modules/rawsock/rawsock.c: include "config.h" after "clisp.h" + to avoid some warnings 2004-06-06 Bruno Haible <br...@cl...> --__--__-- Message: 2 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/src time.d,1.38,1.39 genclisph.d,1.128,1.129 ChangeLog,1.3232,1.3233 Date: Wed, 23 Jun 2004 15:11:00 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22042/src Modified Files: time.d genclisph.d ChangeLog Log Message: (convert_time_from_universal): new function Index: time.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/time.d,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- time.d 31 Mar 2004 12:23:53 -0000 1.38 +++ time.d 23 Jun 2004 15:10:57 -0000 1.39 @@ -414,6 +414,10 @@ we can assume that the OS's timezone and CLISP's timezone agree. */ return UL_to_I(UNIX_LISP_TIME_DIFF + (uintL)(*time)); } +global void convert_time_from_universal (object universal, time_t* time) +{ + *time = I_to_UL(universal) - UNIX_LISP_TIME_DIFF; +} #endif #if defined(WIN32_NATIVE) Index: genclisph.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/genclisph.d,v retrieving revision 1.128 retrieving revision 1.129 diff -u -d -r1.128 -r1.129 --- genclisph.d 23 Jun 2004 14:52:03 -0000 1.128 +++ genclisph.d 23 Jun 2004 15:10:57 -0000 1.129 @@ -2026,6 +2026,7 @@ #if defined(UNIX) printf("#include <time.h>\n"); printf("extern object convert_time_to_universal (const time_t* time);\n"); + printf("extern void convert_time_from_universal (object universal, time_t* time);\n"); #endif #if defined(UNIX_CYGWIN32) printf("#include <windows.h>\n"); Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.3232 retrieving revision 1.3233 diff -u -d -r1.3232 -r1.3233 --- ChangeLog 23 Jun 2004 15:07:07 -0000 1.3232 +++ ChangeLog 23 Jun 2004 15:10:57 -0000 1.3233 @@ -1,5 +1,10 @@ 2004-06-23 Sam Steingold <sd...@gn...> + * time.d (convert_time_from_universal): new function + * genclisph.d (main): export it + +2004-06-23 Sam Steingold <sd...@gn...> + * genclisph.d (main): undef PACKAGE_* to avoid some warnings * modules/rawsock/rawsock.c: include "config.h" after "clisp.h" to avoid some warnings --__--__-- Message: 3 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.3233,1.3234 Date: Wed, 23 Jun 2004 15:16:44 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23067/src Modified Files: ChangeLog Log Message: (ENV-SET-OPTIONS, ENV-GET-OPTIONS): accept :TX_TIMESTAMP and :TX_MAX (BDB:TXN-ID): new function Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.3233 retrieving revision 1.3234 diff -u -d -r1.3233 -r1.3234 --- ChangeLog 23 Jun 2004 15:10:57 -0000 1.3233 +++ ChangeLog 23 Jun 2004 15:16:42 -0000 1.3234 @@ -2,6 +2,9 @@ * time.d (convert_time_from_universal): new function * genclisph.d (main): export it + * modules/berkeley-db/bdb.c (ENV-SET-OPTIONS, ENV-GET-OPTIONS): + accept :TX_TIMESTAMP and :TX_MAX + (BDB:TXN-ID): new function 2004-06-23 Sam Steingold <sd...@gn...> --__--__-- Message: 4 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/modules/berkeley-db berkeley-db.xml,1.4,1.5 bdb.c,1.18,1.19 Date: Wed, 23 Jun 2004 15:16:44 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/modules/berkeley-db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23067/modules/berkeley-db Modified Files: berkeley-db.xml bdb.c Log Message: (ENV-SET-OPTIONS, ENV-GET-OPTIONS): accept :TX_TIMESTAMP and :TX_MAX (BDB:TXN-ID): new function Index: bdb.c =================================================================== RCS file: /cvsroot/clisp/clisp/modules/berkeley-db/bdb.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- bdb.c 23 Jun 2004 14:29:15 -0000 1.18 +++ bdb.c 23 Jun 2004 15:16:42 -0000 1.19 @@ -269,7 +269,7 @@ *(nullp(arg) ? flag_off : flag_on) |= values; } -DEFUN(BDB:ENV-SET-OPTIONS, dbe &key :DATA_DIR :TMP_DIR \ +DEFUN(BDB:ENV-SET-OPTIONS, dbe &key :TX_TIMESTAMP :TX_MAX :DATA_DIR :TMP_DIR \ :AUTO_COMMIT :CDB_ALLDB :DIRECT_DB :DIRECT_LOG :NOLOCKING \ :NOMMAP :NOPANIC :OVERWRITE :PANIC_ENVIRONMENT :REGION_INIT \ :TXN_NOSYNC :TXN_WRITE_NOSYNC :YIELDCPU \ @@ -306,16 +306,27 @@ set_flags(popSTACK(),&flags_on,&flags_off,DB_AUTO_COMMIT); if (flags_off) SYSCALL(dbe->set_flags,(dbe,flags_off,0)); if (flags_on) SYSCALL(dbe->set_flags,(dbe,flags_on,1)); - /* tmp-dir */ + /* TMP_DIR */ if (!missingp(STACK_0)) { with_string_0(check_string(popSTACK()),GLO(misc_encoding),tmp_dir, { SYSCALL(dbe->set_tmp_dir,(dbe,tmp_dir)); }); } else skipSTACK(1); - /* data-dir */ + /* DATA_DIR */ if (!missingp(STACK_0)) { with_string_0(check_string(popSTACK()),GLO(misc_encoding),data_dir, { SYSCALL(dbe->set_data_dir,(dbe,data_dir)); }); } else skipSTACK(1); + /* TX_MAX */ + if (!missingp(STACK_0)) + SYSCALL(dbe->set_tx_max,(dbe,posfixnum_to_L(check_posfixnum(STACK_0)))); + skipSTACK(1); + /* TX_TIMESTAMP */ + if (!missingp(STACK_0)) { + time_t timestamp; + convert_time_from_universal(STACK_0,×tamp); + SYSCALL(dbe->set_tx_timestamp,(dbe,×tamp)); + } + skipSTACK(1); VALUES0; skipSTACK(1); /* skip dbe */ } @@ -353,7 +364,16 @@ return listof(ii); } else return NIL; } - +static object env_tx_max (DB_ENV *dbe) { + u_int32_t tx_max; + SYSCALL(dbe->get_tx_max,(dbe,&tx_max)); + return fixnum(tx_max); +} +static object env_tx_timestamp (DB_ENV *dbe) { + time_t tx_timestamp; + SYSCALL(dbe->get_tx_timestamp,(dbe,&tx_timestamp)); + return convert_time_to_universal(&tx_timestamp); +} DEFUNR(BDB:ENV-GET-OPTIONS, dbe &optional what) { object what = popSTACK(); DB_ENV *dbe = object_handle(popSTACK(),`BDB::ENV`,false); @@ -377,13 +397,12 @@ if (flags & DB_CDB_ALLDB) { pushSTACK(`:CDB_ALLDB`); count++; } if (flags & DB_AUTO_COMMIT) { pushSTACK(`:AUTO_COMMIT`); count++; } value1 = listof(count); pushSTACK(value1); /* save */ - pushSTACK(fixnum(flags)); /* raw flags too! */ } - /* tmp-dir */ - pushSTACK(env_tmp_dir(dbe)); - /* data-dir */ - value1 = env_data_dirs(dbe); pushSTACK(value1); - funcall(L(values),5); + pushSTACK(env_tx_timestamp(dbe)); /* TX_TIMESTAMP */ + pushSTACK(env_tx_max(dbe)); /* TX_MAX */ + pushSTACK(env_tmp_dir(dbe)); /* TMP_DIR */ + value1 = env_data_dirs(dbe); pushSTACK(value1); /* DATA_DIR */ + funcall(L(values),6); } else if (eq(what,S(Kverbose))) { VALUES1(env_verbose(dbe)); } else if (eq(what,`:VERB_WAITSFOR`)) { @@ -454,6 +473,10 @@ u_int32_t flags; SYSCALL(dbe->get_flags,(dbe,&flags)); VALUES_IF(flags & DB_AUTO_COMMIT); + } else if (eq(what,`:TX_TIMESTAMP`)) { + VALUES1(env_tx_timestamp(dbe)); + } else if (eq(what,`:TX_MAX`)) { + VALUES1(env_tx_max(dbe)); } else if (eq(what,`:DATA_DIR`)) { VALUES1(env_data_dirs(dbe)); } else if (eq(what,`:TMP_DIR`)) { @@ -878,7 +901,6 @@ /* ===== transactions ===== */ /* not exported: - DB_TXN->id Return a transaction's ID DB_TXN->prepare Prepare a transaction for commit DB_TXN->set_timeout Set transaction timeout */ @@ -917,4 +939,10 @@ VALUES0; } - +DEFUN(BDB:TXN-ID, txn) +{ /* Return the transaction's ID */ + DB_TXN *txn = object_handle(popSTACK(),`BDB::TXN`,true); + u_int32_t id; + begin_system_call(); id = txn->id(txn); end_system_call(); + VALUES1(UL_to_I(id)); +} Index: berkeley-db.xml =================================================================== RCS file: /cvsroot/clisp/clisp/modules/berkeley-db/berkeley-db.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- berkeley-db.xml 23 Jun 2004 14:29:01 -0000 1.4 +++ berkeley-db.xml 23 Jun 2004 15:16:42 -0000 1.5 @@ -45,14 +45,15 @@ <section id="bdb-environment-config"><title>Environment Configuration</title> <variablelist> -<varlistentry><term><literal role="sexp">(BDB:ENV-SET-OPTIONS dbe - &key-amp; DATA_DIR TMP_DIR AUTO_COMMIT CDB_ALLDB DIRECT_DB +<varlistentry><term><literal role="sexp">(BDB:ENV-SET-OPTIONS dbe &key-amp; + TX_TIMESTAMP TX_MAX DATA_DIR TMP_DIR AUTO_COMMIT CDB_ALLDB DIRECT_DB DIRECT_LOG NOLOCKING NOMMAP NOPANIC OVERWRITE PANIC_ENVIRONMENT REGION_INIT TXN_NOSYNC TXN_WRITE_NOSYNC YIELDCPU VERB_CHKPOINT VERB_DEADLOCK VERB_RECOVERY VERB_REPLICATION VERB_WAITSFOR VERBOSE)</literal></term> <listitem><simpara>Set some environment options using &DBE_set_flags;, - &DBE_set_verbose;, &DBE_set_tmp_dir; and &DBE_set_data_dir;. + &DBE_set_verbose;, &DBE_set_tmp_dir;, &DBE_set_data_dir;, + &DBE_set_tx_max;, &DBE_set_tx_timestamp;. </simpara></listitem></varlistentry> <varlistentry><term><literal role="sexp">(BDB:ENV-GET-OPTIONS dbe &optional-amp; what)</literal></term> @@ -61,15 +62,22 @@ <varlistentry><term>missing</term><term>&nil;</term> <listitem><simpara>all options as multiple values </simpara></listitem></varlistentry> + <varlistentry><term><constant>:TX_TIMESTAMP</constant></term> + <listitem><simpara>Recover to the time specified by timestamp + rather than to the most current possible date + (&DBE_get_tx_timestamp;)</simpara></listitem></varlistentry> + <varlistentry><term><constant>:TX_MAX</constant></term> + <listitem><simpara>the number of active transactions + (&DBE_set_tx_max;)</simpara></listitem></varlistentry> <varlistentry><term><constant>:DATA_DIR</constant></term> - <listitem><simpara>list of data directories + <listitem><simpara>list of data directories (&DBE_get_data_dir;) </simpara></listitem></varlistentry> <varlistentry><term><constant>:TMP_DIR</constant></term> - <listitem><simpara>temporary directory (may be &nil;) - </simpara></listitem></varlistentry> + <listitem><simpara>temporary directory (&DBE_get_tmp_dir;). + May be &nil;.</simpara></listitem></varlistentry> <varlistentry><term>&verbose-k;</term> <listitem><simpara>the &list-t; of verbosity settings - </simpara></listitem></varlistentry> + (&DBE_get_verbose;).</simpara></listitem></varlistentry> <varlistentry><term><constant>:AUTO_COMMIT</constant></term> <term><constant>:CDB_ALLDB</constant></term> <term><constant>:DIRECT_DB</constant></term> @@ -89,7 +97,8 @@ <term><constant>:VERB_REPLICATION</constant></term> <term><constant>:VERB_WAITSFOR</constant></term> <listitem><simpara>a &boolean-t; indicator of whether this - option is set or not</simpara></listitem></varlistentry> + option is set or not (&DBE_get_verbose; and &DBE_get_flags;). + </simpara></listitem></varlistentry> </variablelist></para></listitem></varlistentry> </variablelist> </section> @@ -389,6 +398,9 @@ <varlistentry><term><literal role="sexp">(BDB:TXN-DISCARD txn)</literal></term> <listitem><simpara>Discard a transaction (&TXN_discard;). </simpara></listitem></varlistentry> +<varlistentry><term><literal role="sexp">(BDB:TXN-ID txn)</literal></term> + <listitem><simpara>Return the transaction's ID (&TXN_id;). +</simpara></listitem></varlistentry> </variablelist> </section> --__--__-- Message: 5 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/doc unix-ent.xml,1.33,1.34 Date: Wed, 23 Jun 2004 15:16:45 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23067/doc Modified Files: unix-ent.xml Log Message: (ENV-SET-OPTIONS, ENV-GET-OPTIONS): accept :TX_TIMESTAMP and :TX_MAX (BDB:TXN-ID): new function Index: unix-ent.xml =================================================================== RCS file: /cvsroot/clisp/clisp/doc/unix-ent.xml,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- unix-ent.xml 21 Jun 2004 21:08:38 -0000 1.33 +++ unix-ent.xml 23 Jun 2004 15:16:42 -0000 1.34 @@ -119,11 +119,19 @@ <!ENTITY DBE_open "<ulink url='&bdb;env_open.html'><function>DB_ENV->open</function></ulink>"> <!ENTITY DBE_remove "<ulink url='&bdb;env_remove.html'><function>DB_ENV->remove</function></ulink>"> <!ENTITY DBE_set_data_dir "<ulink url='&bdb;env_set_data_dir.html'><function>DB_ENV->set_data_dir</function></ulink>"> +<!ENTITY DBE_get_data_dir "<ulink url='&bdb;env_set_data_dir.html'><function>DB_ENV->get_data_dir</function></ulink>"> <!ENTITY DBE_set_encrypt "<ulink url='&bdb;env_set_encrypt.html'><function>DB_ENV->set_encrypt</function></ulink>"> <!ENTITY DBE_set_flags "<ulink url='&bdb;env_set_flags.html'><function>DB_ENV->set_flags</function></ulink>"> +<!ENTITY DBE_get_flags "<ulink url='&bdb;env_set_flags.html'><function>DB_ENV->get_flags</function></ulink>"> <!ENTITY DBE_set_rpc_server "<ulink url='&bdb;env_set_rpc_server.html'><function>DB_ENV->set_rpc_server</function></ulink>"> <!ENTITY DBE_set_tmp_dir "<ulink url='&bdb;env_set_tmp_dir.html'><function>DB_ENV->set_tmp_dir</function></ulink>"> +<!ENTITY DBE_get_tmp_dir "<ulink url='&bdb;env_set_tmp_dir.html'><function>DB_ENV->get_tmp_dir</function></ulink>"> <!ENTITY DBE_set_verbose "<ulink url='&bdb;env_set_verbose.html'><function>DB_ENV->set_verbose</function></ulink>"> +<!ENTITY DBE_get_verbose "<ulink url='&bdb;env_set_verbose.html'><function>DB_ENV->get_verbose</function></ulink>"> +<!ENTITY DBE_set_tx_max "<ulink url='&bdb;env_set_tx_max.html'><function>DB_ENV->set_tx_max</function></ulink>"> +<!ENTITY DBE_get_tx_max "<ulink url='&bdb;env_set_tx_max.html'><function>DB_ENV->get_tx_max</function></ulink>"> +<!ENTITY DBE_set_tx_timestamp "<ulink url='&bdb;env_set_tx_timestamp.html'><function>DB_ENV->set_tx_timestamp</function></ulink>"> +<!ENTITY DBE_get_tx_timestamp "<ulink url='&bdb;env_set_tx_timestamp.html'><function>DB_ENV->get_tx_timestamp</function></ulink>"> <!ENTITY db_create "<ulink url='&bdb;db_create.html'><function>db_create</function></ulink>"> <!ENTITY DB_close "<ulink url='&bdb;db_close.html'><function>DB->close</function></ulink>"> <!ENTITY DB_del "<ulink url='&bdb;db_del.html'><function>DB->del</function></ulink>"> --__--__-- Message: 6 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/modules/syscalls calls.c,1.34,1.35 Date: Wed, 23 Jun 2004 16:13:51 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/modules/syscalls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5005/modules/syscalls Modified Files: calls.c Log Message: include "config.h" after "clisp.h" to avoid some warnings Index: calls.c =================================================================== RCS file: /cvsroot/clisp/clisp/modules/syscalls/calls.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- calls.c 14 May 2004 20:14:26 -0000 1.34 +++ calls.c 23 Jun 2004 16:13:48 -0000 1.35 @@ -4,8 +4,6 @@ * GPL2 */ -#include "config.h" - #if defined(_WIN32) /* need this for CreateHardLink to work */ # define WINVER 0x0500 @@ -18,6 +16,7 @@ #endif #include "clisp.h" +#include "config.h" #if defined(TIME_WITH_SYS_TIME) # include <sys/time.h> --__--__-- Message: 7 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.3234,1.3235 Date: Wed, 23 Jun 2004 16:13:50 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5005/src Modified Files: ChangeLog Log Message: include "config.h" after "clisp.h" to avoid some warnings Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.3234 retrieving revision 1.3235 diff -u -d -r1.3234 -r1.3235 --- ChangeLog 23 Jun 2004 15:16:42 -0000 1.3234 +++ ChangeLog 23 Jun 2004 16:13:45 -0000 1.3235 @@ -11,6 +11,8 @@ * genclisph.d (main): undef PACKAGE_* to avoid some warnings * modules/rawsock/rawsock.c: include "config.h" after "clisp.h" to avoid some warnings + * modules/syscalls/calls.c: ditto + * modules/pcre/cpcre.c: ditto 2004-06-06 Bruno Haible <br...@cl...> --__--__-- Message: 8 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/modules/pcre cpcre.c,1.16,1.17 Date: Wed, 23 Jun 2004 16:13:51 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/modules/pcre In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5005/modules/pcre Modified Files: cpcre.c Log Message: include "config.h" after "clisp.h" to avoid some warnings Index: cpcre.c =================================================================== RCS file: /cvsroot/clisp/clisp/modules/pcre/cpcre.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- cpcre.c 14 May 2004 02:51:05 -0000 1.16 +++ cpcre.c 23 Jun 2004 16:13:49 -0000 1.17 @@ -5,7 +5,9 @@ * GPL2 */ +#include "clisp.h" #include "config.h" + #if defined(HAVE_PCRE_H) # include <pcre.h> #elif defined(HAVE_PCRE_PCRE_H) @@ -14,8 +16,6 @@ # error No PCRE headers! #endif -#include "clisp.h" - #ifndef FOREIGN #error FOREIGN is not defined. #error REGEXP needs a CLISP built with the foreign pointer datatype support. --__--__-- Message: 9 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/modules/pcre cpcre.c,1.17,1.18 Date: Wed, 23 Jun 2004 16:29:42 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/modules/pcre In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8517/modules/pcre Modified Files: cpcre.c Log Message: (PCRE:PCRE-EXEC): signal an error instead of crashing on a pcre library bug Index: cpcre.c =================================================================== RCS file: /cvsroot/clisp/clisp/modules/pcre/cpcre.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- cpcre.c 23 Jun 2004 16:13:49 -0000 1.17 +++ cpcre.c 23 Jun 2004 16:29:40 -0000 1.18 @@ -348,6 +348,7 @@ ovector,ovector_size); end_system_call(); }); + if (ovector == NULL) fehler(error,"internal pcre library bug: pcre_exec/alloca interaction; report it to http://pcre.org"); if (ret == PCRE_ERROR_NOMATCH) VALUES1(NIL); else if (ret > 0) { if (bool_p) VALUES1(T); /* success indicator */ --__--__-- Message: 10 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.3235,1.3236 Date: Wed, 23 Jun 2004 16:29:42 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8517/src Modified Files: ChangeLog Log Message: (PCRE:PCRE-EXEC): signal an error instead of crashing on a pcre library bug Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.3235 retrieving revision 1.3236 diff -u -d -r1.3235 -r1.3236 --- ChangeLog 23 Jun 2004 16:13:45 -0000 1.3235 +++ ChangeLog 23 Jun 2004 16:29:39 -0000 1.3236 @@ -1,5 +1,10 @@ 2004-06-23 Sam Steingold <sd...@gn...> + * modules/pcre/cpcre.c (PCRE:PCRE-EXEC): signal an error + instead of crashing on a pcre library bug + +2004-06-23 Sam Steingold <sd...@gn...> + * time.d (convert_time_from_universal): new function * genclisph.d (main): export it * modules/berkeley-db/bdb.c (ENV-SET-OPTIONS, ENV-GET-OPTIONS): --__--__-- Message: 11 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/modules/berkeley-db berkeley-db.xml,1.5,1.6 bdb.c,1.19,1.20 Date: Wed, 23 Jun 2004 16:40:50 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/modules/berkeley-db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10826/modules/berkeley-db Modified Files: berkeley-db.xml bdb.c Log Message: (ENV-GET-OPTIONS): accept :DB_XIDDATASIZE (check_byte_vector): new function (fill_dbt): use it (TXN-CHECKPOINT, TXN-PREPARE, TXN-RECOVER): new functions Index: bdb.c =================================================================== RCS file: /cvsroot/clisp/clisp/modules/berkeley-db/bdb.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- bdb.c 23 Jun 2004 15:16:42 -0000 1.19 +++ bdb.c 23 Jun 2004 16:40:48 -0000 1.20 @@ -481,6 +481,8 @@ VALUES1(env_data_dirs(dbe)); } else if (eq(what,`:TMP_DIR`)) { VALUES1(env_tmp_dir(dbe)); + } else if (eq(what,`:DB_XIDDATASIZE`)) { + VALUES1(fixnum(DB_XIDDATASIZE)); } else { pushSTACK(NIL); /* no PLACE */ pushSTACK(what); pushSTACK(TheSubr(subr_self)->name); @@ -529,20 +531,31 @@ p_dbt->flags = flags; } -/* fill a DBT with contents of obj (a byte vector) +/* ensure that the return value is a byte vector of specified length can trigger GC */ -static void fill_dbt (object obj, DBT* key) -{ - unsigned long idx = 0; - while (!bit_vector_p(Atype_8Bit,obj)) { +static object check_byte_vector (object obj, int length) { + while (!bit_vector_p(Atype_8Bit,obj) + && (length<0 || length!=vector_length(obj))) { pushSTACK(NIL); /* no PLACE */ pushSTACK(obj); /* TYPE-ERROR slot DATUM */ pushSTACK(GLO(type_uint8_vector)); /* TYPE-ERROR slot EXPECTED-TYPE */ pushSTACK(GLO(type_uint8_vector)); pushSTACK(obj); pushSTACK(TheSubr(subr_self)->name); - check_value(type_error,GETTEXT("~S: ~S is not a vector of type ~S")); + if (length >= 0) { + pushSTACK(fixnum(length)); + check_value(type_error,GETTEXT("~S: ~S is not a vector of type ~S and length ~S")); + } else check_value(type_error,GETTEXT("~S: ~S is not a vector of type ~S")); obj = value1; } + return obj; +} + +/* fill a DBT with contents of obj (a byte vector) + can trigger GC */ +static void fill_dbt (object obj, DBT* key) +{ + unsigned long idx = 0; + obj = check_byte_vector(obj,-1); init_dbt(key,DB_DBT_USERMEM); key->ulen = key->size = vector_length(obj); obj = array_displace_check(obj,key->size,&idx); @@ -946,3 +959,59 @@ begin_system_call(); id = txn->id(txn); end_system_call(); VALUES1(UL_to_I(id)); } + +DEFFLAGSET(txn_checkpoint_flags, DB_FORCE) +DEFUN(BDB:TXN-CHECKPOINT, dbe &key :KBYTE :MIN :FORCE) +{ /* flush the underlying memory pool, write a checkpoint record to the + log, and then flush the log. */ + u_int32_t flags = txn_checkpoint_flags(); + u_int32_t min = posfixnum_default(popSTACK()); + u_int32_t kbyte = posfixnum_default(popSTACK()); + DB_ENV *dbe = object_handle(popSTACK(),`BDB::DBE`,true); + SYSCALL(dbe->txn_checkpoint,(dbe,kbyte,min,flags)); + VALUES0; +} + +DEFUN(BDB:TXN-PREPARE, txn gid) +{ /* initiate the beginning of a two-phase commit */ + DB_TXN *txn; + unsigned long idx; + STACK_0 = check_byte_vector(STACK_0,DB_XIDDATASIZE); + txn = object_handle(STACK_1,`BDB::TXN`,true); + STACK_0 = array_displace_check(STACK_0,DB_XIDDATASIZE,&idx); + SYSCALL(txn->prepare,(txn,TheSbvector(STACK_0)->data+idx)); + VALUES0; skipSTACK(2); +} + +DEFFLAGSET(txn_recover_flags, DB_FIRST DB_NEXT) +DEFUN(BDB:TXN-RECOVER, dbe &key :FIRST :NEXT) +{ /* return a list of prepared but not yet resolved transactions */ + u_int32_t flags = txn_recover_flags(); + DB_ENV *dbe = object_handle(popSTACK(),`BDB::DBE`,true); + u_int32_t tx_max; + DB_PREPLIST *preplist; + int status, ii; + long retnum; + SYSCALL(dbe->get_tx_max,(dbe,&tx_max)); + preplist = my_malloc(tx_max * sizeof(DB_PREPLIST)); + begin_system_call(); + status = dbe->txn_recover(dbe,preplist,tx_max,&retnum,flags); + if (status) { + free(preplist); end_system_call(); + error_bdb(status,"dbe->txn_recover"); + } + end_system_call(); + for (ii=0; ii<retnum; ii++) { + pushSTACK(allocate_fpointer(preplist[ii].txn)); + funcall(`BDB::MKTXN`,1); pushSTACK(value1); + pushSTACK(allocate_bit_vector(Atype_8Bit,DB_XIDDATASIZE)); + begin_system_call(); + memcpy(TheSbvector(STACK_0)->data,preplist[ii].gid,DB_XIDDATASIZE); + end_system_call(); + value1 = allocate_cons(); + Cdr(value1) = popSTACK(); /* gid */ + Car(value1) = popSTACK(); /* txn */ + pushSTACK(value1); /* (TXN . GID) */ + } + VALUES1(listof(retnum)); +} Index: berkeley-db.xml =================================================================== RCS file: /cvsroot/clisp/clisp/modules/berkeley-db/berkeley-db.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- berkeley-db.xml 23 Jun 2004 15:16:42 -0000 1.5 +++ berkeley-db.xml 23 Jun 2004 16:40:48 -0000 1.6 @@ -99,6 +99,9 @@ <listitem><simpara>a &boolean-t; indicator of whether this option is set or not (&DBE_get_verbose; and &DBE_get_flags;). </simpara></listitem></varlistentry> + <varlistentry><term><constant>:DB_XIDDATASIZE</constant></term> + <listitem><simpara>the &length; of the globally unique + &unsigned-byte-vector; which must be passed to &TXN_prepare;. </variablelist></para></listitem></varlistentry> </variablelist> </section> @@ -132,7 +135,7 @@ CONSUME CONSUME_WAIT DIRTY_READ RMW TRANSACTION (ERROR &t;))</literal></term> <listitem><simpara>Get items from a database (&DB_get;). - If &error-k: is &nil; and the record is not found, no &err-sig;, + If &error-k; is &nil; and the record is not found, no &err-sig;, instead <constant>:NOTFOUND</constant> is returned. </simpara></listitem></varlistentry> <varlistentry><term><literal role="sexp">(BDB:DB-PUT db key val @@ -264,7 +267,7 @@ <varlistentry><term><literal role="sexp">(BDB:CURSOR-GET cursor key data flag &key-amp; (ERROR &t;))</literal></term> <listitem><simpara>Retrieve by cursor (&DBC_get;). - If &error-k: is &nil; and the record is not found, no &err-sig;, + If &error-k; is &nil; and the record is not found, no &err-sig;, instead <constant>:NOTFOUND</constant> is returned. </simpara></listitem></varlistentry> <varlistentry><term><literal role="sexp">(BDB:CURSOR-PUT @@ -401,8 +404,19 @@ <varlistentry><term><literal role="sexp">(BDB:TXN-ID txn)</literal></term> <listitem><simpara>Return the transaction's ID (&TXN_id;). </simpara></listitem></varlistentry> -</variablelist> -</section> +<varlistentry><term><literal role="sexp">(BDB:TXN-CHECKPOINT dbe + &key-amp; KBYTE MIN FORCE)</literal></term> + <listitem><simpara>Checkpoint the transaction subsystem + (&DBE_txn_checkpoint;).</simpara></listitem></varlistentry> +<varlistentry><term><literal role="sexp">(BDB:TXN-PREPARE txn + id)</literal></term> + <listitem><simpara>initiate the beginning of a two-phase commit + (&TXN_prepare;).</simpara></listitem></varlistentry> +<varlistentry><term><literal role="sexp">(BDB:TXN-RECOVER dbe &key-amp; + FIRST NEXT)</literal></term> + <listitem><simpara>return a list of prepared but not yet resolved + transactions (&DBE_txn_recover;)</simpara></listitem></varlistentry> +</variablelist></section> <section id="bdb-replication"><title>Replication</title> --__--__-- Message: 12 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.3236,1.3237 Date: Wed, 23 Jun 2004 16:40:50 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10826/src Modified Files: ChangeLog Log Message: (ENV-GET-OPTIONS): accept :DB_XIDDATASIZE (check_byte_vector): new function (fill_dbt): use it (TXN-CHECKPOINT, TXN-PREPARE, TXN-RECOVER): new functions Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.3236 retrieving revision 1.3237 diff -u -d -r1.3236 -r1.3237 --- ChangeLog 23 Jun 2004 16:29:39 -0000 1.3236 +++ ChangeLog 23 Jun 2004 16:40:47 -0000 1.3237 @@ -1,5 +1,12 @@ 2004-06-23 Sam Steingold <sd...@gn...> + * modules/berkeley-db/bdb.c (ENV-GET-OPTIONS): accept :DB_XIDDATASIZE + (check_byte_vector): new function + (fill_dbt): use it + (TXN-CHECKPOINT, TXN-PREPARE, TXN-RECOVER): new functions + +2004-06-23 Sam Steingold <sd...@gn...> + * modules/pcre/cpcre.c (PCRE:PCRE-EXEC): signal an error instead of crashing on a pcre library bug --__--__-- Message: 13 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/doc unix-ent.xml,1.34,1.35 Date: Wed, 23 Jun 2004 16:40:50 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10826/doc Modified Files: unix-ent.xml Log Message: (ENV-GET-OPTIONS): accept :DB_XIDDATASIZE (check_byte_vector): new function (fill_dbt): use it (TXN-CHECKPOINT, TXN-PREPARE, TXN-RECOVER): new functions Index: unix-ent.xml =================================================================== RCS file: /cvsroot/clisp/clisp/doc/unix-ent.xml,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- unix-ent.xml 23 Jun 2004 15:16:42 -0000 1.34 +++ unix-ent.xml 23 Jun 2004 16:40:48 -0000 1.35 @@ -132,6 +132,7 @@ <!ENTITY DBE_get_tx_max "<ulink url='&bdb;env_set_tx_max.html'><function>DB_ENV->get_tx_max</function></ulink>"> <!ENTITY DBE_set_tx_timestamp "<ulink url='&bdb;env_set_tx_timestamp.html'><function>DB_ENV->set_tx_timestamp</function></ulink>"> <!ENTITY DBE_get_tx_timestamp "<ulink url='&bdb;env_set_tx_timestamp.html'><function>DB_ENV->get_tx_timestamp</function></ulink>"> +<!ENTITY DBE_txn_checkpoint "<ulink url='&bdb;txn_checkpoint.html'><function>DB_ENV->txn_checkpoint</function></ulink>"> <!ENTITY db_create "<ulink url='&bdb;db_create.html'><function>db_create</function></ulink>"> <!ENTITY DB_close "<ulink url='&bdb;db_close.html'><function>DB->close</function></ulink>"> <!ENTITY DB_del "<ulink url='&bdb;db_del.html'><function>DB->del</function></ulink>"> --__--__-- Message: 14 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.3237,1.3238 Date: Wed, 23 Jun 2004 17:04:40 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15384/src Modified Files: ChangeLog Log Message: (TXN-SET-TIMEOUT): new function Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.3237 retrieving revision 1.3238 diff -u -d -r1.3237 -r1.3238 --- ChangeLog 23 Jun 2004 16:40:47 -0000 1.3237 +++ ChangeLog 23 Jun 2004 17:04:37 -0000 1.3238 @@ -3,7 +3,8 @@ * modules/berkeley-db/bdb.c (ENV-GET-OPTIONS): accept :DB_XIDDATASIZE (check_byte_vector): new function (fill_dbt): use it - (TXN-CHECKPOINT, TXN-PREPARE, TXN-RECOVER): new functions + (TXN-CHECKPOINT, TXN-PREPARE, TXN-RECOVER, TXN-SET-TIMEOUT): + new functions 2004-06-23 Sam Steingold <sd...@gn...> --__--__-- _______________________________________________ clisp-cvs mailing list cli...@li... https://lists.sourceforge.net/lists/listinfo/clisp-cvs End of clisp-cvs Digest |