X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-simple-streams%2Ffile.lisp;h=823d32142afcc486222097a34da3248428ae0349;hb=556e61d75009be4a9fb47a9754692e428b026375;hp=48d48ade5b164f8ca28c521eb1e10d78429e6f4d;hpb=9b729ff750ac2b002c1e391ef441163bec7b4295;p=sbcl.git diff --git a/contrib/sb-simple-streams/file.lisp b/contrib/sb-simple-streams/file.lisp index 48d48ad..823d321 100644 --- a/contrib/sb-simple-streams/file.lisp +++ b/contrib/sb-simple-streams/file.lisp @@ -154,7 +154,7 @@ (with-stream-class (file-simple-stream stream) (let ((fd (or (sm input-handle stream) (sm output-handle stream))) (closed nil)) - (when (sb-int:fixnump fd) + (when (integerp fd) (cond (abort (when (any-stream-instance-flags stream :output) #+win32 (progn (sb-unix:unix-close fd) (setf closed t)) @@ -172,7 +172,7 @@ (defmethod device-file-position ((stream file-simple-stream)) (with-stream-class (file-simple-stream stream) (let ((fd (or (sm input-handle stream) (sm output-handle stream)))) - (if (sb-int:fixnump fd) + (if (integerp fd) (values (sb-unix:unix-lseek fd 0 sb-unix:l_incr)) (file-position fd))))) @@ -180,7 +180,7 @@ (declare (type fixnum value)) (with-stream-class (file-simple-stream stream) (let ((fd (or (sm input-handle stream) (sm output-handle stream)))) - (if (sb-int:fixnump fd) + (if (integerp fd) (values (sb-unix:unix-lseek fd (if (minusp value) (1+ value) value) (if (minusp value) sb-unix:l_xtnd sb-unix:l_set))) @@ -189,7 +189,7 @@ (defmethod device-file-length ((stream file-simple-stream)) (with-stream-class (file-simple-stream stream) (let ((fd (or (sm input-handle stream) (sm output-handle stream)))) - (if (sb-int:fixnump fd) + (if (integerp fd) (multiple-value-bind (okay dev ino mode nlink uid gid rdev size) (sb-unix:unix-fstat (sm input-handle stream)) (declare (ignore dev ino mode nlink uid gid rdev)) @@ -204,7 +204,7 @@ (prot (logior (if input sb-posix::PROT-READ 0) (if output sb-posix::PROT-WRITE 0))) (fd (or (sm input-handle stream) (sm output-handle stream)))) - (unless (sb-int:fixnump fd) + (unless (integerp fd) (error "Can't memory-map an encapsulated stream.")) (multiple-value-bind (okay dev ino mode nlink uid gid rdev size) (sb-unix:unix-fstat fd)