Loading bundle.lisp +1 −1 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ ((member :binary :dll :lib :shared-library :static-library :program :object :program) (compile-file-type :type bundle-type)) ((eql :binary) "image") ((eql :dll) (cond ((os-unix-p) "so") ((os-windows-p) "dll"))) ((eql :dll) (cond ((os-macosx-p) "dylib") ((os-unix-p) "so") ((os-windows-p) "dll"))) ((member :lib :static-library) (cond ((os-unix-p) "a") ((os-windows-p) "lib"))) ((eql :program) (cond ((os-unix-p) nil) ((os-windows-p) "exe"))))) Loading test/test-macosx.script-ignore 0 → 100644 +9 −0 Original line number Diff line number Diff line ;;; -*- mode: common-lisp; -*- ;;;--------------------------------------------------------------------------- ;;; Run this on a Mac OS X machine to make sure that the OS flags are correct. ;;;--------------------------------------------------------------------------- (assert (uiop:os-macosx-p)) (assert (uiop:os-unix-p)) uiop/os.lisp +10 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ (:recycle :uiop/os :asdf/os :asdf) (:use :uiop/common-lisp :uiop/package :uiop/utility) (:export #:featurep #:os-unix-p #:os-windows-p #:os-genera-p #:detect-os ;; features #:featurep #:os-unix-p #:os-macosx-p #:os-windows-p #:os-genera-p #:detect-os ;; features #:getenv #:getenvp ;; environment variables #:implementation-identifier ;; implementation identifier #:implementation-type #:*implementation-type* Loading @@ -31,6 +31,14 @@ (or #+abcl (featurep :unix) #+(and (not abcl) (or unix cygwin darwin)) t)) (defun os-macosx-p () ;; OS-MACOSX is not mutually exclusive with OS-UNIX, in fact the ;;former implies the latter. (or #+allegro (featurep :macosx) #+clisp (featurep :macos) (featurep :darwin))) (defun os-windows-p () (or #+abcl (featurep :windows) #+(and (not (or abcl unix cygwin darwin)) (or win32 windows mswindows mingw32)) t)) Loading @@ -44,6 +52,7 @@ (defun detect-os () (loop* :with o :for (feature . detect) :in '((:os-unix . os-unix-p) (:os-windows . os-windows-p) (:os-macosx . os-macosx-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*)) Loading Loading
bundle.lisp +1 −1 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ ((member :binary :dll :lib :shared-library :static-library :program :object :program) (compile-file-type :type bundle-type)) ((eql :binary) "image") ((eql :dll) (cond ((os-unix-p) "so") ((os-windows-p) "dll"))) ((eql :dll) (cond ((os-macosx-p) "dylib") ((os-unix-p) "so") ((os-windows-p) "dll"))) ((member :lib :static-library) (cond ((os-unix-p) "a") ((os-windows-p) "lib"))) ((eql :program) (cond ((os-unix-p) nil) ((os-windows-p) "exe"))))) Loading
test/test-macosx.script-ignore 0 → 100644 +9 −0 Original line number Diff line number Diff line ;;; -*- mode: common-lisp; -*- ;;;--------------------------------------------------------------------------- ;;; Run this on a Mac OS X machine to make sure that the OS flags are correct. ;;;--------------------------------------------------------------------------- (assert (uiop:os-macosx-p)) (assert (uiop:os-unix-p))
uiop/os.lisp +10 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ (:recycle :uiop/os :asdf/os :asdf) (:use :uiop/common-lisp :uiop/package :uiop/utility) (:export #:featurep #:os-unix-p #:os-windows-p #:os-genera-p #:detect-os ;; features #:featurep #:os-unix-p #:os-macosx-p #:os-windows-p #:os-genera-p #:detect-os ;; features #:getenv #:getenvp ;; environment variables #:implementation-identifier ;; implementation identifier #:implementation-type #:*implementation-type* Loading @@ -31,6 +31,14 @@ (or #+abcl (featurep :unix) #+(and (not abcl) (or unix cygwin darwin)) t)) (defun os-macosx-p () ;; OS-MACOSX is not mutually exclusive with OS-UNIX, in fact the ;;former implies the latter. (or #+allegro (featurep :macosx) #+clisp (featurep :macos) (featurep :darwin))) (defun os-windows-p () (or #+abcl (featurep :windows) #+(and (not (or abcl unix cygwin darwin)) (or win32 windows mswindows mingw32)) t)) Loading @@ -44,6 +52,7 @@ (defun detect-os () (loop* :with o :for (feature . detect) :in '((:os-unix . os-unix-p) (:os-windows . os-windows-p) (:os-macosx . os-macosx-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*)) Loading