From b1b43e74be3d133bd1edf7d17adb607f8290331f Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Mon, 16 Dec 2013 18:22:23 +0400 Subject: [PATCH] Restore cross-compilation with CLISP. Due to WHILE before FOR in a LOOP in sb-impl::split-version-string. Reported by Vasily Postnicov. --- NEWS | 2 ++ src/code/late-extensions.lisp | 25 +++++++++---------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/NEWS b/NEWS index 364d1e9..38476e6 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ changes relative to sbcl-1.1.14: (patch by Wilfredo Velazquez, lp#1256034). * bug fix: modular arithmetic optimizations do not stumble on dead branches with bad constants. (reported by Douglas Katzman) + * bug fix: CLISP can be used again as a cross-compilation host. + (Thanks to Vasily Postnicov) changes in sbcl-1.1.14 relative to sbcl-1.1.13: * optimization: complicated TYPEP tests are less opaque to the type diff --git a/src/code/late-extensions.lisp b/src/code/late-extensions.lisp index bcfaafe..1ae8ae9 100644 --- a/src/code/late-extensions.lisp +++ b/src/code/late-extensions.lisp @@ -438,22 +438,15 @@ Works on all CASable places." finally (return (car ,old)))))) (defun split-version-string (string) - (loop - with start = 0 - and end = (length string) - while (and start (< start end)) - for subversion = (multiple-value-bind (subversion next) - (parse-integer string :start start - :junk-allowed t) - (setf start - (and subversion - next - (< next end) - (eql #\. (aref string next)) - (1+ next))) - subversion) - when subversion - collect subversion)) + (loop with subversion and start = 0 + with end = (length string) + when (setf (values subversion start) + (parse-integer string :start start :junk-allowed t)) + collect it + while (and subversion + (< start end) + (char= (char string start) #\.)) + do (incf start))) (defun version>= (x y) (unless (or x y) -- 1.7.10.4