From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Camm Maguire <camm@debian.org>
Date: Feb, 22 2026 16:56:52 +0000
Subject: [PATCH] <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.

---
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-<Vendor>: <vendor-bugtracker-url>
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>

--- gcl27-2.7.1.orig/Makefile.am
+++ gcl27-2.7.1/Makefile.am
@@ -110,7 +110,7 @@ endif
 
 EXTRA_DIST=$(D_SRC) $(INCL_C) $(INIT_L) $(INCL_TEXI)\
 	   lsp cmpnew mod pcl clcs ansi-tests elisp xbin bench \
-	   majvers minvers git.tag release
+	   majvers minvers git.tag release bin/c23.awk
 
 # end of primaries
 
@@ -123,7 +123,7 @@ INCL_TEXI=$(addprefix info/,$(addsuffix
 
 INCL_C=o/sgbc.c o/gmp_big.c o/gmp.c o/gmp_num_log.c o/cmac.c o/regexp.c o/unexelf.c o/unexmacosx.c o/unexnt.c \
        o/save.c o/xdrfuns.c o/fasdump.c o/usig2_aux.c o/sfaslelf.c o/sfaslmacho.c o/sfaslcoff.c gcl-tk/comm.c \
-       o/sfasli.c o/firstfile.c o/lastfile.c
+       o/sfasli.c o/firstfile.c o/lastfile.c o/pre_qfv.c
 INIT_L=unixport/sys_init.c unixport/sys.c o/boot.c unixport/cinit.lisp
 BASE_H= h/compbas2.h h/compbas.h h/compprotos.h h/cstack.h h/enum.h h/error.h h/eval.h h/fixnum.h h/frame.h \
 	h/funlink.h h/globals.h h/gmp_wrappers.h h/immnum.h h/include.h h/lex.h h/linux.h h/lu.h h/make-init.h \
@@ -459,8 +459,8 @@ h/cmpincludea.h: $(filter-out gclincl.h,
 		$(AWK) '/^# |^$$|^#pragma/ {next}{print}' > $@
 
 o/qfv.c: o/pre_qfv.c h/new_decl.h bin/c23.awk
-	chmod +x bin/c23.awk
-	$(CPP) $(AM_CPPFLAGS) -P $(CPPFLAGS) $< | bin/c23.awk >$@
+	chmod +x $(word 3,$^)
+	$(CPP) $(AM_CPPFLAGS) -P $(CPPFLAGS) $< | $(word 3,$^) >$@
 
 h/cmpinclude.h: h/mcompdefs.h h/cmpincludea.h h/cmponly_last.h
 	@cat $^ >new_$(@F)
--- gcl27-2.7.1.orig/Makefile.in
+++ gcl27-2.7.1/Makefile.in
@@ -1017,7 +1017,7 @@ dist_noinst_DATA = $(am__append_5) $(am_
 
 EXTRA_DIST = $(D_SRC) $(INCL_C) $(INIT_L) $(INCL_TEXI)\
 	   lsp cmpnew mod pcl clcs ansi-tests elisp xbin bench \
-	   majvers minvers git.tag release
+	   majvers minvers git.tag release bin/c23.awk
 
 
 # end of primaries
@@ -1030,7 +1030,7 @@ INCL_TEXI = $(addprefix info/,$(addsuffi
 
 INCL_C = o/sgbc.c o/gmp_big.c o/gmp.c o/gmp_num_log.c o/cmac.c o/regexp.c o/unexelf.c o/unexmacosx.c o/unexnt.c \
        o/save.c o/xdrfuns.c o/fasdump.c o/usig2_aux.c o/sfaslelf.c o/sfaslmacho.c o/sfaslcoff.c gcl-tk/comm.c \
-       o/sfasli.c o/firstfile.c o/lastfile.c
+       o/sfasli.c o/firstfile.c o/lastfile.c o/pre_qfv.c
 
 INIT_L = unixport/sys_init.c unixport/sys.c o/boot.c unixport/cinit.lisp
 BASE_H = h/compbas2.h h/compbas.h h/compprotos.h h/cstack.h h/enum.h h/error.h h/eval.h h/fixnum.h h/frame.h \
@@ -4907,8 +4907,8 @@ h/cmpincludea.h: $(filter-out gclincl.h,
 		$(AWK) '/^# |^$$|^#pragma/ {next}{print}' > $@
 
 o/qfv.c: o/pre_qfv.c h/new_decl.h bin/c23.awk
-	chmod +x bin/c23.awk
-	$(CPP) $(AM_CPPFLAGS) -P $(CPPFLAGS) $< | bin/c23.awk >$@
+	chmod +x $(word 3,$^)
+	$(CPP) $(AM_CPPFLAGS) -P $(CPPFLAGS) $< | $(word 3,$^) >$@
 
 h/cmpinclude.h: h/mcompdefs.h h/cmpincludea.h h/cmponly_last.h
 	@cat $^ >new_$(@F)
--- gcl27-2.7.1.orig/cmpnew/gcl_cmpcall.lsp
+++ gcl27-2.7.1/cmpnew/gcl_cmpcall.lsp
@@ -301,8 +301,11 @@
       (unless (= nreq nsup) (list "_n==" (- (1+ nreq)) (unless st "&&")))
       (unless st "_l==Cnil") ")"))
 
-(defun mod-argstr (n call st nsup)
-  (let* ((x (commasep (append (nobs nsup "#") (nobs (- n nsup)) (when st (list "_l")))))
+(defun nobs-wrap (nobs sig &aux (at (car sig)))
+  (mapcar (lambda (x y) (ms  (cdr (assoc y +to-c-var-alist+)) "(" x ")")) nobs at))
+
+(defun mod-argstr (n call st nsup sig)
+  (let* ((x (commasep (append (nobs nsup "#") (nobs-wrap (nobs (- n nsup)) sig) (when st (list "_l")))))
 	 (s (or (position #\# call) (length call))))
     (ms (subseq call 0 s) x)))
 
@@ -349,7 +352,7 @@
       (let ((nl (list (string #\Newline) "        ")))
 	(ms (list "@" (nords (1+ nsup)) ";") 
 	    "({" (bind-str nreq nsup nl) nl (cond-str nreq nsup st)  " ? " nl
-	    (nvfun-wrap cname (mod-argstr nreq argstr st nsup) sig clp ap) " : " nl
+	    (nvfun-wrap cname (mod-argstr nreq argstr st nsup sig) sig clp ap) " : " nl
 	    (insufficient-arg-str fnstr nreq nsup sig st) ";})")))))
 
 
@@ -490,14 +493,16 @@
 
 
 (defun stub (num name args type clp
-	     &aux (va (eq '* (car (last args)))) (n (if va 1 0))(i (max n (- (length args) n)));FIXME
+	     &aux (va (eq '* (car (last args)))) (n (if va 1 0))
+	       (i (max n (- (length args) n)));FIXME
+	       (si (write-to-string i))
 	       (d (declaration-type (rep-type (if (link-arg-p type) type t)))))
   (concatenate
    'string
    (stub-decl (concatenate 'string "LnkT" num) args d t)
    "{
-      int nargs=" (if va "fcall.argd<0 ? -fcall.argd : fcall.argd" (write-to-string i)) ";
-      object *FOO=alloca(nargs*sizeof(*FOO));
+      int nargs=" (if va "fcall.argd<0 ? -fcall.argd : fcall.argd" si) ";
+      object *FOO=alloca((nargs>" si "? nargs : " si ")*sizeof(*FOO));
       "
 
    (let ((j 0))
@@ -512,9 +517,9 @@
       "
       {
           va_list ap;
-          va_start(ap,x" (write-to-string i) ");
+          va_start(ap,x" si ");
           int i;
-          for (i=" (write-to-string i) ";i<nargs;i++) FOO[i]=va_arg(ap,object);
+          for (i=" si ";i<nargs;i++) FOO[i]=va_arg(ap,object);
           va_end(ap);
       }"))
 
--- gcl27-2.7.1.orig/git.tag
+++ gcl27-2.7.1/git.tag
@@ -1,2 +1,2 @@
-"Version_2_7_2pre9"
+"Version_2_7_2pre10"
 
--- gcl27-2.7.1.orig/h/protoize.h
+++ gcl27-2.7.1/h/protoize.h
@@ -375,7 +375,7 @@ object funcall_vec(object,fixnum,object
 #ifdef __MINGW32__
 /* usig2.c:167:OF */ extern void main_signal_handler (int signo); /* (signo) int signo */
 #else
-/* /\* usig2.c:167:OF *\/ extern void main_signal_handler (int signo, siginfo_t *a, void *b); /\* (signo, a, b) int signo; int a; int b; *\/ */
+/* usig2.c:167:OF */ void main_signal_handler(int,long,void *,char *) __attribute__((aligned (16)));
 #endif
 /* usig2.c:375:OF */ extern void raise_pending_signals (int cond); /* (cond) int cond; */
 /* utils.c:12:OF */ extern object IisSymbol (object f); /* (f) object f; */
--- gcl27-2.7.1.orig/h/sparc-linux.h
+++ gcl27-2.7.1/h/sparc-linux.h
@@ -12,7 +12,6 @@
 #else
 #define RELOC_H "elf64_sparc_reloc.h"
 #define SPECIAL_RELOC_H "elf64_sparc_reloc_special.h"
-void unwind() __attribute__((optimize("O0")));/*FIXME*/
 #endif
 
 /* #if SIZEOF_LONG == 8 */
--- gcl27-2.7.1.orig/lsp/gcl_directory.lsp
+++ gcl27-2.7.1/lsp/gcl_directory.lsp
@@ -57,7 +57,7 @@
 			   (d (pathname-directory p))
 			   (c (unless (eq (car d) :absolute) (make-frame (namestring *current-directory*))))
 			   (lc (when c (length c)))
-			   (filesp (or (pathname-name p) (pathname-type p)))
+			   (filesp (not (and (eq (pathname-name p) :unspecific) (eq (pathname-type p) :unspecific))))
 			   (v (compile-regexp (to-regexp p)))(*up-key* :back) r)
   (expand-wild-directory (pathname-device p) d
    (lambda (dir exp &aux (pexp (pathname (if c (vector-push-string c exp 0 lc) exp))))
--- gcl27-2.7.1.orig/o/usig.c
+++ gcl27-2.7.1/o/usig.c
@@ -47,8 +47,6 @@ Foundation, 675 Mass Ave, Cambridge, MA
 
 extern char signals_handled[];
 
-extern handler_function_type main_signal_handler;
-
 void
 gcl_signal(int signo, void (*handler)(int,long,void *,char *))
 {
