- (unless #!-mp (sb!sys:wait-until-fd-usable
- fd :input (fd-stream-timeout stream))
- #!+mp (sb!mp:process-wait-until-fd-usable
- fd :input (fd-stream-timeout stream))
+ (unless (sb!sys:wait-until-fd-usable
+ fd :input (fd-stream-timeout stream))
(error 'io-timeout :stream stream :direction :read)))
(t
(simple-stream-perror "couldn't check whether ~S is readable"
(error 'io-timeout :stream stream :direction :read)))
(t
(simple-stream-perror "couldn't check whether ~S is readable"
- (unless #!-mp (sb!sys:wait-until-fd-usable
- fd :input (fd-stream-timeout stream))
- #!+mp (sb!mp:process-wait-until-fd-usable
- fd :input (fd-stream-timeout stream))
+ (unless (sb!sys:wait-until-fd-usable
+ fd :input (fd-stream-timeout stream))
(error 'io-timeout :stream stream :direction :read))
(frob-input stream))
(simple-stream-perror "couldn't read from ~S" stream errno)))
(error 'io-timeout :stream stream :direction :read))
(frob-input stream))
(simple-stream-perror "couldn't read from ~S" stream errno)))
;;; Pick a name to use for the backup file for the :IF-EXISTS
;;; :RENAME-AND-DELETE and :RENAME options.
(defun pick-backup-name (name)
;;; Pick a name to use for the backup file for the :IF-EXISTS
;;; :RENAME-AND-DELETE and :RENAME options.
(defun pick-backup-name (name)
;;; Ensure that the given arg is one of the given list of valid
;;; things. Allow the user to fix any problems.
;;; Ensure that the given arg is one of the given list of valid
;;; things. Allow the user to fix any problems.
:ELEMENT-TYPE - the type of object to read or write, default BASE-CHAR
:IF-EXISTS - one of :ERROR, :NEW-VERSION, :RENAME, :RENAME-AND-DELETE,
:OVERWRITE, :APPEND, :SUPERSEDE or NIL
:ELEMENT-TYPE - the type of object to read or write, default BASE-CHAR
:IF-EXISTS - one of :ERROR, :NEW-VERSION, :RENAME, :RENAME-AND-DELETE,
:OVERWRITE, :APPEND, :SUPERSEDE or NIL
- (unless (eq external-format :default)
- (error "Any external format other than :DEFAULT isn't recognized."))
-
- ;; First, make sure that DIRECTION is valid.
- (ensure-one-of direction
- '(:input :output :io :probe)
- :direction)
-
(stream-reinit)
(setf *terminal-io* (make-synonym-stream '*tty*))
(setf *standard-output* (make-synonym-stream '*stdout*))
(stream-reinit)
(setf *terminal-io* (make-synonym-stream '*tty*))
(setf *standard-output* (make-synonym-stream '*stdout*))
(setf *error-output* (make-synonym-stream '*stderr*))
(setf *query-io* (make-synonym-stream '*terminal-io*))
(setf *debug-io* *query-io*)
(setf *error-output* (make-synonym-stream '*stderr*))
(setf *query-io* (make-synonym-stream '*terminal-io*))
(setf *debug-io* *query-io*)