projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.31.22: improved SAP-{REF,SET}-* for x86-64
[sbcl.git]
/
src
/
code
/
common-os.lisp
diff --git
a/src/code/common-os.lisp
b/src/code/common-os.lisp
index
7de4d46
..
7b32419
100644
(file)
--- a/
src/code/common-os.lisp
+++ b/
src/code/common-os.lisp
@@
-13,12
+13,9
@@
(defvar *software-version* nil)
(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-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.
;;; if something ever needs to be done differently for one OS, then
;;; split out the different part into per-os functions.
@@
-45,4
+42,7
@@
(/show0 "setting *CORE-PATHNAME*")
(setf *core-pathname*
(merge-pathnames (native-pathname *core-string*)))
(/show0 "setting *CORE-PATHNAME*")
(setf *core-pathname*
(merge-pathnames (native-pathname *core-string*)))
+ (/show0 "setting *RUNTIME-PATHNAME*")
+ (let ((exe (os-get-runtime-executable-path)))
+ (setf *runtime-pathname* (when exe (native-pathname exe))))
(/show0 "leaving OS-COLD-INIT-OR-REINIT"))
(/show0 "leaving OS-COLD-INIT-OR-REINIT"))