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
Pascal J. Bourguignon
asdf
Commits
cf5fa4a8
Commit
cf5fa4a8
authored
14 years ago
by
Francois-Rene Rideau
Browse files
Options
Downloads
Patches
Plain Diff
2.113: when using clisp, use probe-pathname.
Also refactor getenv and get-uid.
parent
a6414fc5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
asdf.lisp
+30
-39
30 additions, 39 deletions
asdf.lisp
with
30 additions
and
39 deletions
asdf.lisp
+
30
−
39
View file @
cf5fa4a8
...
...
@@ -70,7 +70,7 @@
(
eval-when
(
:load-toplevel
:compile-toplevel
:execute
)
(
let*
((
asdf-version
;; the 1+ helps the version bumping script discriminate
(
subseq
"VERSION:2.11
2
"
(
1+
(
length
"VERSION"
))))
(
subseq
"VERSION:2.11
3
"
(
1+
(
length
"VERSION"
))))
(
existing-asdf
(
find-package
:asdf
))
(
vername
'
#:*asdf-version*
)
(
versym
(
and
existing-asdf
...
...
@@ -644,24 +644,16 @@ pathnames."
:append
(
list
k
v
)))
(
defun
getenv
(
x
)
#+
abcl
(
ext:getenv
x
)
#+
sbcl
(
sb-ext:posix-getenv
x
)
#+
clozure
(
ccl:getenv
x
)
#+
clisp
(
ext:getenv
x
)
#+
cmu
(
cdr
(
assoc
(
intern
x
:keyword
)
ext:*environment-list*
))
#+
lispworks
(
lispworks:environment-variable
x
)
#+
allegro
(
sys:getenv
x
)
#+
gcl
(
system:getenv
x
)
#+
ecl
(
si:getenv
x
))
(
#+
abcl
ext:getenv
#+
allegro
sys:getenv
#+
clisp
ext:getenv
#+
clozure
ccl:getenv
#+
(
or
cmu
scl
)
(
lambda
(
x
)
(
cdr
(
assoc
x
ext:*environment-list*
:test
#'
string=
)))
#+
ecl
si:getenv
#+
gcl
system:getenv
#+
lispworks
lispworks:environment-variable
#+
sbcl
sb-ext:posix-getenv
x
))
(
defun
directory-pathname-p
(
pathname
)
"Does PATHNAME represent a directory?
...
...
@@ -724,25 +716,24 @@ actually-existing directory."
#-
(
and
(
or
win32
windows
mswindows
mingw32
)
(
not
cygwin
))
(
progn
#+
clisp
(
defun
get-uid
()
(
posix:uid
))
#+
sbcl
(
defun
get-uid
()
(
sb-unix:unix-getuid
))
#+
cmu
(
defun
get-uid
()
(
unix:unix-getuid
))
#+
ecl
#.
(
cl:and
(
cl:<
ext:+ecl-version-number+
100601
)
'
(
ffi:clines
"#include <sys/types.h>"
"#include <unistd.h>"
))
#+
ecl
(
defun
get-uid
()
#.
(
cl:if
(
cl:<
ext:+ecl-version-number+
100601
)
'
(
ffi:c-inline
()
()
:int
"getuid()"
:one-liner
t
)
'
(
ext::getuid
)))
#+
allegro
(
defun
get-uid
()
(
excl.osi:getuid
))
#-
(
or
cmu
sbcl
clisp
allegro
ecl
)
(
defun
get-uid
()
(
let
((
uid-string
(
with-output-to-string
(
*verbose-out*
)
(
run-shell-command
"id -ur"
))))
(
with-input-from-string
(
stream
uid-string
)
(
read-line
stream
)
(
handler-case
(
parse-integer
(
read-line
stream
))
(
error
()
(
error
"Unable to find out user ID"
)))))))
#+
ecl
#.
(
cl:and
(
cl:<
ext:+ecl-version-number+
100601
)
'
(
ffi:clines
"#include <sys/types.h>"
"#include <unistd.h>"
))
(
defun
get-uid
()
#+
allegro
(
excl.osi:getuid
)
#+
clisp
(
posix:uid
)
#+
(
or
cmu
scl
)
(
unix:unix-getuid
)
#+
ecl
#.
(
cl:if
(
cl:<
ext:+ecl-version-number+
100601
)
'
(
ffi:c-inline
()
()
:int
"getuid()"
:one-liner
t
)
'
(
ext::getuid
))
#+
sbcl
(
sb-unix:unix-getuid
)
#-
(
or
allegro
clisp
cmu
ecl
sbcl
scl
)
(
let
((
uid-string
(
with-output-to-string
(
*verbose-out*
)
(
run-shell-command
"id -ur"
))))
(
with-input-from-string
(
stream
uid-string
)
(
read-line
stream
)
(
handler-case
(
parse-integer
(
read-line
stream
))
(
error
()
(
error
"Unable to find out user ID"
)))))))
(
defun
pathname-root
(
pathname
)
(
make-pathname
:host
(
pathname-host
pathname
)
...
...
@@ -754,7 +745,7 @@ actually-existing directory."
"when given a pathname P, probes the filesystem for a file or directory
with given pathname and if it exists return its truename."
(
and
(
pathnamep
p
)
(
not
(
wild-pathname-p
p
))
#+
clisp
(
ignore-errors
(
true
name
p
)
)
#+
clisp
(
ext:probe-path
name
p
)
#-
clisp
(
probe-file
p
)))
(
defun
truenamize
(
p
)
...
...
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