[mel-base-devel] Compile problem with environment.lisp on SBCL 1.0.34
Fred Gibson
fred at streamfocus.com
Fri Feb 12 15:47:56 UTC 2010
Because of a bug in the current SBCL release <
http://bugs.launchpad.net/sbcl/+bug/495044 > I had to make the
following changes to get environment.lisp to compile:
diff --git a/lib/mel-base/lisp-dep/environment.lisp
b/lib/mel-base/lisp-dep/environment.lisp
index 573779c..3c2a737 100644
--- a/lib/mel-base/lisp-dep/environment.lisp
+++ b/lib/mel-base/lisp-dep/environment.lisp
@@ -110,13 +110,14 @@ custom:*FOREIGN-ENCODING*)
(and unix #.(cl:if (cl:find-package "UFFI") '(and) '(or))))
(defun gethostname ()
"Returns the hostname"
+ (declare (optimize (speed 0)));because of sbcl bug
http://bugs.launchpad.net/sbcl/+bug/495044
(uffi:with-foreign-object (name '(:array :unsigned-char 256))
(if (zerop (c-gethostname (uffi:char-array-to-pointer name) 256))
(uffi:convert-from-foreign-string name)
(error "gethostname() failed."))))
;; If no GETHOSTNAME is yet defined - generate a dummy stub
-#-#. (cl:if (cl:fboundp 'gethostname) '(and) '(or))
+#-#.(cl:if (cl:or sbcl (cl:fboundp 'gethostname)) '(and) '(or))
(progn
(warn "Uses dummy GETHOSTNAME function - try loading UFFI before
compiling mel-base")
(defun gethostname ()
Fred Gibson
Founder / Software Developer
http://www.streamfocus.com
(c)2010 Organon Technologies LLC
More information about the mel-base-devel
mailing list