[usocket-devel] bugs in trunk: condition.lisp, usocket.lisp

Hi, Erik When I try to compile recent usocket trunk code, two issues found: In condition.lisp, the (define-condition insufficient-implementation) cannot compiled on LispWorks: **++++ Error in (SUBFUNCTION (DEFCLASS USOCKET:INSUFFICIENT-IMPLEMENTATION) (DEFINE-CONDITION USOCKET:INSUFFICIENT- IMPLEMENTATION)): FUNCTION is defined as an ordinary function #<Function SYSTEM::UNDEFINED-FEXPR-FUNCTION 20259C4A> I checked CLHS ( http://www.lispworks.com/documentation/HyperSpec/Body/s_fn.htm ), it says FUNCTION is a "Special Operator" which serves as a function: (defun adder (x) (function (lambda (y) (+ x y)))) (setq add3 (adder 3)) (funcall add3 5) => 8 So you define it into a slot reader will cause symbol conflict with Common Lisp itself. LispWorks is quite strict, other CLs just pass it. I suggest you use FUNCTION-OF instead of FUNCTION, like this: (define-condition insufficient-implementation (error) ((feature :initarg :feature :reader feature) (function :initarg :function :reader function-of)) (:documentation "The ancestor of all errors usocket may generate because of insufficient support from the underlying implementation with respect to the arguments given to `function'. One call may signal several errors, if the caller allows processing to continue. ")) With this change, I can compile and load on LispWorks now. But I don't know where else you use this reader function. Please review this, and make some change for LispWorks. Thanks, --binghe

Hi, again Another is in usocket.lisp, Clozure CL found it: Index: usocket.lisp =================================================================== --- usocket.lisp (revision 392) +++ usocket.lisp (working copy) @@ -259,7 +259,7 @@ (defun remove-all-waiters (wait-list) (dolist (waiter (wait-list-waiters wait-list)) - (%remove-waiter waiter)) + (%remove-waiter wait-list waiter)) (setf (wait-list-waiters wait-list) nil) (clrhash (wait-list-map wait-list))) The %remove-waiter should have two arguments but you have only one. Regards, Chun Tian (binghe)

Thanks for your report! I fixed this a minute ago (because of your report) and the other issue you reported (because I was already looking at it). The conditions are not used (yet), however, I expect to start to use them soon. Bye, Erik. On Sun, Jul 27, 2008 at 7:50 PM, binghe Chun Tian <binghe.lisp@gmail.com> wrote:
Hi, again
Another is in usocket.lisp, Clozure CL found it:
Index: usocket.lisp =================================================================== --- usocket.lisp (revision 392) +++ usocket.lisp (working copy) @@ -259,7 +259,7 @@
(defun remove-all-waiters (wait-list) (dolist (waiter (wait-list-waiters wait-list)) - (%remove-waiter waiter)) + (%remove-waiter wait-list waiter)) (setf (wait-list-waiters wait-list) nil) (clrhash (wait-list-map wait-list)))
The %remove-waiter should have two arguments but you have only one.
Regards,
Chun Tian (binghe)
_______________________________________________ usocket-devel mailing list usocket-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel
participants (3)
-
Chun Tian
-
Chun Tian (binghe)
-
Erik Huelsmann