diff options
author | daewok <daewok@users.noreply.github.com> | 2022-01-11 17:47:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-11 17:47:34 -0500 |
commit | 78f5be40e2e6afd4091900f81011769ed8a93cd0 (patch) | |
tree | 72c513a28c14bef927ac90b9b0bc58bb20036625 | |
parent | a743477c175ea123730f1968c3fc962ec42a5337 (diff) | |
parent | f6a3787ebfa405ebaa76cba694129b8c8260f445 (diff) |
Merge pull request #56 from daewok/add-get-stream-fd-ccl-and-ecl
Add get-stream-fd on CCL and ECL
-rw-r--r-- | src/osicat-sys.lisp | 8 | ||||
-rw-r--r-- | tests/posix.lisp | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/osicat-sys.lisp b/src/osicat-sys.lisp index 8d8904c..de352b5 100644 --- a/src/osicat-sys.lisp +++ b/src/osicat-sys.lisp @@ -163,6 +163,14 @@ different kinds of streams. Returns the FD of STREAM.")) (defmethod get-stream-fd ((stream file-stream)) (sb-sys:fd-stream-fd stream)) +#+ecl +(defmethod get-stream-fd ((stream file-stream)) + (si:file-stream-fd stream)) + +#+ccl +(defmethod get-stream-fd ((stream ccl::basic-file-stream)) + (ccl::ioblock-device (ccl::basic-stream-ioblock stream))) + (define-designator file-descriptor :int (stream (get-stream-fd file-descriptor)) (integer file-descriptor)) diff --git a/tests/posix.lisp b/tests/posix.lisp index bf6c4fd..015f437 100644 --- a/tests/posix.lisp +++ b/tests/posix.lisp @@ -537,6 +537,7 @@ (= (nix:stat-mtime-nsec stat) (* 1000 mtime-usec))))) (t t t t)) +#+(or ccl ecl sbcl) (define-posix-test futimens.1 (let ((file (merge-pathnames #p"futimens.1" *test-directory*)) (atime-sec (random (1- (expt 2 31)))) |