From: Mark Wooding Date: Thu, 14 Apr 2016 14:39:49 +0000 (+0100) Subject: sys-base.lisp: Support for newer `uiop'-based `cl-launch'. X-Git-Url: https://git.distorted.org.uk/~mdw/lisp/commitdiff_plain/348c27abfcd71554439ae9a04e31c067d3974a7e sys-base.lisp: Support for newer `uiop'-based `cl-launch'. The new version stashes things in somewhat different places, so be willing to hunt about for a bit. --- diff --git a/sys-base.lisp b/sys-base.lisp index 7e450a2..60bc8a4 100644 --- a/sys-base.lisp +++ b/sys-base.lisp @@ -41,11 +41,16 @@ (defun set-command-line-arguments () (setf *command-line* (or (when (member :cl-launch *features*) - (let* ((cll-package (find-package :cl-launch)) - (name (funcall (intern "GETENV" cll-package) - "CL_LAUNCH_FILE")) - (args (symbol-value (intern "*ARGUMENTS*" - cll-package)))) + (let* ((uiop-package (find-package :uiop)) + (cll-package (find-package :cl-launch)) + (name (some (intern "GETENV" + (or uiop-package cll-package)) + (list "__CL_ARGV0" "CL_LAUNCH_FILE"))) + (args (symbol-value + (if uiop-package + (intern "*COMMAND-LINE-ARGUMENTS*" + uiop-package) + (intern "*ARGUMENTS*" cll-package))))) (if name (cons name args) args)))