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
A
asdf
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
Pascal J. Bourguignon
asdf
Commits
1595b6fd
Commit
1595b6fd
authored
Nov 30, 2014
by
Robert P. Goldman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DEFSETF GETENV added.
Needed for some testing.
parent
8270978f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
uiop/os.lisp
uiop/os.lisp
+15
-1
No files found.
uiop/os.lisp
View file @
1595b6fd
...
...
@@ -76,7 +76,6 @@ that is neither Unix, nor Windows, nor Genera, nor even old MacOS.~%Now you port
(
detect-os
))
;;;; Environment variables: getting them, and parsing them.
(
with-upgradability
()
(
defun
getenv
(
x
)
"Query the environment, as in C getenv.
...
...
@@ -109,6 +108,21 @@ use getenvp to return NIL in such a case."
#-
(
or
abcl
allegro
clisp
clozure
cmu
cormanlisp
ecl
gcl
genera
lispworks
mcl
mkcl
sbcl
scl
xcl
)
(
error
"~S is not supported on your implementation"
'getenv
))
(
defsetf
getenv
(
x
)
(
val
)
"Set an environment variable."
(
declare
(
ignorable
x
val
))
#+
clisp
`
(
system::setenv
,
x
,
val
)
#+
ecl
`
(
ext:setenv
,
x
,
val
)
#+
allegro
`
(
setf
(
sys:getenv
,
x
)
,
val
)
#+
clozure
`
(
ccl:setenv
,
x
,
val
)
#+
cmu
`
(
unix:unix-setenv
,
x
,
val
1
)
#+
lispworks
`
(
hcl:setenv
,
x
,
val
)
#+
mkcl
`
(
mkcl:setenv
,
x
,
val
)
#+
sbcl
`
(
progn
(
require
:sb-posix
)
(
symbol-call
:sb-posix
:setenv
,
x
,
val
1
))
#-
(
or
allegro
clisp
clozure
ecl
lispworks
mkcl
sbcl
cmu
)
'
(
error
"SETF ~S is not supported on your implementation"
'getenv
))
(
defun
getenvp
(
x
)
"Predicate that is true if the named variable is present in the libc environment,
then returning the non-empty string value of the variable"
...
...
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