From da25dc5c1d09bf048895448358f6bb2431557938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Mon, 23 May 2016 07:33:00 +0200 Subject: [PATCH] portability: add fixes for lispworks and mkcl --- cl-bench.lisp | 1 + files/bignum.lisp | 4 ++++ files/math.lisp | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/cl-bench.lisp b/cl-bench.lisp index 66c0475..617c871 100644 --- a/cl-bench.lisp +++ b/cl-bench.lisp @@ -81,6 +81,7 @@ #+lispworks (progn + (setq system:stack-overflow-behaviour nil) (hcl:toggle-source-debugging nil)) diff --git a/files/bignum.lisp b/files/bignum.lisp index 9b97d1b..f0d3af6 100644 --- a/files/bignum.lisp +++ b/files/bignum.lisp @@ -84,6 +84,10 @@ (do ((k 1 (1+ k))) ((> k N) (setq *y* p *z* q)) (let ((w (+ u v))) + #+mkcl + (setf u v + v w) + #-mkcl (shiftf u v w) (setq p (* p w)) (setq q (lcm q w)))))))) diff --git a/files/math.lisp b/files/math.lisp index 70bde74..a3e6cc8 100644 --- a/files/math.lisp +++ b/files/math.lisp @@ -130,6 +130,11 @@ (p1c (if (< p1b 0) (+ p1b +m1+) p1b))) + #+mkcl + (setf (aref state 0) (aref state 1) + (aref state 1) (aref state 2) + (aref state 2) p1c) + #-mkcl (shiftf (aref state 0) (aref state 1) (aref state 2) @@ -148,6 +153,11 @@ (p2c (if (< p2b 0) (+ p2b +m2+) p2b))) + #+mkcl + (setf (aref state 3) (aref state 4) + (aref state 4) (aref state 5) + (aref state 5) p2c) + #-mkcl (shiftf (aref state 3) (aref state 4) (aref state 5) -- GitLab