Commit 2cf375ab authored by Dave Cooper's avatar Dave Cooper

Fix issue where zaserve and paserve did not work on Allegro CL.

parent 05dc4263
......@@ -8,7 +8,7 @@
:author "Dave Cooper & Common-Lisp.Net maintainers"
:licence "TBD"
:description "Test server for common-lisp.net for Legacy Portable AllegroServe"
:depends-on (:cl-site :aserve) ;; FLAG system name may be updated to :paserve in future QL.
:depends-on (:cl-site :aserve #+allegro :bordeaux-threads) ;; FLAG system name may be updated to :paserve in future QL.
:serial t
:components ((:file "package")
(:file "publish")))
......
......@@ -2,4 +2,4 @@
(defpackage #:cl-site-paserve
(:use :cl)
(:export #:start-server #:publish-cl-site))
(:export #:start-server #:publish-cl-site #:aserve-socket-port))
......@@ -77,6 +77,13 @@
(incf wait-time 0.1)))))
;;
;; Compatibility libraries for aserve-socket, which at this point
;; could be a usocket socket, an acl-compat.socket socket, or a native
;; Allegro CL socket.
;;
(defun aserve-socket-port (socket)
(#+(or zacl allegro) socket:local-port
#+(and (not (or zacl allegro)) acl-compat) acl-compat:local-port socket))
......@@ -14,6 +14,6 @@
(let ((wserver net.aserve:*wserver*))
(when wserver
(let ((port (acl-compat.socket::port(net.aserve:wserver-socket wserver))))
(let ((port (cl-site-paserve:aserve-socket-port (net.aserve:wserver-socket wserver))))
(format t "You may now visit http://localhost:~a to test the site.~%" port))))
......@@ -8,7 +8,7 @@
:author "Dave Cooper & Common-Lisp.Net maintainers"
:licence "TBD"
:description "Test server for common-lisp.net for :zaserve AllegroServe port"
:depends-on (:cl-site :aserve) ;; FLAG -- change to :zaserve when available in QL.
:depends-on (:cl-site :aserve #+allegro :bordeaux-threads) ;; FLAG -- change to :zaserve when available in QL.
:serial t
:components ((:file "package")
(:file "publish")))
......
(in-package :cl-user)
(defpackage #:cl-site-zaserve
(:use :cl) (:export #:start-server #:publish-cl-site))
(:use :cl) (:export #:start-server #:publish-cl-site #:aserve-socket-port))
......@@ -78,6 +78,8 @@
(incf wait-time 0.1)))))
(defun aserve-socket-port (socket)
(#+(or zacl allegro) socket:local-port
#+(and (not (or zacl allegro)) acl-compat) acl-compat:local-port socket))
......@@ -14,7 +14,6 @@
(let ((wserver net.aserve:*wserver*))
(when wserver
(let ;; ((port (usocket:get-local-port (net.aserve:wserver-socket wserver)))) ;; Uncomment when switching to zaserve
((port (acl-compat.socket::port(net.aserve:wserver-socket wserver))))
(let ((port (cl-site-paserve:aserve-socket-port (net.aserve:wserver-socket wserver))))
(format t "You may now visit http://localhost:~a to test the site with zaserve.~%" port))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment