Hello, backend/sbcl.lisp doesn't appear to work at all with ECL. The attached patch (also available at:
http://geocar.googlepages.com/usocket-ecl-3.diff ) makes build. What do I need to do in order to get it applied?
Index: backend/sbcl.lisp =================================================================== --- backend/sbcl.lisp (revision 336) +++ backend/sbcl.lisp (working copy) @@ -76,7 +76,7 @@ }" :one-liner nil :side-effects nil)) (defun read-select (read-fds to-secs &optional (to-musecs 0)) - (ffi:c-inline (read-fds to-secs to-musecs) (t t :unsigned-int) t + (ffi:c-inline (read-fds to-secs to-musecs) (t t :unsigned-int) (values t t) "{ fd_set rfds; cl_object cur_fd = #0; @@ -86,10 +86,10 @@ FD_ZERO(&rfds); while (CONSP(cur_fd)) { - int fd = fixint(cur_fd->cons.car); + int fd = fixint(CAR(cur_fd)); max_fd = (max_fd > fd) ? max_fd : fd; FD_SET(fd, &rfds); - cur_fd = cur_fd->cons.cdr; + cur_fd = CDR(cur_fd); } if (#1 != Cnil) { @@ -99,36 +99,35 @@ count = select(max_fd + 1, &rfds, NULL, NULL, (#1 != Cnil) ? &tv : NULL); - if (count == 0) + if (count == 0) { @(return 0) = Cnil; @(return 1) = Cnil; - else if (count < 0) + } else if (count < 0) { /*###FIXME: We should be raising an error here... except, ofcourse in case of EINTR or EAGAIN */ @(return 0) = Cnil; @(return 1) = MAKE_INTEGER(errno); - else - { - cl_object rv = Cnil; - cur_fd = #0; + } else { + cl_object rv = Cnil; + cur_fd = #0; - /* when we're going to use the same code on Windows, - as well as unix, we can't be sure it'll fit into - a fixnum: these aren't unix filehandle bitmaps sets on - Windows... */ + /* when we're going to use the same code on Windows, + as well as unix, we can't be sure it'll fit into + a fixnum: these aren't unix filehandle bitmaps sets on + Windows... */ - while (CONSP(cur_fd)) { - int fd = fixint(cur_fd->cons.car); - if (FD_ISSET(fd, &rfds)) - rv = CONS(MAKE_INTEGER(fd), rv); + while (CONSP(cur_fd)) { + int fd = fixint(CAR(cur_fd)); + if (FD_ISSET(fd, &rfds)) + rv = CONS(MAKE_INTEGER(fd), rv); - cur_fd = cur_fd->cons.cdr; - } - @(return 0) = rv; - @(return 1) = Cnil; + cur_fd = CDR(cur_fd); } + @(return 0) = rv; + @(return 1) = Cnil; + } }")) ) @@ -152,7 +151,7 @@ . operation-not-permitted-error) (sb-bsd-sockets:protocol-not-supported-error . protocol-not-supported-error) - (sb-bsd-sockets:unknown-protocol + #-ecl (sb-bsd-sockets:unknown-protocol . protocol-not-supported-error) (sb-bsd-sockets:socket-type-not-supported-error . socket-type-not-supported-error) @@ -161,9 +160,9 @@ (sb-bsd-sockets:socket-error . ,#'map-socket-error) ;; Nameservice errors: mapped to unknown-error - (sb-bsd-sockets:no-recovery-error . ns-no-recovery-error) - (sb-bsd-sockets:try-again-error . ns-try-again-condition) - (sb-bsd-sockets:host-not-found-error . ns-host-not-found-error))) + #-ecl (sb-bsd-sockets:no-recovery-error . ns-no-recovery-error) + #-ecl (sb-bsd-sockets:try-again-error . ns-try-again-condition) + #-ecl (sb-bsd-sockets:host-not-found-error . ns-host-not-found-error))) (defun handle-condition (condition &optional (socket nil)) "Dispatch correct usocket condition."
_______________________________________________ usocket-devel mailing list usocket-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel