feat(3p/lisp/mime4cl): enable compilation with CCL

Only significant implementation specific code at the moment is FILE-SIZE
which isn't very important. We can also easily implement it for CCL.

Additionally, we clean up an unused lexical variable warning and remove
a duplicate definiton of MIME-TYPE-STRING fro MIME-UNKNOWN-PART that CCL
doesn't like.

Change-Id: I7c960e50dcdc1d3e46cb4945f36ea315a3c9838d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12862
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
This commit is contained in:
sterni 2024-12-02 23:28:07 +01:00 committed by clbot
parent 302297cfe3
commit 604296bb7c
4 changed files with 3 additions and 7 deletions

View file

@ -45,7 +45,6 @@ depot.nix.buildLisp.library {
# limited by sclf
brokenOn = [
"ccl"
"ecl"
];
}

View file

@ -274,7 +274,8 @@ ELEMENT-TYPE."
;; file; just ask politely.
(defun file-size (pathname)
#+sbcl (sb-posix:stat-size (sb-posix:stat pathname))
#-sbcl (error "nyi"))
#+ccl (ccl:file-data-size pathname)
#-(or sbcl ccl) (error "nyi"))
;; LAZY

View file

@ -500,6 +500,7 @@ separated by PART-BOUNDARY."
(encode-mime-part (mime-body part) stream))
(defmethod encode-mime-part ((part mime-multipart) stream)
(declare (ignore stream)) ; call-next-method
;; choose a boundary if not already set
(let* ((original-boundary (get-mime-type-parameter part :boundary))
(boundary (choose-boundary (mime-parts part) original-boundary)))
@ -998,9 +999,6 @@ is a string."))
(:documentation
"Return the string describing the MIME part."))
(defmethod mime-type-string ((part mime-unknown-part))
(mime-type part))
(defmethod mime-type-string ((part mime-text))
(format nil "text/~A" (mime-subtype part)))

View file

@ -31,9 +31,7 @@
main = "cli:main";
# due to sclf
brokenOn = [
"ccl"
"ecl"
];
}).overrideAttrs (super: {