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.
 .
 gcl27 (2.7.0-12) unstable; urgency=medium
 .
   * Version_2_7_0pre15
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: 2024-02-20

--- gcl27-2.7.0.orig/cmpnew/gcl_cmpcall.lsp
+++ gcl27-2.7.0/cmpnew/gcl_cmpcall.lsp
@@ -517,10 +517,10 @@
 		 (write-to-string (argsizes args type 0));FIXME
 		 ",(void **)(void *)&Lnk" num "," (new-proclaimed-argd args type)
 		 ",first,ap);va_end(ap);return V1;}")
-	   (wt "(){va_list dummy;" d "V1=(" d ")call_proc_new(" (vv-str name) "," (if clp "1" "0") ","
+	   (wt "(){" d "V1=(" d ")call_proc_new_nval(" (vv-str name) "," (if clp "1" "0") ","
 	       (write-to-string (argsizes args type 0));FIXME
 	       ",(void **)(void *)&Lnk" num "," (new-proclaimed-argd args type)
-	       ",0,dummy);return V1;}")))))
+	       ",0);return V1;}")))))
     (setq name (function-string name))
     (if (find #\/ name) (setq name (remove #\/ name)))
     (wt " /* " name " */")))
--- gcl27-2.7.0.orig/git.tag
+++ gcl27-2.7.0/git.tag
@@ -1,2 +1,2 @@
-"Version_2_7_0pre14"
+"Version_2_7_0pre15"
 
--- gcl27-2.7.0.orig/h/compprotos.h
+++ gcl27-2.7.0/h/compprotos.h
@@ -17,6 +17,7 @@ long int fixint(object);
 object alloc_object(enum type);
 object call_proc_cs2(object,...);
 object call_proc_new(object,ufixnum,ufixnum,void **,ufixnum,object,va_list);
+object call_proc_new_nval(object,ufixnum,ufixnum,void **,ufixnum,object,...);
 object coerce_to_string();
 object elt(object,int);
 object fixnum_big_shift(fixnum,fixnum);
--- gcl27-2.7.0.orig/h/protoize.h
+++ gcl27-2.7.0/h/protoize.h
@@ -1603,3 +1603,9 @@ fresh_synonym_stream_to_terminal_io(void
 
 void
 set_array_elttype(object,enum aelttype);
+
+object
+apply_format_function(object,object,object,object,object,object);
+
+object
+fSstring_match2(object,object);
--- gcl27-2.7.0.orig/o/array.c
+++ gcl27-2.7.0/o/array.c
@@ -622,7 +622,7 @@ set_displaced_body_ptr(object from_array
 
     enum aelttype typ =Iarray_element_type(from_array);
     object dest_array=displaced->c.c_car;
-    int offset=fix(displaced->c.c_cdr);
+    int offset=fix(Scdr(displaced));
 
     if (typ == aet_bit) {
       if (Iarray_element_type(dest_array)==aet_bit)
--- gcl27-2.7.0.orig/o/boot.c
+++ gcl27-2.7.0/o/boot.c
@@ -191,7 +191,7 @@ DEFUN("SUBSETP",object,fLsubsetp,LISP,2,
   if (!listp(y))/*FIXME checktype*/
     TYPE_ERROR(y,sLlist);
   for (;consp(x);x=x->c.c_cdr)
-    if (FFN(fLmember(x->c.c_car,y))==Cnil)
+    if (FFN(fLmember)(x->c.c_car,y)==Cnil)
       RETURN1(Cnil);
 
   RETURN1(Ct);
--- gcl27-2.7.0.orig/o/eval.c
+++ gcl27-2.7.0/o/eval.c
@@ -855,7 +855,12 @@ DEFUNM("APPLY",object,fLapply,LISP,1,MAX
   return res;
 
 }
-	
+
+object
+apply_format_function(object x,object y,object z,object a,object b,object c) {
+  return FFN(fLapply)(x,y,z,a,b,c);
+}
+
 
 DEFUNM("EVAL",object,fLeval,LISP,1,1,NONE,OO,OO,OO,OO,(object x0),"") {
 
@@ -980,7 +985,7 @@ DEFUN("FSET-IN",object,fSfset_in,SI,3,3,
 #ifdef STATIC_FUNCTION_POINTERS
 object
 fSfset_in(object sym,object src,object name) {
-  RETURN1(FFN(fSfset_in)(sym,src,object name));
+  RETURN1(FFN(fSfset_in)(sym,src,name));
 }
 #endif
 
--- gcl27-2.7.0.orig/o/fasdump.c
+++ gcl27-2.7.0/o/fasdump.c
@@ -596,7 +596,7 @@ DEFUN("OPEN-FASD",object,fSopen_fasd,SI
   if(direction==sKinput)
     {str=coerce_stream(stream,0);
     if (tabl==Cnil)
-      tabl=alloc_simple_vector(0,aet_object);
+      tabl=alloc_simple_vector(0);
     else
       check_type(tabl,t_simple_vector);}
   if(direction==sKoutput)
@@ -605,7 +605,7 @@ DEFUN("OPEN-FASD",object,fSopen_fasd,SI
     else
       check_type(tabl,t_hashtable);}
   massert(str==stream);
-  result=alloc_simple_vector(sizeof(struct fasd)/sizeof(object),aet_object);
+  result=alloc_simple_vector(sizeof(struct fasd)/sizeof(object));
   array_allocself(result,1,Cnil);
   {struct fasd *fd= (struct fasd *)result->sv.sv_self;
   fd->table=tabl;
--- gcl27-2.7.0.orig/o/file.d
+++ gcl27-2.7.0/o/file.d
@@ -650,8 +650,8 @@ DEFUN("INTERACTIVE-STREAM-P",object,fLin
 }
 #ifdef STATIC_FUNCTION_POINTERS
 object
-fLinteractive_stream_p(object x,fixnum y,fixnum z) {
-  return FFN(fLinteractive_stream_p)(x,y,z);
+fLinteractive_stream_p(object x) {
+  return FFN(fLinteractive_stream_p)(x);
 }
 #endif
 
--- gcl27-2.7.0.orig/o/format.c
+++ gcl27-2.7.0/o/format.c
@@ -2195,7 +2195,7 @@ fmt_function(bool colon, bool atsign) {
   z=fmt_advance();
 
   VFUN_NARGS=6;
-  fLapply(x,fmt_stream,z,colon ? Ct : Cnil,atsign ? Ct : Cnil,y);
+  apply_format_function(x,fmt_stream,z,colon ? Ct : Cnil,atsign ? Ct : Cnil,y);
 
 }
 
@@ -2705,8 +2705,8 @@ fmt_pp_string(object control) {
   if (logical_block_regexp==OBJNULL)
     logical_block_regexp=fScompile_regexp(make_simple_string("~@?:@?>|~[:@]?[:@]?_|~[0-9]*:?[Ii]|~[0-9]+,[0-9]+[:@]?[:@]?[Tt]|~[:@]?[:@]?[Ww]"));
   VFUN_NARGS=2;
-  just=(fixnum)fSstring_match(justification_regexp,control);
-  pp=(fixnum)fSstring_match(logical_block_regexp,control);
+  just=(fixnum)fSstring_match2(justification_regexp,control);
+  pp=(fixnum)fSstring_match2(logical_block_regexp,control);
   if (just>=0 && pp>=0)
     fmt_error("Mixed justification syntax");
 
--- gcl27-2.7.0.orig/o/funlink.c
+++ gcl27-2.7.0/o/funlink.c
@@ -435,6 +435,15 @@ call_proc_new(object sym,ufixnum clp,ufi
   }
 
 }
+object
+call_proc_new_nval(object sym,ufixnum clp,ufixnum vld,void **link,ufixnum argd,object first,...) {
+  object x;
+  va_list b;
+  va_start(b,first);
+  x=call_proc_new(sym,clp,vld,link,argd,first,b);
+  va_end(b);
+  return x;
+}
 
 object
 call_proc_cs1(object fun,...) {
--- gcl27-2.7.0.orig/o/gmp_big.c
+++ gcl27-2.7.0/o/gmp_big.c
@@ -591,20 +591,23 @@ void
 gcl_init_big(void)
 {
   gcl_init_big1();
-  big_gcprotect=alloc_object(t_bignum);
+  big_gcprotect=alloc_object(t_bignum);/*FIXME*/
   MP_SELF(big_gcprotect)=0;
   MP_ALLOCATED(big_gcprotect)=0;
-  big_fixnum1=new_bignum();
-  big_fixnum2=new_bignum();
-  big_fixnum3=new_bignum();
-  big_fixnum4=new_bignum();
-  big_fixnum5=new_bignum();
-  enter_mark_origin(&big_fixnum1);
-  enter_mark_origin(&big_fixnum2);
-  enter_mark_origin(&big_fixnum3);
-  enter_mark_origin(&big_fixnum4);
-  enter_mark_origin(&big_fixnum5);
   enter_mark_origin(&big_gcprotect);
+
+#define mjoin(a_,b_) a_ ## b_
+#define Mjoin(a_,b_) mjoin(a_,b_)
+#define init_big_fixnum(a_) {			\
+    Mjoin(big_fixnum,a_)=new_bignum();		\
+    mpz_set_si(MP(Mjoin(big_fixnum,a_)),0);	\
+    enter_mark_origin(&Mjoin(big_fixnum,a_));	\
+  }
+  init_big_fixnum(1);
+  init_big_fixnum(2);
+  init_big_fixnum(3);
+  init_big_fixnum(4);
+  init_big_fixnum(5);
   sSPminus_most_negative_fixnumP=make_si_constant("+MINUS-MOST-NEGATIVE-FIXNUM+",fixnum_add(MOST_POSITIVE_FIX,1));
 
 }
--- gcl27-2.7.0.orig/o/predicate.c
+++ gcl27-2.7.0/o/predicate.c
@@ -266,6 +266,12 @@ equal1(register object x, register objec
 DEFUN("EQUAL",object,fLequal,LISP,2,2,NONE,OO,OO,OO,OO,(object x0,object x1),"") {
   RETURN1(equal(x0, x1) ? Ct : Cnil);
 }
+#ifdef STATIC_FUNCTION_POINTERS
+object
+fLequal(object x,object y) {
+  return FFN(fLequal)(x,y);
+}
+#endif
 
 /*for sublis1-inline*/
 bool
--- gcl27-2.7.0.orig/o/print.d
+++ gcl27-2.7.0/o/print.d
@@ -1899,6 +1899,14 @@ DEFUN("WRITE-INT",object,fSwrite_int,SI,
   RETURN1(x);
   
 }
+#ifdef STATIC_FUNCTION_POINTERS
+object
+fSwrite_int(object x,object y) {
+  return FFN(fSwrite_int)(x,y);
+}
+#endif
+
+
 
 DEFUN("PPRINT-MISER-STYLE",object,fSpprint_miser_style,SI,1,1,NONE,OO,OO,OO,OO,(object strm),"") {
 
@@ -2002,6 +2010,13 @@ DEFUN("WRITE-INT1",object,fSwrite_int1,S
   RETURN1(Cnil);
 
 }
+#ifdef STATIC_FUNCTION_POINTERS
+object
+fSwrite_int1(object a,object b,object c,object d,object e) {
+  return FFN(fSwrite_int1)(a,b,c,d,e);
+}
+#endif
+
 
 @(defun write (x
 	       &key ((:stream strm) Cnil)
--- gcl27-2.7.0.orig/o/regexpr.c
+++ gcl27-2.7.0/o/regexpr.c
@@ -91,7 +91,12 @@ DEFUN("COMPILE-REGEXP",object,fScompile_
   RETURN1(res);
 
 }
-
+#ifdef STATIC_FUNCTION_POINTERS
+object
+fScompile_regexp(object x) {
+  return FFN(fScompile_regexp)(x);
+}
+#endif
 
 DEFUN("STRING-MATCH",object,fSstring_match,SI,2,4,NONE,IO,OO,OO,OO,
 	  (object pattern,object string,...),
@@ -189,3 +194,7 @@ be over written.   \
    }
 
 }
+object
+fSstring_match2(object x,object y) {
+  return FFN(fSstring_match)(x,y);
+}
