[Ecls-list] symbol-macro usage

Marko Kocić marko.kocic at gmail.com
Wed Feb 10 18:09:51 UTC 2010


I'm trying to port hunchentoot to ecl, and I encountered this code in
file specials.lisp in latest hunchentoot that fails to compile with
ecl:

(define-symbol-macro *supports-threads-p*
  #+:lispworks t
  #-:lispworks bt:*supports-threads-p*)

(defvar *global-session-db-lock*
  (load-time-value (and *supports-threads-p* (make-lock
"global-session-db-lock")))
  "A global lock to prevent two threads from modifying *session-db* at
the same time \(or NIL for Lisps which don't have threads).")

When I change defvar to use bt:*supports-threads-p* from
bordeaux-threads directly it compiles ok.

What is missing there, is it something to do with define-symbol-macro
usage or it is missing something, or maybe ecl bug?
Other implementations (sbcl, ccl) don't complain.

I remember reading somewhere that ecl define-symbol-macro, unlike
other implementations, doesn't make symbol available at compile time,
but can't find a reference right now. Maybe this is the issue

Regards,
Marko Kocić




More information about the ecl-devel mailing list