From 3332f5b4e207ddb72f97027c7fdd2da75c5e368d Mon Sep 17 00:00:00 2001 From: Jean-Claude Beaudoin Date: Sat, 21 Jul 2012 11:06:11 -0400 Subject: [PATCH 1/2] Initial port to MKCL. --- impl-util.lisp | 9 +++++++++ impl.lisp | 18 ++++++++++++++++++ network.lisp | 12 ++++++++++++ package.lisp | 1 + 4 files changed, 40 insertions(+) diff --git a/impl-util.lisp b/impl-util.lisp index d75125e..f1ba6a6 100644 --- a/impl-util.lisp +++ b/impl-util.lisp @@ -66,6 +66,8 @@ ".clisprc.lisp") (:implementation ecl ".eclrc") + (:implementation mkcl + ".mkclrc") (:implementation lispworks ".lispworks") (:implementation sbcl @@ -216,6 +218,11 @@ quicklisp at CL startup." #+ecl :resolve-symlinks #+ecl nil) (directory (merge-pathnames *wild-relative* directory) #+ecl :resolve-symlinks #+ecl nil))) + (:implementation mkcl + (setf directory (truename directory)) + (nconc + (directory (merge-pathnames *wild-entry* directory)) + (directory (merge-pathnames *wild-relative* directory)))) (:implementation sbcl (directory (merge-pathnames *wild-entry* directory) #+sbcl :resolve-symlinks #+sbcl nil))) @@ -248,6 +255,8 @@ quicklisp at CL startup." (ql-scl:unix-rmdir (ql-scl:unix-namestring entry))) (:implementation ecl (ql-ecl:rmdir entry)) + (:implementation mkcl + (ql-mkcl:rmdir entry)) (:implementation lispworks (ql-lispworks:delete-directory entry)) (:implementation sbcl diff --git a/impl.lisp b/impl.lisp index b8b71ab..304e663 100644 --- a/impl.lisp +++ b/impl.lisp @@ -240,6 +240,24 @@ #:socket-connect #:socket-make-stream)) +;;; MKCL + +(define-implementation-package :mkcl #:ql-mkcl + (:documentation "ManKai Common Lisp - http://common-lisp.net/project/mkcl/") + (:class mkcl) + (:prep + (require 'sockets)) + (:intern #:host-network-address) + (:reexport-from #:si + #:rmdir + #:file-kind) + (:reexport-from #:sb-bsd-sockets + #:get-host-by-name + #:host-ent-address + #:inet-socket + #:socket-connect + #:socket-make-stream)) + ;;; SBCL diff --git a/network.lisp b/network.lisp index c97a3bf..f723280 100644 --- a/network.lisp +++ b/network.lisp @@ -53,6 +53,18 @@ :input t :output t :buffering :full))) + (:implementation mkcl + (let* ((endpoint (qlqs-mkcl:host-ent-address + (qlqs-mkcl:get-host-by-name host))) + (socket (make-instance 'qlqs-mkcl:inet-socket + :protocol :tcp + :type :stream))) + (qlqs-mkcl:socket-connect socket endpoint port) + (qlqs-mkcl:socket-make-stream socket + :element-type '(unsigned-byte 8) + :input t + :output t + :buffering :full))) (:implementation lispworks (ql-lispworks:open-tcp-stream host port :direction :io diff --git a/package.lisp b/package.lisp index 142c8ba..e1eef3a 100644 --- a/package.lisp +++ b/package.lisp @@ -48,6 +48,7 @@ #:ecl #:gcl #:lispworks + #:mkcl #:scl #:sbcl)) From bd48a3e3434af23f48a0703854ec4916fd1216a3 Mon Sep 17 00:00:00 2001 From: Jean-Claude Beaudoin Date: Mon, 23 Jul 2012 22:25:50 -0400 Subject: [PATCH 2/2] Removed creep-in of bootstrap package qlqs-mkcl, package ql-mkcl was meant instead. --- network.lisp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/network.lisp b/network.lisp index f723280..cf9d6af 100644 --- a/network.lisp +++ b/network.lisp @@ -54,13 +54,13 @@ :output t :buffering :full))) (:implementation mkcl - (let* ((endpoint (qlqs-mkcl:host-ent-address - (qlqs-mkcl:get-host-by-name host))) - (socket (make-instance 'qlqs-mkcl:inet-socket + (let* ((endpoint (ql-mkcl:host-ent-address + (ql-mkcl:get-host-by-name host))) + (socket (make-instance 'ql-mkcl:inet-socket :protocol :tcp :type :stream))) - (qlqs-mkcl:socket-connect socket endpoint port) - (qlqs-mkcl:socket-make-stream socket + (ql-mkcl:socket-connect socket endpoint port) + (ql-mkcl:socket-make-stream socket :element-type '(unsigned-byte 8) :input t :output t