From 44e1597180fdae3671a643f77cd9af47440da34a Mon Sep 17 00:00:00 2001 From: Eric Timmons Date: Mon, 6 Dec 2021 12:35:15 -0500 Subject: Add implementation of GET-STREAM-FD for CCL and ECL --- src/osicat-sys.lisp | 8 ++++++++ 1 file changed, 8 insertions(+) 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)) -- cgit v1.2.3 From f6a3787ebfa405ebaa76cba694129b8c8260f445 Mon Sep 17 00:00:00 2001 From: Eric Timmons Date: Mon, 6 Dec 2021 12:53:38 -0500 Subject: Run FUTIMENS.1 test on CCL, ECL, or SBCL only Requires a working GET-STREAM-FD, which we only have on those implementations. --- tests/posix.lisp | 1 + 1 file changed, 1 insertion(+) 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)))) -- cgit v1.2.3