Haiku is an operation system different from Windows, Linux or *BSD. Still, in many respects it can be considered Unix-like, which is especially true when porting software to it.
CLISP was recently ported to Haiku. In the *features*, CLISP on Haiku defines both :UNIX (i.e. Unix-like) and :HAIKU, and this is probably the right decision. However, after (require "asdf"), *features* are changed, :HAIKU is removed and :OS-UNIX is added. This is certainly something which needs to be fixed. The desired solution would be to keep both :UNIX, :HAIKU and to add :OS-HAIKU.
Here is the analysis from CLISP development list: ``` (defun detect-os () "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-macosx . os-macosx-p) … (:haiku . os-haiku-p)) :when (and (or (not o) (eq feature :os-macosx)) (funcall detect)) :do (setf o feature) (pushnew feature *features*) :else :do (setf *features* (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.")))))
That is somewhat brittle code that side-effects *FEATURES*. It contains a special bypass to allow :OS-MACOSX to live there beside :OS-UNIX, but there’s nothing equivalent for Haiku. Whether Haiku is considered a UNIX or not I won’t debate.
I call such code /brittle/ because there’s an undocumented (non-explicitly mentioned) dependency on element order in some innocuous list: If :os-macosx were before :os-unix in the A-list, that code would not set – and rather delete – :OS-UNIX in *features*.
I would have appreciated a tiny comment like
:for (feature . detect) :in '(… (:os-unix . os-unix-p) (:os-macosx . os-macosx-p) ; Beware, unix must come first! '''
Alexandru Popa