X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fbsd-os.lisp;h=ed8d8686abec06b2e20121269ffee2e5147a83b0;hb=eb4a67799308fc2e610ca330401c9cb07533143c;hp=2e3771d6908806b0798e33cae832b3df7ecab286;hpb=506253505641855dc8bb87033f7af894904f848b;p=sbcl.git diff --git a/src/code/bsd-os.lisp b/src/code/bsd-os.lisp index 2e3771d..ed8d868 100644 --- a/src/code/bsd-os.lisp +++ b/src/code/bsd-os.lisp @@ -9,7 +9,7 @@ ;;;; 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 @@ -17,6 +17,7 @@ (the string ; (to force error in case of unsupported BSD variant) #!+FreeBSD "FreeBSD" #!+OpenBSD "OpenBSD" + #!+NetBSD "NetBSD" #!+Darwin "Darwin")) (defvar *software-version* nil) @@ -27,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 #'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/)))) ;;; 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.