X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fbsd-os.lisp;h=b9c8009a675711c16cb92ab68667e6b1d2cb7033;hb=48ec282d877900caf5ea4ab42e9d87e566ce6b43;hp=5567c3f7ae7577d21649b71d4445743c36e5b8c3;hpb=4f9d842fc0a23394dbf5fc5b1916fe98a3ac7cbe;p=sbcl.git diff --git a/src/code/bsd-os.lisp b/src/code/bsd-os.lisp index 5567c3f..b9c8009 100644 --- a/src/code/bsd-os.lisp +++ b/src/code/bsd-os.lisp @@ -9,14 +9,16 @@ ;;;; Check that target machine features are set up consistently with ;;;; this file. #!-bsd (eval-when (:compile-toplevel :load-toplevel :execute) - (error "The :BSD feature is missing, we shouldn't be doing this code.")) + (error "The :BSD feature is missing, we shouldn't be doing this code.")) (defun software-type () #!+sb-doc "Return a string describing the supporting software." (the string ; (to force error in case of unsupported BSD variant) #!+FreeBSD "FreeBSD" - #!+OpenBSD "OpenBSD")) + #!+OpenBSD "OpenBSD" + #!+NetBSD "NetBSD" + #!+Darwin "Darwin")) (defvar *software-version* nil) @@ -26,30 +28,30 @@ if not available." (or *software-version* (setf *software-version* - (string-trim '(#\newline) - (with-output-to-string (stream) - (sb!ext:run-program "/usr/bin/uname" `("-r") - :output stream)))))) + (string-trim '(#\newline) + (with-output-to-string (stream) + (sb!ext:run-program "/usr/bin/uname" `("-r") + :output stream)))))) (defun os-cold-init-or-reinit () (setf *software-version* nil) (setf *default-pathname-defaults* - ;; (temporary value, so that #'PATHNAME won't blow up when - ;; we call it below:) - (make-trivial-default-pathname) - *default-pathname-defaults* - ;; (final value, constructed using #'PATHNAME:) - (pathname (sb!unix:posix-getcwd/)))) + ;; (temporary value, so that #'NATIVE-PATHNAME won't blow up when + ;; we call it below:) + (make-trivial-default-pathname) + *default-pathname-defaults* + ;; (final value, constructed using #'NATIVE-PATHNAME:) + (native-pathname (sb!unix:posix-getcwd/)))) ;;; Return system time, user time and number of page faults. (defun get-system-info () (multiple-value-bind (err? utime stime maxrss ixrss idrss - isrss minflt majflt) - (sb!unix:unix-getrusage sb!unix:rusage_self) + isrss minflt majflt) + (sb!unix:unix-getrusage sb!unix:rusage_self) (declare (ignore maxrss ixrss idrss isrss minflt)) (unless err? (simple-perror "Unix system call getrusage() failed" :errno utime)) - + (values utime stime majflt))) ;;; Return the system page size.