[elephant-cvs] CVS update: elephant/src/sleepycat.lisp

blee at common-lisp.net blee at common-lisp.net
Sun Aug 29 20:41:32 UTC 2004


Update of /project/elephant/cvsroot/elephant/src
In directory common-lisp.net:/tmp/cvs-serv9047/src

Modified Files:
	sleepycat.lisp 
Log Message:
new license, non-interned exports (thanks Rafal Strzalinski)

Date: Sun Aug 29 22:41:31 2004
Author: blee

Index: elephant/src/sleepycat.lisp
diff -u elephant/src/sleepycat.lisp:1.5 elephant/src/sleepycat.lisp:1.6
--- elephant/src/sleepycat.lisp:1.5	Sun Aug 29 09:55:29 2004
+++ elephant/src/sleepycat.lisp	Sun Aug 29 22:41:30 2004
@@ -12,6 +12,10 @@
 ;;; Copyright (c) 2004 by Andrew Blumberg and Ben Lee
 ;;; <ablumberg at common-lisp.net> <blee at common-lisp.net>
 ;;;
+;;; This program is released under the following license
+;;; ("GPL").  For differenct licensing terms, contact the
+;;; copyright holders.
+;;;
 ;;; This program is free software; you can redistribute it
 ;;; and/or modify it under the terms of the GNU General
 ;;; Public License as published by the Free Software
@@ -39,30 +43,33 @@
 
 (defpackage sleepycat
   (:use common-lisp uffi)
-  (:export read-int read-uint read-float read-double 
-	   write-int write-uint write-float write-double
-	   offset-char-pointer copy-str-to-buf copy-bufs byte-length
-	   pointer-int pointer-void array-or-pointer-char
-	   db-env-create db-env-close db-env-open db-env-dbremove
-	   db-env-dbrename db-env-remove 
-	   db-env-set-flags db-env-get-flags
-	   db-create db-close db-open 
-	   db-remove db-rename db-sync db-truncate
-	   db-get-key-buffered db-get-buffered db-get db-put-buffered db-put 
-	   db-delete-buffered db-delete 
-	   *current-transaction* db-transaction-begin db-transaction-abort 
-	   db-transaction-commit with-transaction 
-	   db-transaction-id db-env-lock-id db-env-lock-id-free
-	   db-env-lock-get db-env-lock-put with-lock
-	   db-env-set-timeout db-env-get-timeout
-	   db-env-set-lock-detect db-env-get-lock-detect
-	   db-error db-error-errno
-	   +NULL-VOID+ +NULL-CHAR+
-	   DB-BTREE DB-HASH DB-QUEUE DB-RECNO DB-UNKNOWN 
-	   DB_KEYEMPTY DB_LOCK_DEADLOCK DB_LOCK_NOTGRANTED DB_NOTFOUND
-	   DB-LOCKMODE#NG DB-LOCKMODE#READ DB-LOCKMODE#WRITE 
-	   DB-LOCKMODE#wAIT DB-LOCKMODE#IWRITE DB-LOCKMODE#IREAD
-	   DB-LOCKMODE#IWR DB-LOCKMODE#DIRTY DB-LOCKMODE#WWRITE
+  (:export #:*current-transaction* 
+	   #:read-int #:read-uint #:read-float #:read-double 
+	   #:write-int #:write-uint #:write-float #:write-double
+	   #:offset-char-pointer #:copy-str-to-buf #:copy-bufs #:byte-length
+	   #:pointer-int #:pointer-void #:array-or-pointer-char
+	   #:db-env-create #:db-env-close #:db-env-open #:db-env-dbremove
+	   #:db-env-dbrename #:db-env-remove 
+	   #:db-env-set-flags #:db-env-get-flags
+	   #:db-create #:db-close #:db-open 
+	   #:db-remove #:db-rename #:db-sync #:db-truncate
+	   #:db-get-key-buffered #:db-get-buffered #:db-get 
+	   #:db-put-buffered #:db-put 
+	   #:db-delete-buffered #:db-delete 
+	   #:db-transaction-begin #:db-transaction-abort 
+	   #:db-transaction-commit #:with-transaction 
+	   #:db-transaction-id #:db-env-lock-id #:db-env-lock-id-free
+	   #:db-env-lock-get #:db-env-lock-put #:with-lock
+	   #:db-env-set-timeout #:db-env-get-timeout
+	   #:db-env-set-lock-detect #:db-env-get-lock-detect
+	   #:db-error #:db-error-errno
+	   #:+NULL-VOID+ #:+NULL-CHAR+
+	   #:DB-BTREE #:DB-HASH #:DB-QUEUE #:DB-RECNO #:DB-UNKNOWN 
+	   #:DB_KEYEMPTY #:DB_LOCK_DEADLOCK #:DB_LOCK_NOTGRANTED 
+	   #:DB_NOTFOUND
+	   #:DB-LOCKMODE#NG #:DB-LOCKMODE#READ #:DB-LOCKMODE#WRITE 
+	   #:DB-LOCKMODE#wAIT #:DB-LOCKMODE#IWRITE #:DB-LOCKMODE#IREAD
+	   #:DB-LOCKMODE#IWR #:DB-LOCKMODE#DIRTY #:DB-LOCKMODE#WWRITE
 	   ))
 
 (in-package "SLEEPYCAT")
@@ -71,21 +78,30 @@
   ;; UFFI
   ;;(asdf:operate 'asdf:load-op :uffi)
 
-  ;; DSO loading
+  ;; DSO loading - Edit these for your system!
 
-  ;; Under linux you need to load some kind of pthread
+  ;; Under linux you may need to load some kind of pthread
   ;; library.  I can't figure out which is the right one.
   ;; This one worked for me.  There are known issues with
   ;; Red Hat and Berkeley DB, search google.
   #+linux
   (uffi:load-foreign-library "/lib/tls/libpthread.so.0" :module "pthread")
 
+  ;; Sleepycat: this works on linux
+  #-bsd
+  (uffi:load-foreign-library "/usr/local/BerkeleyDB.4.2/lib/libdb.so" 
+			     :module "sleepycat")
+  ;; this works on FreeBSD
+  #+bsd
   (uffi:load-foreign-library "/usr/local/lib/db42/libdb.so" 
 			     :module "sleepycat")
+
+  ;; Libsleepycat.so: edit this
   (uffi:load-foreign-library 
-   "/home/ben/lisp/elephant/libsleepycat.so" 
-;;   "/usr/local/share/common-lisp/elephant/libsleepycat.so" 
+   "/usr/local/share/common-lisp/elephant/libsleepycat.so" 
    :module "libsleepycat")
+
+  ;; fini on user editable part
 
   (def-type pointer-int (* :int))
   (def-type pointer-void :pointer-void)





More information about the Elephant-cvs mailing list