Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 axiom (20170501-14) unstable; urgency=medium
 .
   * support gcl27
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2025-02-09

--- axiom-20170501.orig/books/bookvol5.pamphlet
+++ axiom-20170501/books/bookvol5.pamphlet
@@ -3071,7 +3071,7 @@ The trace1 function handles the options
               (when ops (setq ops (|getTraceOption| ops)) nil)
               (when lops 
                (setq lops (cdr (|getTraceOption| lops)))
-               (|untraceDomainLocalOps| constructor lops)))))))
+               (|untraceDomainLocalOps|))))))); constructor lops
       ((and (< 1 (length options))
             (null (|hasOption| options '|nonquietly|)))
           (|throwKeyedMsg|
@@ -3489,7 +3489,7 @@ it shows up as
 \begin{chunk}{defun monitorX}
 (defun monitorX (args funct opts)
  (declare (special |$monitorDepth| |$depthAlist|))
-  (monitorXX args funct opts |$monitorDepth| |$depthAlist|))))
+  (monitorXX args funct opts |$monitorDepth| |$depthAlist|));))
 
 \end{chunk}
 
@@ -16986,6 +16986,7 @@ Note that incRgen recursively wraps this
 \begin{chunk}{postvars}
 (eval-when (eval load)
 (defvar |scanKeyWords|
+ (nconc	
  (list
   (list "add" 'add)
   (list "and" 'and)
@@ -17046,7 +17047,8 @@ Note that incRgen recursively wraps this
   (list "^" 'carat)
   (list ".." 'seg)
   (list "#" '|#|)
-  (list "&" 'ampersand)
+  (list "&" 'ampersand))
+  (list
   (list "$" '$)
   (list "/" 'slash)
   (list "\\" 'backslash)
@@ -17080,7 +17082,7 @@ Note that incRgen recursively wraps this
   (list "<<" 'oangle)
   (list ">>" 'cangle)
   (list "'" '|'|)
-  (list "`" 'backquote))))
+  (list "`" 'backquote)))))
 
 \end{chunk}
 
@@ -22036,7 +22038,7 @@ of the form ('expression expr position)
    (progn
     (setq parts0 (|pfParts| pform))
     (setq parts1 (loop for p in parts0 collect (funcall f p)))
-    (if (reduce #'(lambda (u v) (and u v)) (mapcar #'eq parts0 parts1))
+    (if (reduce #'(lambda (u v) (and u v)) (mapcar #'eq parts0 parts1) :initial-value t)
      pform
      (|pfTree| (|pfAbSynOp| pform) parts1))))))
 
@@ -30234,7 +30236,7 @@ This function is funcalled from code con
   (when (and (eq (first t2) '|SimpleAlgebraicExtension|)
              (equal (second t2) (|objMode| triple)))
     (unless (setq x (|coerceInt| triple (third t2)))
-     (|coerceInt| x t2))))))
+     (|coerceInt| x t2)))));)
 
 \end{chunk}
 
@@ -49344,7 +49346,7 @@ Map the 2nd and the 4th quadrants to fir
 \begin{chunk}{defun cgammaG 0}
 (defun cgammaG (real imag)
   (- (+ (log (* 2 Pi)) (* Pi imag))
-     (* (* (complex 0.0 1.0) Pi) (- real 0.5))))))
+     (* (* (complex 0.0 1.0) Pi) (- real 0.5))));))
 
 \end{chunk}
 
@@ -50522,7 +50524,7 @@ up to overflow.  See Hart and Cheney.
 \calls{rbesselj}{BesselJ}
 \begin{chunk}{defun rbesselj}
 (defun rbesselj (n x)
-  (c-to-r (BesselJ n x)) ))
+  (c-to-r (BesselJ n x)));)
 
 \end{chunk}
 
@@ -50541,7 +50543,7 @@ up to overflow.  See Hart and Cheney.
 \calls{rbesseli}{BesselI}
 \begin{chunk}{defun rbesseli}
 (defun rbesseli (n x)
-  (c-to-r (BesselI n x)) ))
+  (c-to-r (BesselI n x)));)
 
 \end{chunk}
 
@@ -51141,7 +51143,7 @@ are 0 based whereas other Spad language
 \begin{chunk}{defun StringToDir}
 (defun |StringToDir| (s)
   (cond
-    ((string= s "/") '(:root))
+    ((string= s "/") '(:absolute))
     ((string= s "")  nil)
     (t
       (let ((lastc (aref s (- (length s) 1))))
@@ -51164,7 +51166,7 @@ For example,  ``/''  ``/u/smwatt''  ``..
 \begin{chunk}{defun DirToString 0}
 (defun |DirToString| (d)
   (cond
-    ((equal d '(:root)) "/")
+    ((equal d '(:absolute)) "/")
     ((null d) "")
     ('t (string-right-trim "/" (namestring (make-pathname :directory d)))) ))
 
@@ -57398,8 +57400,8 @@ title and a function to call when presse
 \calls{bcSeriesByFormulaGen}{bcNotReady}
 \begin{chunk}{defun bcSeriesByFormulaGen}
 (defun |bcSeriesByFormulaGen| (htPage) 
- (declare (ignore htPage))
- (|bcNotReady|))
+; (declare (ignore htPage))
+ (|bcNotReady| htPage))
 
 \end{chunk}
 
@@ -62294,7 +62296,8 @@ There are 8 parts of an htPage:
       (setq u
        (reduce #'concat
         (loop for x in (|dbString2Words| filter) 
-              collect (|string2Constructor| x))))
+              collect (|string2Constructor| x))
+	      :initial-value ""))
       (|conSpecialString?| u t)))))))
 
 \end{chunk}
@@ -63409,7 +63412,7 @@ There are 8 parts of an htPage:
         (t
           (setq argTailPart
            (apply #'concat
-            (loop for x in (ifcdr args) collect (concat (cons "," x)))))
+            (loop for x in (ifcdr args) collect (apply #'concat (cons "," x)))))
           (apply #'concat (list "(" (car args) argTailPart ")")))))
       (setq typeForm
        (or (catch 'spad_reader (|unabbrev| (|mkConform| kind name argString)))
--- axiom-20170501.orig/books/bookvol9.pamphlet
+++ axiom-20170501/books/bookvol9.pamphlet
@@ -4604,7 +4604,7 @@ Token at head of input stream.
 \defstruct{reduction}
 A reduction of a rule is any S-Expression the rule chooses to stack.
 \begin{chunk}{initvars}
-(defstruct (reduction (:type list))
+(defstruct (reduction (:type cl::list))
   (rule nil)            ; Name of rule
   (value nil))
 
@@ -7849,9 +7849,11 @@ which will walk the structure $Y$ lookin
     (setq argl (qrest c))
     (cond
      ((eq op '|Join|)
-       (cons '|Join|
-        (loop for x in argl
-         collect (|mkEvalableCategoryForm| x))))
+      `(|JoinInner|
+	 (list ,@(loop for x in argl collect (|mkEvalableCategoryForm| x)))
+	 (if (or (not (boundp '|$e|)) (null |$e|) |$InteractiveMode|)
+             |$CategoryFrame|
+             |$e|)))
      ((eq op '|DomainSubstitutionMacro|)
        (|mkEvalableCategoryForm| (cadr argl)))
      ((eq op '|mkCategory|) c)
@@ -12587,7 +12589,7 @@ by setting the {\tt special} keyword on
             (|unknownTypeError| argt)
             argt)))
         (cond
-         ((eq (car argf) 'listof)
+         ((when (consp argf) (eq (car argf) 'listof))
            (dolist (x (cdr argf) td)
              (setq td (|compColon| (list '|:| x argt) mode env))
              (setq env (third td))))
@@ -17026,7 +17028,7 @@ of the symbol being parsed. The original
                       (setq a (cdr tmp4))
                       nil))
                    (nreverse0 tmp2))
-              (push (list 'in g (list 'identity a))) tmp2))
+              (push (list 'in g (list 'identity a)) tmp2)))
           (list (aplTran1 (cons op futureArgl)))))
          (list (cdar arglAssoc))))
      (t (cons op argl)))))))
@@ -20590,11 +20592,11 @@ digraph hierarchy {
             (equal (car (setq v (ifcdr v))) #\}))
         (setq u v) 
         acc)
-      ((or (char= x #\$) (string= x "$"))
+      ((string= x "$");(or (char= x #\$) )
         (cons "\\$" acc))
-      ((or (char= x #\%) (string= x "%"))
+      ((string= x "%");(or (char= x #\%))
         (cons "\\%" acc))
-      ((or (char= x #\,) (string= x ","))
+      ( (string= x ",");(or (char= x #\,))
         (cons ",{}" acc))
       ((string= x "\\spad")
         (cons "\\spad" acc))
--- axiom-20170501.orig/src/algebra/libdb.text
+++ axiom-20170501/src/algebra/libdb.text
@@ -5,20 +5,29 @@ amultiplicativeValuation`0`x``cIntegerNu
 anil`0`x``cAdditiveValuationAttribute``
 anoetherian`0`x``dSingleInteger``\spad{noetherian} all ideals are finitely generated (in fact principal).
 cAdditiveValuationAttribute`0`x`()->Category``ATADDVA`The class of all euclidean domains such that
+cArcHyperbolicFunctionCategory`0`x`()->Category``AHYP`Category for the inverse hyperbolic trigonometric functions.
 cIntegerNumberSystem`0`x`()->Category``INS`An \spad{IntegerNumberSystem} is a model for the integers.
 dPlaneAlgebraicCurvePlot`0`x`()->Join(PlottablePlaneCurveCategory,etc)``ACPLOT`\indented{1}{Plot a NON-SINGULAR plane algebraic curve \spad{p}(\spad{x},{}\spad{y}) = 0.} Author: Clifton \spad{J}. Williamson Date Created: Fall 1988 Date Last Updated: 27 April 1990 Keywords: algebraic curve,{} non-singular,{} plot Examples: References:
 dSingleInteger`0`x`()->Join(IntegerNumberSystem,etc)``SINT`SingleInteger is intended to support machine integer arithmetic.
+dSparseUnivariateLaurentSeries`3`x`(:(Coef,Ring),:(var,Symbol),:(cen,Coef))->Join(UnivariateLaurentSeriesConstructorCategory(Coef,SparseUnivariateTaylorSeries(Coef,var,cen)),etc)`(Coef,var,cen)`SULS`Sparse Laurent series in one variable \spadtype{SparseUnivariateLaurentSeries} is a domain representing Laurent series in one variable with coefficients in an arbitrary ring. The parameters of the type specify the coefficient ring, the power series variable, and the center of the power series expansi----on. For example, \spad{SparseUnivariateLaurentSeries(Integer,x,3)} represents Laurent series in \spad{(x - 3)} with integer coefficients.
 o/\`2`x`(_$,_$)->_$`dSingleInteger``\spad{n} \spad{/\} \spad{m} returns the bit-by-bit logical {\em and} of the single integers \spad{n} and \spad{m}.
 oAnd`2`x`(_$,_$)->_$`dSingleInteger``\spad{And(n,{}m)} returns the bit-by-bit logical {\em and} of the single integers \spad{n} and \spad{m}.
 oNot`1`x`(_$)->_$`dSingleInteger``\spad{Not(n)} returns the bit-by-bit logical {\em not} of the single integer \spad{n}.
 oOr`2`x`(_$,_$)->_$`dSingleInteger``\spad{Or(n,{}m)} returns the bit-by-bit logical {\em or} of the single integers \spad{n} and \spad{m}.
 o\/`2`x`(_$,_$)->_$`dSingleInteger``\spad{n} \spad{\/} \spad{m} returns the bit-by-bit logical {\em or} of the single integers \spad{n} and \spad{m}.
+oacosh`1`x`(_$)->_$`cArcHyperbolicFunctionCategory``\spad{acosh(x)} returns the hyperbolic arc-cosine of \spad{x.}
+oacoth`1`x`(_$)->_$`cArcHyperbolicFunctionCategory``\spad{acoth(x)} returns the hyperbolic arc-cotangent of \spad{x.}
+oacsch`1`x`(_$)->_$`cArcHyperbolicFunctionCategory``\spad{acsch(x)} returns the hyperbolic arc-cosecant of \spad{x.}
 oaddmod`3`x`(_$,_$,_$)->_$`cIntegerNumberSystem``\spad{addmod(a,{}b,{}p)},{} \spad{0<=a,{}b<p>1},{} means \spad{a+b mod p}.
+oasech`1`x`(_$)->_$`cArcHyperbolicFunctionCategory``\spad{asech(x)} returns the hyperbolic arc-secant of \spad{x.}
+oasinh`1`x`(_$)->_$`cArcHyperbolicFunctionCategory``\spad{asinh(x)} returns the hyperbolic arc-sine of \spad{x.}
+oatanh`1`x`(_$)->_$`cArcHyperbolicFunctionCategory``\spad{atanh(x)} returns the hyperbolic arc-tangent of \spad{x.}
 obase`0`x`()->_$`cIntegerNumberSystem``\spad{base()} returns the base for the operations of \spad{IntegerNumberSystem}.
 obinomial`2`x`(S,S)->S`xIntegerNumberSystem&(S)``
 obit?`2`x`(S,S)->Boolean`xIntegerNumberSystem&(S)``
 obit?`2`x`(_$,_$)->Boolean`cIntegerNumberSystem``\spad{bit?(n,{}i)} returns \spad{true} if and only if \spad{i}-th bit of \spad{n} is a 1.
 ocharacteristic`0`x`()->NonNegativeInteger`xIntegerNumberSystem&(S)``
+ocoerce`1`x`(Variable(var))->_$`dSparseUnivariateLaurentSeries(Coef,var,cen)``\spad{coerce(var)} converts the series variable \spad{var} into a Laurent series.
 oconvert`1`x`(S)->DoubleFloat`xIntegerNumberSystem&(S)``
 oconvert`1`x`(S)->Float`xIntegerNumberSystem&(S)``
 oconvert`1`x`(S)->InputForm`xIntegerNumberSystem&(S)``
@@ -29,6 +38,7 @@ ocopy`1`x`(_$)->_$`cIntegerNumberSystem`
 odec`1`x`(_$)->_$`cIntegerNumberSystem``\spad{dec(x)} returns \spad{x - 1}.
 odifferentiate`1`x`(S)->S`xIntegerNumberSystem&(S)``
 odifferentiate`2`x`(S,NonNegativeInteger)->S`xIntegerNumberSystem&(S)``
+odifferentiate`2`x`(_$,Variable(var))->_$`dSparseUnivariateLaurentSeries(Coef,var,cen)``\spad{differentiate(f(x),x)} returns the derivative of \spad{f(x)} with respect to \spad{x}.
 oeuclideanSize`1`x`(S)->NonNegativeInteger`xIntegerNumberSystem&(S)``
 oeven?`1`x`(S)->Boolean`xIntegerNumberSystem&(S)``
 oeven?`1`x`(_$)->Boolean`cIntegerNumberSystem``\spad{even?(n)} returns \spad{true} if and only if \spad{n} is even.
@@ -37,10 +47,11 @@ ofactorial`1`x`(S)->S`xIntegerNumberSyst
 ohash`1`x`(_$)->_$`cIntegerNumberSystem``\spad{hash(n)} returns the hash code of \spad{n}.
 oinc`1`x`(_$)->_$`cIntegerNumberSystem``\spad{inc(x)} returns \spad{x + 1}.
 oinit`0`x`()->S`xIntegerNumberSystem&(S)``
+ointegrate`2`x`(_$,Variable(var))->_$`dSparseUnivariateLaurentSeries(Coef,var,cen)`has(Coef,Algebra(Fraction(Integer)))`\spad{integrate(f(x))} returns an anti-derivative of the power series \spad{f(x)} with constant coefficient 0. We may integrate a series when we can divide coefficients by integers.
 oinvmod`2`x`(S,S)->S`xIntegerNumberSystem&(S)``
 oinvmod`2`x`(_$,_$)->_$`cIntegerNumberSystem``\spad{invmod(a,{}b)},{} \spad{0<=a<b>1},{} \spad{(a,{}b)=1} means \spad{1/a mod b}.
 olength`1`x`(_$)->_$`cIntegerNumberSystem``\spad{length(a)} length of \spad{a} in digits.
-omakeSketch`5`x`(Polynomial(Integer),Symbol,Symbol,Segment(Fraction(Integer)),Segment(Fraction(Integer)))->_$`dPlaneAlgebraicCurvePlot``\spad{makeSketch(p,{}x,{}y,{}a..b,{}c..d)} creates an ACPLOT of the curve \spad{p = 0} in the region {\em a <= x <= b,{} c <= y <= d}. More specifically,{} 'makeSketch' plots a non-singular algebraic curve \spad{p = 0} in an rectangular region {\em xMin <= x <= xMax},{} {\em yMin <= y <= yMax}. The user inputs \spad{makeSketch(p,{}x,{}y,{}xMin..xMax,{}yMin..yMax------)}. Here \spad{p} is a polynomial in the variables \spad{x} and \spad{y} with integer coefficients (\spad{p} belongs to the domain \spad{Polynomial Integer}). The case where \spad{p} is a polynomial in only one of the variables is allowed. The variables \spad{x} and \spad{y} are input to specify the the coordinate axes. The horizontal axis is the \spad{x}-axis and the vertical axis is the \spad{y}-axis. The rational numbers xMin,{}...,{}yMax specify the boundaries of the region in which th--e --cu--rve is to be plotted.
+omakeSketch`5`x`(Polynomial(Integer),Symbol,Symbol,Segment(Fraction(Integer)),Segment(Fraction(Integer)))->_$`dPlaneAlgebraicCurvePlot``\spad{makeSketch(p,{}x,{}y,{}a..b,{}c..d)} creates an ACPLOT of the curve \spad{p = 0} in the region {\em a <= x <= b,{} c <= y <= d}. More specifically,{} 'makeSketch' plots a non-singular algebraic curve \spad{p = 0} in an rectangular region {\em xMin <= x <= xMax},{} {\em yMin <= y <= yMax}. The user inputs \spad{makeSketch(p,{}x,{}y,{}xMin..xMax,{}yMin..yMax------------)}. Here \spad{p} is a polynomial in the variables \spad{x} and \spad{y} with integer coefficients (\spad{p} belongs to the domain \spad{Polynomial Integer}). The case where \spad{p} is a polynomial in only one of the variables is allowed. The variables \spad{x} and \spad{y} are input to specify the the coordinate axes. The horizontal axis is the \spad{x}-axis and the vertical axis is the \spad{y}-axis. The rational numbers xMin,{}...,{}yMax specify the boundaries of the region in wh--ic--h --th--e --cu--rve is to be plotted.
 omask`1`x`(S)->S`xIntegerNumberSystem&(S)``
 omask`1`x`(_$)->_$`cIntegerNumberSystem``\spad{mask(n)} returns \spad{2**n-1} (an \spad{n} bit mask).
 omax`0`x`()->_$`dSingleInteger``\spad{max()} returns the largest single integer.
--- axiom-20170501.orig/src/interp/Makefile.pamphlet
+++ axiom-20170501/src/interp/Makefile.pamphlet
@@ -664,7 +664,7 @@ ${SAVESYS}:	${DEPSYS} ${OBJS} ${OUT}/boo
 	@ echo OBJ= ${OBJ} 
 	@ echo MNT= ${MNT} 
 	@ echo O=${O} LISP=${LISP} BYE=${BYE}
-	@ cp -p ${OUT}/*.fn ${MID}
+	@ find ${OUT} -name "*.fn" -exec cp {} ${MID} \; #cp -p ${OUT}/*.fn ${MID}
 	@ cp -p ${SRC}/doc/msgs/s2-us.msgs ${SPAD}/doc/msgs
 	@ echo '${PROCLAIMS}' > ${OUT}/makeint.lisp
 	@ echo '(load "${OUT}/nocompil")' >> ${OUT}/makeint.lisp
@@ -681,7 +681,7 @@ ${SAVESYS}:	${DEPSYS} ${OBJS} ${OUT}/boo
           '(quote ($(patsubst %, "%", ${NAGBROBJS})))'  \
           '"${SPAD}"  "${LSP}" "${SRC}" "${INT}"' \
           '"${OBJ}" "${MNT}" "${SYS}")' >> ${OUT}/makeint.lisp
-	@ echo '(in-package "SCRATCHPAD-COMPILER")' >> ${OUT}/makeint.lisp
+	@ echo '(make-package "SCRATCHPAD-COMPILER")' >> ${OUT}/makeint.lisp
 	@ echo '(boot::set-restart-hook)' >> ${OUT}/makeint.lisp
 	@ echo '(in-package "BOOT")' >> ${OUT}/makeint.lisp
 	@ echo '(load "${INT}/algebra/warm.data")' >> ${OUT}/makeint.lisp
--- axiom-20170501.orig/src/interp/br-con.lisp.pamphlet
+++ axiom-20170501/src/interp/br-con.lisp.pamphlet
@@ -13997,7 +13997,7 @@
                                         NIL))
                                       NIL))
                             (|htSay| "}"))
-             (|htEndTable|)))
+             (|htEndTable|));)
 
 ;bcNameConTable u ==
 ;  $bcMultipleNames: local := (#u ^= 1)
--- axiom-20170501.orig/src/interp/c-util.lisp.pamphlet
+++ axiom-20170501/src/interp/c-util.lisp.pamphlet
@@ -57,7 +57,7 @@
               (PROGN (setq |n| (QCAR |l|)) 'T) (INTEGERP |n|))
          (|displayComp| (setq |$level| |n|)))
         ('T
-         (SAY            "Correct format: (level n) where n is the level you want to go to"           )))))))
+         (SAY            "Correct format: (level n) where n is the level you want to go to"           ))))));)
 
 ;
 ;UP() == up()
--- axiom-20170501.orig/src/interp/clam.lisp.pamphlet
+++ axiom-20170501/src/interp/clam.lisp.pamphlet
@@ -2298,7 +2298,7 @@
                                 (APPEND (|rightJustifyString| |n| 6)
                                         (CONS '|  |
                                          (CONS |fn| (CONS '|: | NIL)))))
-                            (|pp| |args|))))))))))
+                            (|pp| |args|)))))))));)
 
 ;constructor2ConstructorForm x ==
 ;  VECP x => x.0
--- axiom-20170501.orig/src/interp/functor.lisp.pamphlet
+++ axiom-20170501/src/interp/functor.lisp.pamphlet
@@ -92,7 +92,7 @@
                                              NIL))))
                                          (|DomainPrint1| (CDR |u|)
                                           |brief| |env|)))))))))
-                (SAY "-----------------------------------------------------------------------" )))))))))
+                (SAY "-----------------------------------------------------------------------" ))))))));)
 
 
 ;DomainPrint1(D,brief,$e) ==
--- axiom-20170501.orig/src/interp/i-funsel.lisp.pamphlet
+++ axiom-20170501/src/interp/i-funsel.lisp.pamphlet
@@ -4923,7 +4923,7 @@ the types A and B themselves are not sor
                    (t
                     (setq |st|
                              (NREVERSE (NCONC |haventvars| |havevars|)))
-                    (SORT |st| #'|mmCatComp|)))))))))))
+                    (STABLE-SORT |st| #'|mmCatComp|)))))))))))
 
 ;mmCatComp(c1, c2) ==
 ;  b1 := ASSQ(CADR c1, $Subst)
--- axiom-20170501.orig/src/interp/interp-proclaims.lisp
+++ axiom-20170501/src/interp/interp-proclaims.lisp
@@ -81,7 +81,7 @@
             BOOT::|bcDrawIt2| BOOT::|charybdis| BOOT::|bcMkFunction|
             BOOT::|charyTop| BOOT::|bcDrawIt|
             BOOT::|f01qcfDefaultSolve| BOOT::|e02zafDefaultSolve|
-            BOOT::|ncloopInclude0| VMLISP:$FCOPY)) 
+            BOOT::|ncloopInclude0|)) 
 (PROCLAIM
     '(FTYPE (FUNCTION (T T T T T T) *) BOOT::|e02befColdSolve|
             BOOT::|e02ahfDefaultSolve| BOOT::|e02akfDefaultSolve|
@@ -2596,7 +2596,7 @@
 (PROCLAIM '(FTYPE (FUNCTION (T T *) (VALUES T T)) VMLISP:MDEF)) 
 (PROCLAIM '(FTYPE (FUNCTION (T *) STRING) VMLISP:MAKE-FULL-CVEC)) 
 (PROCLAIM
-    '(FTYPE (FUNCTION (T T) *) BOOT::|bcInputMatrixByFormula|
+    '(FTYPE (FUNCTION (T T) *) VMLISP:$FCOPY BOOT::|bcInputMatrixByFormula|
             BOOT::|bcInputExplicitMatrix| BOOT::|htStringPad|
             BOOT::|evalAndRwriteLispForm| BOOT::|mkAtreeWithSrcPos|
             BOOT::|rwriteLispForm| BOOT::COMPILE-DEFUN BOOT::|doIt|
@@ -3382,4 +3382,4 @@
 (PROCLAIM
     '(FTYPE (FUNCTION NIL (VALUES T T)) BOOT::MAKE-CLOSEDFN-NAME
             BOOT::|genVariable| BOOT::|genSomeVariable|
-            BOOT::|genDomainVar| BOOT:GENVAR)) 
\ No newline at end of file
+            BOOT::|genDomainVar| BOOT:GENVAR)) 
--- axiom-20170501.orig/src/interp/msgdb.lisp.pamphlet
+++ axiom-20170501/src/interp/msgdb.lisp.pamphlet
@@ -703,7 +703,7 @@
 
 (defun |keyedSystemError| (|key| |args|)
   (|sayKeyedMsg| "Internal Error" nil)
-  (|breakKeyedMsg| |key| |args|)))
+  (|breakKeyedMsg| |key| |args|));)
 
 ;systemErrorHere functionName ==
 ;  keyedSystemError("S2GE0017",[functionName])
--- axiom-20170501.orig/src/interp/patches.lisp.pamphlet
+++ axiom-20170501/src/interp/patches.lisp.pamphlet
@@ -66,7 +66,7 @@ previous definition.
 (defun CATCHALL (a &rest b) a) ;; not correct but ok for now
 (defvar |$demoFlag| nil)
 
-(define-function '|construct| #'list) ;; NEEDED , SPAD-COMPILER generated Lisp code
+(define-function '|construct| #'cl::list) ;; NEEDED , SPAD-COMPILER generated Lisp code
 (define-function '|COMP,TRAN| #'comp-tran) ;called by |compWithMappingMode|
 
 (defvar |Undef| (function |Undef|)) ;needed in NewbFVectorCopy
--- axiom-20170501.orig/src/interp/sockio.lisp.pamphlet
+++ axiom-20170501/src/interp/sockio.lisp.pamphlet
@@ -96,15 +96,15 @@ string with data read from connection, t
 actual string buffer. We use [[sock_get_string_buf_wrapper]] to
 resolve the problem
 \begin{chunk}{*}
-  (clines "fixnum sock_get_string_buf_wrapper(int i, object x, int j)"
-          "{ if (type_of(x)!=t_string) FEwrong_type_argument(sLstring,x);"
-          "  if (x->st.st_fillp<j)"
-          "    FEerror(\"string too small in sock_get_string_buf_wrapper\",0);"
+  (clines "fixnum sock_get_string_buf_wrapper(fixnum i, object x, fixnum j)"
+          "{ if (!vectorp(x)) FEerror(\"not a string ->~s<-\",1,x);/*FIXME no stringp, and 2.7.0 only has simple_string*/"
+          "  if (length(x)<j)"
+          "    FEerror(\"string too small in sock_get_string_buf_wrapper ~s\",1,list(3,x,make_fixnum((fixnum)x),make_fixnum(j)));"
           "  return (fixnum)sock_get_string_buf(i, x->st.st_self, j); }")
   (defentry open_server (string) (int "open_server"))
   (defentry sock_get_int (int) (int "sock_get_int"))
   (defentry sock_send_int (int int) (int "sock_send_int"))
-  (defentry sock_get_string_buf (int object int) 
+  (defentry sock_get_string_buf (fixnum object fixnum) 
      (fixnum "sock_get_string_buf_wrapper"))
   (defentry sock_send_string_len (int string int) (int "sock_send_string_len"))
   (defentry sock_get_float (int) (double "sock_get_float"))
--- axiom-20170501.orig/src/interp/sys-pkg.lisp.pamphlet
+++ axiom-20170501/src/interp/sys-pkg.lisp.pamphlet
@@ -71,6 +71,12 @@ interpreter or algebra uses has to (coug
 (make-package "BOOT")
 (in-package "BOOT")
 (lisp::use-package '("VMLISP" "LISP"))
+(when (find-package "CLTL1-COMPAT") (use-package "CLTL1-COMPAT"))
+(shadow "LIST")
+(defmacro list (&rest r &aux (l (length r)))
+  (let ((x (nthcdr (1- call-arguments-limit) r)))
+    (if x `(nconc (cl::list ,@(ldiff r x)) (list ,@x)) `(cl::list ,@r))))
+(deftype list nil 'cl::list)    
 
 \end{chunk}
 FOAM is the intermediate language for the aldor compiler. FOAM
--- axiom-20170501.orig/src/interp/vmlisp.lisp.pamphlet
+++ axiom-20170501/src/interp/vmlisp.lisp.pamphlet
@@ -1320,13 +1320,16 @@ In GCL 2.5:
 (defun reclaim () (gbc t))
 
 (defun BPINAME (func)
-  (if (functionp func)
-      (cond ((symbolp func) func)
-            ((and (consp func) (eq (car func) 'LAMBDA-BLOCK))
-              (cadr func))
-            ((compiled-function-p func)
-             (system:compiled-function-name func))
-            ('t func))))
+  (typecase func
+    (symbol func)
+    ((cons (eql lambda-block) t) (cadr func))
+    (function
+     (cond (#.(fboundp 'function-lambda-expression)
+	    (multiple-value-bind (x y z) (function-lambda-expression func)
+	      (or (and (symbolp z) (fboundp z) z) func)))
+	   ((compiled-function-p func)
+            (system:compiled-function-name func))
+           (func)))))
 
 (defun LISTOFQUOTES (bpi)
  (declare (ignore bpi))
@@ -2010,7 +2013,7 @@ do the compile, and then rename the resu
     (BOOT::SPADTEX . |stex|)
     (BOOT::SPADOUT . |spout|)))
 
-(in-package 'boot)
+(in-package "BOOT")
 
 (defvar *npPCff* nil "rewrite flets, using global scoping")
 (defun npPCff () (and (funcall *npPCff*) (|npPush| (list (|npPop1|)))))
@@ -2450,7 +2453,7 @@ for primitive domains.        Also used
                T))
         ((ATOM V) NIL)
         ((EQUAL U V))
-        ((NOT (string> (write-to-string U) (write-to-string V))))))
+        ((NOT (string> (write-to-string U :escape t) (write-to-string V :escape t))))))
  
 (defmacro boot-equal (a b)
    (cond ((ident-char-lit a)
@@ -4200,7 +4203,7 @@ terminals and empty or at-end files.  In
  (load eval)
  (unembed 'system:universal-error-handler)
  (embed 'system:universal-error-handler
-            '(lambda (type correctable? op
+            (lambda (type correctable? op
                            continue-string error-string &rest args)
                (block
                 nil
@@ -4574,7 +4577,7 @@ terminals and empty or at-end files.  In
 
 (defmacro |float| (x &optional (y 0.0d0)) `(float ,x ,y))
 
-(define-function 'list1 #'list)
+(define-function 'list1 #'cl::list)
 (define-function '|not| #'NOT)
 
 (setf (get 'end_unit 'key) t)
