jscl-project / jscl

A Lisp-to-JavaScript compiler bootstrapped from Common Lisp

Home Page:https://jscl-project.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Host compilation on WIN7/CCL

vlad-km opened this issue · comments

commented

Compilation of win7/CCL breaks if a return carriage (#\Return) is encountered in the stream.
It is possible to solve it by replacing it with a #\Space.

For example:

(defun read-whole-file (filename)
    (with-open-file (in filename)
        (let ((seq (make-array (file-length in) :element-type 'character)))
            (read-sequence seq in)
            (substitute-if #\Space #'(lambda (char) (eql char #\Return)) seq))))
commented

compilation-notice function

Package sb-posix is absent in the CCL (only SBCL).

I would suggest replacing the form

       (if (sb-posix:getenv "SOURCE_DATE_EPOCH")
                        (+ (parse-integer (sb-posix:getenv "SOURCE_DATE_EPOCH")) 2208988800)
                        (get-universal-time))

to the following:

             #+sbcl (if (sb-posix:getenv "SOURCE_DATE_EPOCH")
                         (+ (parse-integer (sb-posix:getenv "SOURCE_DATE_EPOCH")) 2208988800)
                         (get-universal-time))
              #+ccl (get-universal-time)

I would like to keep the environment variable though. It is used to make the build reproducible.

Can we define getenv conditionally for sbcl and ccl in a file? We can add all non-standard code in there.

commented

CCL have (getenv key) function.

I want to see what and how can I do under CCL.