X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcommon-os.lisp;h=51ebbc1a7e65eba367e9e63ff89ba12d6b54f3a7;hb=01488e5ddb6c8c10bc01bc9c502be1fe9de8e370;hp=7de4d4632da54493a6f8b83b160dc15c59f047d7;hpb=0d2bb0b292731fbf12d89aad2d28ea98a335d82b;p=sbcl.git diff --git a/src/code/common-os.lisp b/src/code/common-os.lisp index 7de4d46..51ebbc1 100644 --- a/src/code/common-os.lisp +++ b/src/code/common-os.lisp @@ -13,12 +13,9 @@ (defvar *software-version* nil) -(defvar *core-pathname* nil - #!+sb-doc - "The absolute pathname of the running SBCL core.") - (sb!alien:define-alien-variable ("posix_argv" *native-posix-argv*) (* (* char))) (sb!alien:define-alien-variable ("core_string" *native-core-string*) (* char)) +(sb!alien:define-alien-routine os-get-runtime-executable-path sb!alien:c-string) ;;; if something ever needs to be done differently for one OS, then ;;; split out the different part into per-os functions. @@ -45,4 +42,6 @@ (/show0 "setting *CORE-PATHNAME*") (setf *core-pathname* (merge-pathnames (native-pathname *core-string*))) + (/show0 "setting *RUNTIME-PATHNAME*") + (setf *runtime-pathname* (native-pathname (os-get-runtime-executable-path))) (/show0 "leaving OS-COLD-INIT-OR-REINIT"))