Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asdf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hugo Ishimaru
asdf
Commits
1595b6fd
Commit
1595b6fd
authored
10 years ago
by
Robert P. Goldman
Browse files
Options
Downloads
Patches
Plain Diff
DEFSETF GETENV added.
Needed for some testing.
parent
8270978f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uiop/os.lisp
+15
-1
15 additions, 1 deletion
uiop/os.lisp
with
15 additions
and
1 deletion
uiop/os.lisp
+
15
−
1
View file @
1595b6fd
...
@@ -76,7 +76,6 @@ that is neither Unix, nor Windows, nor Genera, nor even old MacOS.~%Now you port
...
@@ -76,7 +76,6 @@ that is neither Unix, nor Windows, nor Genera, nor even old MacOS.~%Now you port
(
detect-os
))
(
detect-os
))
;;;; Environment variables: getting them, and parsing them.
;;;; Environment variables: getting them, and parsing them.
(
with-upgradability
()
(
with-upgradability
()
(
defun
getenv
(
x
)
(
defun
getenv
(
x
)
"Query the environment, as in C getenv.
"Query the environment, as in C getenv.
...
@@ -109,6 +108,21 @@ use getenvp to return NIL in such a case."
...
@@ -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
)
#-
(
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
))
(
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
)
(
defun
getenvp
(
x
)
"Predicate that is true if the named variable is present in the libc environment,
"Predicate that is true if the named variable is present in the libc environment,
then returning the non-empty string value of the variable"
then returning the non-empty string value of the variable"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment