From 26e7a4f354c970ebea000cf6ae8d79286b9f2a3b Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Wed, 6 Feb 2013 17:14:43 +0100
Subject: [PATCH] 2.28.3: make the recent EVAL-WHEN non-sense work on
 LispWorks.

Also, decouple with-muffled-compiler-condtions from with-saved-deferred-warnings.
---
 action.lisp              |  5 +++--
 asdf.asd                 |  2 +-
 bundle.lisp              |  3 ++-
 common-lisp.lisp         | 10 +++++-----
 header.lisp              |  2 +-
 lisp-build.lisp          | 20 +++++++++++---------
 test/script-support.lisp |  1 -
 upgrade.lisp             |  2 +-
 utility.lisp             |  3 ++-
 version.lisp-expr        |  2 +-
 10 files changed, 27 insertions(+), 23 deletions(-)

diff --git a/action.lisp b/action.lisp
index 2e078abf..25bec89f 100644
--- a/action.lisp
+++ b/action.lisp
@@ -19,9 +19,10 @@
    #:action-path #:find-action #:stamp #:done-p))
 (in-package :asdf/action)
 
-(with-upgradability ()
-  (deftype action () '(cons operation component)) ;; a step to be performed while building the system
+(eval-when (#-lispworks :compile-toplevel :load-toplevel :execute)
+  (deftype action () '(cons operation component))) ;; a step to be performed while building
 
+(with-upgradability ()
   (defgeneric traverse-actions (actions &key &allow-other-keys))
   (defgeneric traverse-sub-actions (operation component &key &allow-other-keys))
   (defgeneric required-components (component &key &allow-other-keys)))
diff --git a/asdf.asd b/asdf.asd
index 21e646c8..ceb98a6e 100644
--- a/asdf.asd
+++ b/asdf.asd
@@ -74,7 +74,7 @@
   :licence "MIT"
   :description "Another System Definition Facility"
   :long-description "ASDF builds Common Lisp software organized into defined systems."
-  :version "2.28.2" ;; to be automatically updated by make bump-version
+  :version "2.28.3" ;; to be automatically updated by make bump-version
   :depends-on ()
   #+asdf3 :encoding #+asdf3 :utf-8
   ;; For most purposes, asdf itself specially counts as a builtin system.
diff --git a/bundle.lisp b/bundle.lisp
index 7dd4af37..e8ee05f6 100644
--- a/bundle.lisp
+++ b/bundle.lisp
@@ -178,8 +178,9 @@
   (defun user-system-p (s)
     (and (typep s 'system)
          (not (builtin-system-p s))
-         (not (trivial-system-p s))))
+         (not (trivial-system-p s)))))
 
+(eval-when (#-lispworks :compile-toplevel :load-toplevel :execute)
   (deftype user-system () '(and system (satisfies user-system-p))))
 
 ;;;
diff --git a/common-lisp.lisp b/common-lisp.lisp
index 744afbc6..f3c6e75e 100644
--- a/common-lisp.lisp
+++ b/common-lisp.lisp
@@ -169,11 +169,11 @@
                           (t
                            (recurse more start end))))))))
         (recurse substrings 0 length))
-      (if stream (get-output-stream-string stream) ""))))
+      (if stream (get-output-stream-string stream) "")))
 
-(defmacro compatfmt (format)
-  #+(or gcl genera)
-  (remove-substrings `("~3i~_" #+(or genera gcl2.6) ,@'("~@<" "~@;" "~@:>" "~:>")) format)
-  #-(or gcl genera) format)
+  (defmacro compatfmt (format)
+    #+(or gcl genera)
+    (remove-substrings `("~3i~_" #+(or genera gcl2.6) ,@'("~@<" "~@;" "~@:>" "~:>")) format)
+    #-(or gcl genera) format))
 
 
diff --git a/header.lisp b/header.lisp
index cb2a9f21..1c61d5fa 100644
--- a/header.lisp
+++ b/header.lisp
@@ -1,5 +1,5 @@
 ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
-;;; This is ASDF 2.28.2: Another System Definition Facility.
+;;; This is ASDF 2.28.3: Another System Definition Facility.
 ;;;
 ;;; Feedback, bug reports, and patches are all welcome:
 ;;; please mail to <asdf-devel@common-lisp.net>.
diff --git a/lisp-build.lisp b/lisp-build.lisp
index 147f75e7..49f8f87a 100644
--- a/lisp-build.lisp
+++ b/lisp-build.lisp
@@ -86,6 +86,8 @@ Note that ASDF ALWAYS raises an error if it fails to create an output file when
     (append
      ;;#+clozure '(ccl:compiler-warning)
      #+cmu '("Deleting unreachable code.")
+     #+lispworks '("~S being redefined in ~A (previously in ~A)."
+                   "~S defined more than once in ~A.") ;; lispworks gets confused by eval-when.
      #+sbcl
      '(sb-c::simple-compiler-note
        "&OPTIONAL and &KEY found in the same lambda list: ~S"
@@ -393,8 +395,7 @@ possibly in a different process."
           (unwind-protect
                (let (#+sbcl (sb-c::*undefined-warnings* nil))
                  (multiple-value-prog1
-                     (with-muffled-compiler-conditions ()
-                       (funcall thunk))
+                     (funcall thunk)
                    (save-deferred-warnings warnings-file)))
             (reset-deferred-warnings)))
         (funcall thunk)))
@@ -486,13 +487,14 @@ it will filter them appropriately."
            (tmp-lib (make-pathname :type "lib" :defaults tmp-file)))
       (multiple-value-bind (output-truename warnings-p failure-p)
           (with-saved-deferred-warnings (warnings-file)
-            (or #-(or ecl mkcl) (apply 'compile-file input-file :output-file tmp-file keywords)
-                #+ecl (apply 'compile-file input-file :output-file
-                             (if object-file
-                                 (list* object-file :system-p t keywords)
-                                 (list* tmp-file keywords)))
-                #+mkcl (apply 'compile-file input-file
-                              :output-file object-file :fasl-p nil keywords)))
+            (with-muffled-compiler-conditions ()
+              (or #-(or ecl mkcl) (apply 'compile-file input-file :output-file tmp-file keywords)
+                  #+ecl (apply 'compile-file input-file :output-file
+                               (if object-file
+                                   (list* object-file :system-p t keywords)
+                                   (list* tmp-file keywords)))
+                  #+mkcl (apply 'compile-file input-file
+                                :output-file object-file :fasl-p nil keywords))))
         (cond
           ((and output-truename
                 (flet ((check-flag (flag behaviour)
diff --git a/test/script-support.lisp b/test/script-support.lisp
index 09e9164f..34d80ecb 100644
--- a/test/script-support.lisp
+++ b/test/script-support.lisp
@@ -387,7 +387,6 @@ is bound, write a message and exit on an error.  If
             (ignore-errors (load-asdf-fasl tag)))
        :previously-compiled)
       (t
-       (load-asdf-lisp tag)
        (compile-asdf tag)))))
 
 (defun compile-asdf-script ()
diff --git a/upgrade.lisp b/upgrade.lisp
index 5913e781..094b5436 100644
--- a/upgrade.lisp
+++ b/upgrade.lisp
@@ -52,7 +52,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
          ;; "3.4.5.67" would be a development version in the official upstream of 3.4.5.
          ;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
          ;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
-         (asdf-version "2.28.2")
+         (asdf-version "2.28.3")
          (existing-version (asdf-version)))
     (setf *asdf-version* asdf-version)
     (when (and existing-version (not (equal asdf-version existing-version)))
diff --git a/utility.lisp b/utility.lisp
index a15b16a4..54e474ed 100644
--- a/utility.lisp
+++ b/utility.lisp
@@ -241,8 +241,9 @@ starting the separation from the end, e.g. when called with arguments
 
 
 ;;; stamps: a REAL or boolean where NIL=-infinity, T=+infinity
+(eval-when (#-lispworks :compile-toplevel :load-toplevel :execute)
+  (deftype stamp () '(or real boolean)))
 (with-upgradability ()
-  (deftype stamp () '(or real boolean))
   (defun stamp< (x y)
     (etypecase x
       (null (and y t))
diff --git a/version.lisp-expr b/version.lisp-expr
index 35aee76c..e919307b 100644
--- a/version.lisp-expr
+++ b/version.lisp-expr
@@ -1 +1 @@
-"2.28.2"
+"2.28.3"
-- 
GitLab