Commit d0c367e2 authored by Robert P. Goldman's avatar Robert P. Goldman
Browse files

Correctly detect OS on Mac OSX.

Previously, we would detect Unix first (correctly), then short-circuit,
and never detect Mac OSX.

I would like to rewrite DETECT-OS.  The code seems opaque.  But this is
correct, so committing it now, since it used to be broken.
parent ca2fd88c
......@@ -63,11 +63,12 @@ keywords explicitly."
"Detects the current operating system. Only needs be run at compile-time,
except on ABCL where it might change between FASL compilation and runtime."
(loop* :with o
:for (feature . detect) :in '((:os-unix . os-unix-p) (:os-windows . os-windows-p)
(:os-macosx . os-macosx-p)
:for (feature . detect) :in '((:os-unix . os-unix-p) (:os-macosx . os-macosx-p)
(:os-windows . os-windows-p)
(:genera . os-genera-p) (:os-oldmac . os-oldmac-p))
:when (and (not o) (funcall detect)) :do (setf o feature) (pushnew o *features*)
:else :do (setf *features* (remove feature *features*))
:when (and (or (not o) (eq feature :os-macosx)) (funcall detect))
:do (setf o feature) (pushnew feature *features*)
:else :do (remove feature *features*)
:finally
(return (or o (error "Congratulations for trying ASDF on an operating system~%~
that is neither Unix, nor Windows, nor Genera, nor even old MacOS.~%Now you port it.")))))
......
Supports Markdown
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