From 40c67dfc26fcc12183872637ff641bf47d40591b Mon Sep 17 00:00:00 2001 From: dtc <dtc> Date: Tue, 10 Mar 1998 18:27:35 +0000 Subject: [PATCH] Define the variable *software-version* avoiding a compiler warning, and use it to cache the result of software-version. --- code/osf1-os.lisp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/code/osf1-os.lisp b/code/osf1-os.lisp index 4e8382a43..221397846 100644 --- a/code/osf1-os.lisp +++ b/code/osf1-os.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/osf1-os.lisp,v 1.4 1997/07/09 12:08:59 pw Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/osf1-os.lisp,v 1.5 1998/03/10 18:27:35 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -20,13 +20,21 @@ (export '(*task-self* *task-data* *task-notify*)) (pushnew :osf1 *features*) + (setq *software-type* "OSF1") +(defvar *software-version* nil "Version string for supporting software") + (defun software-version () "Returns a string describing version of the supporting software." - (string-trim '(#\newline) - (with-output-to-string (stream) - (run-program "/usr/bin/uname" '("-sr") :output stream)))) + (unless *software-version* + (setf *software-version* + (string-trim '(#\newline) + (with-output-to-string (stream) + (run-program "/usr/bin/uname" + '("-sr") + :output stream))))) + *software-version*) ;;; OS-Init initializes our operating-system interface. It sets the values -- GitLab