Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
abcl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abcl
abcl
Commits
a29a1cd7
Commit
a29a1cd7
authored
Sep 29, 2016
by
mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EXT:OS-{UNIX,WINDOWS}-P now provide a pre-ASDF runtime check on hosting platform
parent
19c8004b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
12 deletions
+45
-12
src/org/armedbear/lisp/compile-system.lisp
src/org/armedbear/lisp/compile-system.lisp
+2
-1
src/org/armedbear/lisp/featurep.lisp
src/org/armedbear/lisp/featurep.lisp
+30
-0
src/org/armedbear/lisp/run-program.lisp
src/org/armedbear/lisp/run-program.lisp
+13
-11
No files found.
src/org/armedbear/lisp/compile-system.lisp
View file @
a29a1cd7
...
...
@@ -317,6 +317,8 @@
(
load
(
do-compile
"concatenate.lisp"
))
(
load
(
do-compile
"ldb.lisp"
))
(
load
(
do-compile
"destructuring-bind.lisp"
))
(
load
(
do-compile
"featurep.lisp"
))
;; But not for these.
(
mapc
#'
do-compile
'
(
"adjoin.lisp"
"and.lisp"
...
...
@@ -368,7 +370,6 @@
"error.lisp"
"extensible-sequences.lisp"
"fasl-concat.lisp"
"featurep.lisp"
"fdefinition.lisp"
"fill.lisp"
"find-all-symbols.lisp"
...
...
src/org/armedbear/lisp/featurep.lisp
View file @
a29a1cd7
...
...
@@ -51,3 +51,33 @@
(
when
(
featurep
subform
)
(
return
t
))))
(
t
(
error
"Unknown operator in feature expression: ~S"
form
)))))
;;;; Cribbed from ASDF 3.1.7; duplicated to establish runtime conditionals before ASDF is constructed
(
defun
os-macosx-p
()
"Is the underlying operating system MacOS X?"
;; OS-MACOSX is not mutually exclusive with OS-UNIX,
;; in fact the former implies the latter.
(
featurep
'
(
:or
:darwin
(
:and
:allegro
:macosx
)
(
:and
:clisp
:macos
))))
(
defun
os-unix-p
()
"Is the underlying operating system some Unix variant?"
(
or
(
featurep
'
(
:or
:unix
:cygwin
))
(
os-macosx-p
)))
(
defun
os-windows-p
()
"Is the underlying operating system Microsoft Windows?"
(
and
(
not
(
os-unix-p
))
(
featurep
'
(
:or
:win32
:windows
:mswindows
:mingw32
:mingw64
))))
(
defun
os-genera-p
()
"Is the underlying operating system Genera (running on a Symbolics Lisp Machine)?"
(
featurep
:genera
))
(
defun
os-oldmac-p
()
"Is the underlying operating system an (emulated?) MacOS 9 or earlier?"
(
featurep
:mcl
))
(
defun
os-haiku-p
()
"Is the underlying operating system Haiku?"
(
featurep
:haiku
))
(
export
'
(
os-unix-p
os-windows-p
))
src/org/armedbear/lisp/run-program.lisp
View file @
a29a1cd7
...
...
@@ -170,9 +170,13 @@ The &key arguments have the following meanings:
"java.io.File"
(
if
value
(
namestring
value
)
#+
unix
"/dev/null"
#+
windows
"nul"
#-
(
or
unix
windows
)
(
error
"Don't know how to set up null stream on this platform."
))))
(
cond
((
ext:os-unix-p
)
"/dev/null"
)
((
ext:os-windows-p
)
"nul"
)
(
t
(
error
"Don't know how to set up null stream on this platform."
))))))
(
defun
setup-input-redirection
(
process-builder
value
if-does-not-exist
)
(
let
((
redirect
(
if
(
eq
value
T
)
...
...
@@ -298,15 +302,13 @@ The &key arguments have the following meanings:
(
defun
%process-exit-code
(
jprocess
)
(
ignore-errors
(
java:jcall
"exitValue"
jprocess
)))
#+
unix
(
defconstant
+pid-field+
(
defun
%process-pid
(
jprocess
)
(
if
(
ext:os-unix-p
)
;; TODO: memoize this
(
let
((
field
(
java:jcall
"getDeclaredField"
(
java:jclass
"java.lang.UNIXProcess"
)
"pid"
)))
(
java:jcall
"setAccessible"
field
java:+true+
)
field
))
(
defun
%process-pid
(
jprocess
)
#+
unix
(
java:jcall
"get"
+pid-field+
jprocess
)
#-
unix
(
error
"Can't retrieve PID on this platform."
))
(
java:jcall
"get"
field
jprocess
))
(
error
"Can't retrieve PID on this platform."
)))
(
defun
%process-kill
(
jprocess
)
(
java:jcall
"destroy"
jprocess
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment