[asdf-devel] ASDF with RMCL?

Chun Tian (binghe) binghe.lisp at gmail.com
Thu Jan 20 18:32:15 UTC 2011


Hi, Pascal

I took some time for this. It seems that the only problem is in function "getenv":

(defun* getenv (x)
  (#+(or abcl clisp) ext:getenv
   #+allegro sys:getenv
   #+clozure ccl:getenv
   #+(or cmu scl) (lambda (x) (cdr (assoc x ext:*environment-list* :test #'string=)))
   #+ecl si:getenv
   #+gcl system:getenv
   #+lispworks lispworks:environment-variable
   #+sbcl sb-ext:posix-getenv
   x))

This function need to support MCL/RMCL. I couldn't find a exist function to get environment variables, so I wrote one using MCL's FFI (define-entry-point):

#+mcl
(eval-when (:compile-toplevel :load-toplevel :execute)
  (ccl:define-entry-point (_getenv "getenv") ((name :string)) :string))

#+mcl
(defun %getenv (x)
  (ccl:with-cstrs ((name x))
    (let ((value (_getenv name)))
      (unless (ccl:%null-ptr-p value)
	(ccl:%get-cstring value)))))

(If any MCL guru could tell me a easier way to do the same thing, glad to learn it)

Any way, attached patch should fix ASDF 2 on MCL/RMCL, and I do successfully load at least one ASDF system in MCL/ASDF2.

Please confirm my patch.

Regards,

Chun Tian (binghe)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: asdf2-mcl.diff
Type: application/octet-stream
Size: 766 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20110121/7cdeadae/attachment.obj>
-------------- next part --------------


> 
> On 20 Jan 2011, at 14:26, Far? wrote:
> 
>> On 20 January 2011 06:49, Pascal Costanza <pc at p-cos.net> wrote:
>>> It seems that ASDF 2.x doesn't work with RMCL (ASDF 1.x did). Is that a known issue?
>>> 
>> What is RMCL? Digitool's MCL? It might very well have bitrotten,
>> since I don't think anyone has tried it since we started working on ASDF 2.
>> I certainly don't have access to a machine capable of running it.
> 
> RMCL is being maintained, is available from http://code.google.com/p/mcl/ and runs on current Mac OS X versions. (This is just for information, not a hidden attempt to convince anyone to do the work to make ASDF 2 support it.)
> 
>> Look for places with #+clozure, and test the functions individually,
>> making sure you have proper code with #+digitool. Also, some places
>> may incorrectly be using #+ccl where #+clozure is meant, and even
>> where it works, it is probably better to use #+(or clozure digitool).
>> 
>> I would be particularly wary of functions created in recent refactorings,
>> such as SUBDIRECTORIES.
>> 
>> If you get it to work, please provide a patch, which I will apply.
>> Also, it is nice if you can run the test suite.
> 
> I'll see what I can do, but cannot promise anything for the short run.
> 
> Thanks for the quick response!
> 
> 
> Pascal



More information about the asdf-devel mailing list