Permalink
Browse files

Try to ignore error signaled when redefining a DEFKONWN on SBCL

  • Loading branch information...
sionescu committed Jun 4, 2010
1 parent 812767c commit 979fe2a9eda2af3483aef9e3cf8c1fd0d1402ec4
Showing with 18 additions and 1 deletion.
  1. +18 −1 swap-bytes.asd
View
@@ -1,11 +1,28 @@
;;; -*- Mode: Lisp -*-
+(defpackage :swap-bytes-system
+ (:use :common-lisp :asdf))
+(in-package :swap-bytes-system)
+
+;; ACHTUNG: Kludge. Redefining a DEFKNOWN signals an error ad load-time
+;; which we try to ignore
+#+sbcl
+(defclass sbcl-file (cl-source-file) ())
+
+#+sbcl
+(defmethod perform ((o load-op) (c sbcl-file))
+ (handler-bind ((simple-error
+ (lambda (e)
+ (let ((r (find-restart 'continue)))
+ (if r (invoke-restart r) (error e))))))
+ (call-next-method)))
+
(defsystem :swap-bytes
:depends-on (:trivial-features)
:serial t
:components ((:file "package")
#+ccl (:file "ccl")
- #+sbcl (:file "sbcl-defknowns")
+ #+sbcl (:sbcl-file "sbcl-defknowns")
#+sbcl (:file "sbcl-vops")
#+sbcl (:file "sbcl")
(:file "portable")))

0 comments on commit 979fe2a

Please sign in to comment.