;;; vim :ft=lisp ;;; Touched: <03-Nov-03 06:25:50 IST, madhu> ;;; acl-compat (and portableaserve) for CLISP under win32 (in-package :CL-USER) (defparameter *PASERVE-BASE-DIRECTORY* (or #-nil #p"c:/madhu/proj/portableaserve/" (make-pathname :name nil :type nil :version nil :defaults (parse-namestring *load-truename*)))) (flet ((wildify (&rest components) (merge-pathnames (make-pathname :name :wild :type :wild :version :wild :directory (append '(:relative) components)) *PASERVE-BASE-DIRECTORY*)) (%fasldir (&rest args) (apply (if(fboundp 'user:%fasldir)#'user:%fasldir #'identity) args))) (setf (logical-pathname-translations "acl-compat") `(("binary;*.*.*" ,(wildify (%fasldir "binary") "acl-compat")) ("**;*.*.*" ,(wildify "acl-compat" :wild-inferiors)) ("*.*.*" ,(wildify "acl-compat" )))) (setf (logical-pathname-translations "aserve") `(("binary;*.*.*" ,(wildify (%fasldir "binary") "aserve")) ("**;*.*.*" ,(wildify "aserve" :wild-inferiors)) ("*.*.*" ,(wildify "aserve" ))))) (unless (find-package "POSIX") ; just shut it up (defpackage "POSIX" (:export "HOSTENT-NAME" "HOSTENT-ADDR-LIST" "RESOLVE-HOST-IPADDR"))) (mk:defsystem "ACL-COMPAT" :source-pathname #.(translate-logical-pathname "acl-compat:") :binary-pathname #.(translate-logical-pathname "acl-compat:binary;") :source-extension "lisp" :components ("nregex" "packages" "lw-buffering" "chunked-stream-mixin" (:module "clisp" :components ("acl-mp" "acl-excl" "acl-socket" "acl-sys")) "meta" "uri")) (mk:defsystem "ASERVE" :source-pathname #.(translate-logical-pathname "aserve:") :binary-pathname #.(translate-logical-pathname "aserve:binary;") :source-extension "cl" :depends-on ("ACL-COMPAT") :finally-do (pushnew :aserve *features*) :components ((:module "htmlgen" :components ("htmlgen")) "packages" "macs" "main" "headers" "parse" "decode" "publish" "authorize" "log" "client" "proxy")) #|| (let ((mk::*operations-propagate-to-subsystems* nil)) (mapcar #'(lambda (system) (mk:load-system system :compile-during-load t :minimal-load t)) '(:acl-compat #+nil :aserve))) ;;; To test the installation, evaluate the following: ;;; Load example.lisp in the aserve directory. (load "aserve:example.cl") ;;; This option enables extended debug message output (net.aserve::debug-on :info) ;;; This option enables to enter the debugger if an error ;;; occurs. (instead of simply logging and ignoring it) (net.aserve::debug-on :notrap) (defun acl-compat.mp::process-name (&rest args) ; madhu (declare (ignore args)) "dummy") ;;; Start example server (without multiprocessing) on port 2001 (let ((acl-compat.mp:*current-process* nil)) ; madhu (aserve-example:start-server :listeners nil :port 2001)) ||#