From 88047ce58b1561cedace21d2f2d1c36f3d03f83a Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Sun, 7 Feb 1993 21:17:33 +0000
Subject: [PATCH] Moved foreign-segment-{start,size} from mumble-os.lisp into
 foreign.lisp. Changed software-version to use /usr/bin/uname instead of
 stringing the kernel.

---
 code/sunos-os.lisp | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)

diff --git a/code/sunos-os.lisp b/code/sunos-os.lisp
index 6aa1901bf..0c6ce90fc 100644
--- a/code/sunos-os.lisp
+++ b/code/sunos-os.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sunos-os.lisp,v 1.6 1992/05/15 17:52:00 wlott Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sunos-os.lisp,v 1.7 1993/02/07 21:17:33 wlott Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -21,28 +21,20 @@
 (pushnew :sunos *features*)
 (setq *software-type* "SunOS")
 
-(defconstant foreign-segment-start #x00C00000) ; ### Not right???
-(defconstant foreign-segment-size  #x00400000)
-
 (defvar *software-version* nil "Version string for supporting software")
+
 (defun software-version ()
   "Returns a string describing version of the supporting software."
   (unless *software-version*
     (setf *software-version*
-	  (let ((version-line
-		 (with-output-to-string (stream)
-		   (run-program
-		    "/bin/sh"
-		    '("-c" "strings /vmunix|grep -i 'sunos release'")
-		    :output stream
-		    :pty nil
-		    :error nil))))
-	    (let* ((first-space (position #\Space version-line))
-		   (second-space (position #\Space version-line
-					   :start (1+ first-space)))
-		   (third-space (position #\Space version-line
-					  :start (1+ second-space))))
-	      (subseq version-line (1+ second-space) third-space)))))
+          (let ((version-line
+                 (with-output-to-string (stream)
+                   (run-program "/usr/bin/uname"
+                                '("-r" )
+                                :output stream
+                                :pty nil
+                                :error nil))))
+            (subseq version-line 0 (1- (length version-line))))))
   *software-version*)
 
 
@@ -52,7 +44,7 @@
 ;;; 
 (defun os-init ()
   ;; Decache version on save, because it might not be the same when we restart.
-  (setq *software-version* nil))
+  (setf *software-version* nil))
 
 ;;; GET-SYSTEM-INFO  --  Interface
 ;;;
-- 
GitLab