From blee at common-lisp.net Fri Oct 8 00:53:04 2004 From: blee at common-lisp.net (blee at common-lisp.net) Date: Fri, 08 Oct 2004 02:53:04 +0200 Subject: [elephant-cvs] CVS update: elephant/src/libsleepycat.c Message-ID: Update of /project/elephant/cvsroot/elephant/src In directory common-lisp.net:/tmp/cvs-serv6453/src Modified Files: libsleepycat.c Log Message: win32 fixes (thanks to Bill Clementson) Date: Fri Oct 8 02:53:04 2004 Author: blee Index: elephant/src/libsleepycat.c diff -u elephant/src/libsleepycat.c:1.9 elephant/src/libsleepycat.c:1.10 --- elephant/src/libsleepycat.c:1.9 Sun Sep 19 19:50:22 2004 +++ elephant/src/libsleepycat.c Fri Oct 8 02:53:04 2004 @@ -55,6 +55,8 @@ ;;; */ +#include + /* Pointer arithmetic utility functions */ /* should these be in network-byte order? probably not..... */ int read_int(char *buf, int offset) { @@ -101,8 +103,6 @@ return p + offset; } -#include - void copy_buf(char *dest, int dest_offset, char *src, int src_offset, int length) { memcpy(dest + dest_offset, src + src_offset, length); @@ -226,6 +226,10 @@ #include double read_num(char *buf); +int case_cmp(const char *a, int32_t length1, const char *b, int32_t length2); +int utf16_cmp(const char *s1, int32_t length1, + const char *s2, int32_t length2); +int lex_cmp(const char *a, int32_t length1, const char *b, int32_t length2); /* Inspired by the Sleepycat docs. We have to memcpy to insure memory alignment. */ @@ -320,6 +324,7 @@ } return result; case 7: + default: switch ((++buf)[0]) { case 1: result = (double)read_int(++buf, 0); @@ -334,6 +339,7 @@ } break; case 6: + default: result = 0; buf += 5; limit = buf + read_uint(buf, -4); @@ -355,6 +361,7 @@ } return result / denom; case 6: + default: denom = 0; buf += 5; limit = buf + read_uint(buf, -4); @@ -365,6 +372,11 @@ } } } + +#ifdef WIN32 +#define strncasecmp _strnicmp +typedef unsigned short uint16_t; +#endif int case_cmp(const char *a, int32_t length1, const char *b, int32_t length2) { int min, sizediff, diff; From blee at common-lisp.net Fri Oct 8 00:53:06 2004 From: blee at common-lisp.net (blee at common-lisp.net) Date: Fri, 08 Oct 2004 02:53:06 +0200 Subject: [elephant-cvs] CVS update: elephant/NEWS elephant/INSTALL elephant/CREDITS Message-ID: Update of /project/elephant/cvsroot/elephant In directory common-lisp.net:/tmp/cvs-serv6453 Modified Files: NEWS INSTALL CREDITS Log Message: win32 fixes (thanks to Bill Clementson) Date: Fri Oct 8 02:53:04 2004 Author: blee Index: elephant/NEWS diff -u elephant/NEWS:1.5 elephant/NEWS:1.6 --- elephant/NEWS:1.5 Sun Sep 19 19:38:25 2004 +++ elephant/NEWS Fri Oct 8 02:53:04 2004 @@ -1,3 +1,8 @@ +October 7, 2004 - + +Elephant 0.2.1 released. Thanks to Bill Clementson, +Elephant should compile on Win32 now. Also, a few minor +fixups. September 19, 2004 - Index: elephant/INSTALL diff -u elephant/INSTALL:1.9 elephant/INSTALL:1.10 --- elephant/INSTALL:1.9 Sun Sep 19 19:37:03 2004 +++ elephant/INSTALL Fri Oct 8 02:53:04 2004 @@ -4,25 +4,29 @@ ------------ CMUCL 19a, SBCL 0.8.14, OpemMCL 0.14.2, or Allegro CL 6.2. -I've tested under x86 FreeBSD, Linux and PPC Darwin. A -Lispworks version will come if requested. +I've tested under x86 FreeBSD, Linux and PPC Darwin. I +can't personally test Win32 but I've compiled under Visual +Studio .NET and a user has gotten it to work with Visual +Studio 6. A Lispworks version will come if requested. ASDF - http://www.cliki.net/asdf -UFFI 1.4.24/5 - http://uffi.b9.com +UFFI 1.4.24+ - http://uffi.b9.com I've patched src/functions.lisp to support some kinds of :out arguments. it is backwards-compatible so shouldn't interfere with your existing work. It is included in -1.4.25, but just in case you have 1.4.24 I have included it. +1.4.25+, but just in case you have 1.4.24 I have included +it. Sleepycat Berkeley DB 4.2 - http://www.sleepycat.com The version number is important -- the headers have changed -siginificantly. +siginificantly. When 4.3 comes out, I'll have to reroll my +constants..... -A C compiler. Presumably you have this if you installed -Sleepycat. +A C compiler, probably gcc or Visual Studio. Presumably you +have this if you installed Sleepycat. ------------ Instructions @@ -34,22 +38,27 @@ /usr/local/share/common-lisp/elephant-0.1/ -1) Install UFFI 1.4.24. Replace +1) Install UFFI. If you're using 1.4.24 replace path-to-uffi/src/functions.lisp with the provided file. -2) Install Berkeley DB 4.2. You may actually already have -this installed. FreeBSD has a port for this, as I'm sure -do other BSDs (including Darwin/Fink.) Take note of where -libdb.so and db.h are installed (usually +2) Install Berkeley DB 4.2. Under Un*x, you may actually +already have this installed, though it may be compiled with +funny options, so if things don't work you may want to try +to start from scratch. FreeBSD has a port for this, as I'm +sure do other BSDs (including Darwin/Fink.) Take note of +where libdb.so and db.h are installed (usually /usr/local/BerekleyDB.4.2/lib/libdb.so and /usr/local/BerekleyDB.4.2/include/db.h, or /usr/local/lib/db42/libdb.so and /usr/local/include/db42/db.h.) -3) Edit Makefile and run (using GNU make, gmake on BSD) +3) Compile and install the libsleepycat shared library. + +Under Un*x, edit Makefile and run (using GNU make, gmake on +BSD) make install @@ -60,10 +69,28 @@ or where you specified. On Darwin / OS X you need to have the developer tools installed. +For Win32 (directions courtesy of Bill Clementson): + +Create an MSVC dll project and add src/libsleepycat.c, +src/libsleepycat.def and the Berkeley DB libdb42.lib files +to the project (should be in the build_win32/release folder) + +Add the Berkeley DB dbinc include files directory and the +build_win32/release directory (where the Berkeley DB install +instructions builds the Berkeley DB objects by default) to +the build directories for the project + +Build the Elephant DLL file + +Since you've statically included libdb42.lib inside +libsleepycat.c, it may or may not be necessary to load +libdb42.dll into Lisp (see below.) + 4) Compile and load Elephant: First, edit src/sleepycat.lisp so that it points to the -correct libraries. +correct libraries. If you're using Un*x and ASDF, this is +probably automagic. Symlink elephant.asd to your asdf systems directory (mine is /usr/local/share/common-lisp/systems). Fire up lisp and Index: elephant/CREDITS diff -u elephant/CREDITS:1.3 elephant/CREDITS:1.4 --- elephant/CREDITS:1.3 Sun Sep 19 19:36:22 2004 +++ elephant/CREDITS Fri Oct 8 02:53:04 2004 @@ -18,6 +18,8 @@ Rafal Strzalinski for the Makefile and package patch +Bill Clementson for Win32 help and publicity + The common-lisp.net people for hosting The CMUCL and SBCL people for great compilers From blee at common-lisp.net Fri Oct 8 00:57:13 2004 From: blee at common-lisp.net (blee at common-lisp.net) Date: Fri, 08 Oct 2004 02:57:13 +0200 Subject: [elephant-cvs] CVS update: elephant/src/libsleepycat.def Message-ID: Update of /project/elephant/cvsroot/elephant/src In directory common-lisp.net:/tmp/cvs-serv6524/src Added Files: libsleepycat.def Log Message: win32 fixes (thanks to Bill Clementson) Date: Fri Oct 8 02:57:12 2004 Author: blee From blee at common-lisp.net Fri Oct 8 01:01:47 2004 From: blee at common-lisp.net (blee at common-lisp.net) Date: Fri, 08 Oct 2004 03:01:47 +0200 Subject: [elephant-cvs] CVS update: elephant/ChangeLog Message-ID: Update of /project/elephant/cvsroot/elephant In directory common-lisp.net:/tmp/cvs-serv7335 Modified Files: ChangeLog Log Message: Update Date: Fri Oct 8 03:01:46 2004 Author: blee Index: elephant/ChangeLog diff -u elephant/ChangeLog:1.3 elephant/ChangeLog:1.4 --- elephant/ChangeLog:1.3 Sun Sep 19 20:04:09 2004 +++ elephant/ChangeLog Fri Oct 8 03:01:45 2004 @@ -1,3 +1,56 @@ +2004-10-07 19:57 blee + + * src/libsleepycat.def: win32 fixes (thanks to Bill Clementson) + +2004-10-07 19:53 blee + + * CREDITS, INSTALL, NEWS, src/libsleepycat.c: win32 fixes (thanks + to Bill Clementson) + +2004-09-25 13:57 blee + + * src/collections.lisp: because of allocation type weirdness, + should always init indices-cache + +2004-09-21 14:36 blee + + * tests/mop-tests.lisp: new tests for change class, update class + +2004-09-21 14:36 blee + + * src/collections.lisp: make shared-init on indexed-btree play nice + +2004-09-21 14:35 blee + + * src/classes.lisp: added preliminary support for change-class + (though redef class is broken.) + +2004-09-21 14:34 blee + + * TODO: update + +2004-09-20 20:38 blee + + * Makefile: no install anymore, should be local to asdf + +2004-09-20 20:37 blee + + * src/sleepycat.lisp, tests/elephant-tests.lisp: use asdf packaging + info + +2004-09-20 20:35 blee + + * src/elephant.lisp: typo: forgot remove-from-root + +2004-09-20 20:34 blee + + * src/collections.lisp: typo: forgot populate keyword on generic + add-index + +2004-09-19 13:04 blee + + * ChangeLog: automagic! + 2004-09-19 12:52 blee * tests/testcollections.lisp: tests for :populate From blee at common-lisp.net Fri Oct 8 02:32:37 2004 From: blee at common-lisp.net (blee at common-lisp.net) Date: Fri, 08 Oct 2004 04:32:37 +0200 Subject: [elephant-cvs] CVS update: elephant/INSTALL Message-ID: Update of /project/elephant/cvsroot/elephant In directory common-lisp.net:/tmp/cvs-serv13197 Modified Files: INSTALL Log Message: update-class test fails -- warn the user Date: Fri Oct 8 04:32:36 2004 Author: blee Index: elephant/INSTALL diff -u elephant/INSTALL:1.10 elephant/INSTALL:1.11 --- elephant/INSTALL:1.10 Fri Oct 8 02:53:04 2004 +++ elephant/INSTALL Fri Oct 8 04:32:36 2004 @@ -203,6 +203,7 @@ (do-all-tests) this should take about 5 minutes on decent hardware. Note -that the "no-eval-initform" test fails, this is a known bug -which will get fixed in a future release. +that the "no-eval-initform" and "update-class" tests fail, +these are known bugs which will get fixed in a future +release.