0.9.0.38:
[sbcl.git] / src / code / bsd-os.lisp
index 5b0e6fc..6a96ee9 100644 (file)
@@ -16,7 +16,9 @@
   "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)
 
                           (sb!ext:run-program "/usr/bin/uname" `("-r")
                                               :output stream))))))
 \f
-;;; OS-COLD-INIT-OR-REINIT initializes our operating-system interface.
-;;; It sets the values of the global port variables to what they
-;;; should be and calls the functions that set up the argument blocks
-;;; for the server interfaces.
 (defun os-cold-init-or-reinit ()
-  (setf *software-version* nil))
+  (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/))))
 
 ;;; Return system time, user time and number of page faults.
 (defun get-system-info ()
@@ -45,8 +50,7 @@
                       (sb!unix:unix-getrusage sb!unix:rusage_self)
     (declare (ignore maxrss ixrss idrss isrss minflt))
     (unless err?
-      (error "Unix system call getrusage failed: ~A."
-            (sb!unix:get-unix-error-msg utime)))
+      (simple-perror "Unix system call getrusage() failed" :errno utime))
     
     (values utime stime majflt)))