Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Carl Shapiro
cmucl
Commits
f73a377e
Commit
f73a377e
authored
33 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Fixed OPEN to deal with the fact that UNIX-NAMESTRING can return NIL.
parent
f5861713
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
code/fd-stream.lisp
+13
-8
13 additions, 8 deletions
code/fd-stream.lisp
with
13 additions
and
8 deletions
code/fd-stream.lisp
+
13
−
8
View file @
f73a377e
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.1
7
1991/12/
07 00:56:04
wlott Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.1
8
1991/12/
16 12:48:45
wlott Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -1317,11 +1317,14 @@ non-server method is also significantly more efficient for large reads.
...
@@ -1317,11 +1317,14 @@ non-server method is also significantly more efficient for large reads.
;; Determine if the file already exists, make sure the original
;; Determine if the file already exists, make sure the original
;; file is not a directory and keep the mode
;; file is not a directory and keep the mode
(
let
((
exists
(
let
((
exists
(
multiple-value-bind
(
and
namestring
(
okay
err/dev
inode
orig-mode
)
(
multiple-value-bind
(
mach:unix-stat
namestring
)
(
okay
err/dev
inode
orig-mode
)
(
declare
(
ignore
inode
)
(
type
(
or
index
null
)
orig-mode
))
(
mach:unix-stat
namestring
)
(
cond
(
okay
(
declare
(
ignore
inode
)
(
type
(
or
index
null
)
orig-mode
))
(
cond
(
okay
(
when
(
and
output
(
=
(
logand
orig-mode
#o170000
)
(
when
(
and
output
(
=
(
logand
orig-mode
#o170000
)
#o40000
))
#o40000
))
(
error
"Cannot open ~S for output: Is a directory."
(
error
"Cannot open ~S for output: Is a directory."
...
@@ -1333,7 +1336,7 @@ non-server method is also significantly more efficient for large reads.
...
@@ -1333,7 +1336,7 @@ non-server method is also significantly more efficient for large reads.
(
t
(
t
(
error
"Cannot find ~S: ~A"
(
error
"Cannot find ~S: ~A"
namestring
namestring
(
mach:get-unix-error-msg
err/dev
)))))))
(
mach:get-unix-error-msg
err/dev
)))))))
)
(
unless
(
and
exists
(
unless
(
and
exists
(
do-old-rename
namestring
original
))
(
do-old-rename
namestring
original
))
(
setf
original
nil
)
(
setf
original
nil
)
...
@@ -1350,7 +1353,9 @@ non-server method is also significantly more efficient for large reads.
...
@@ -1350,7 +1353,9 @@ non-server method is also significantly more efficient for large reads.
(
loop
(
loop
(
multiple-value-bind
(
multiple-value-bind
(
fd
errno
)
(
fd
errno
)
(
mach:unix-open
namestring
mask
mode
)
(
if
namestring
(
mach:unix-open
namestring
mask
mode
)
(
values
nil
mach:enoent
))
(
cond
((
numberp
fd
)
(
cond
((
numberp
fd
)
(
return
(
return
(
case
direction
(
case
direction
...
...
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