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-20) unstable; urgency=medium
 .
   * Version_2_7_0pre23
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-29

--- gcl27-2.7.0.orig/git.tag
+++ gcl27-2.7.0/git.tag
@@ -1,2 +1,2 @@
-"Version_2_7_0pre22"
+"Version_2_7_0pre23"
 
--- gcl27-2.7.0.orig/makefile
+++ gcl27-2.7.0/makefile
@@ -100,7 +100,8 @@ $(PORTDIR)/saved_pre_gcl: $(HDIR)cmpincl
 	touch $< $@
 
 $(PORTDIR)/saved_gcl0: $(PORTDIR)/saved_pre_gcl $(HDIR)cmpinclude.h
-	cd $(@D) && echo '(time (load "boot.lisp"))' | ../$<
+#       This safety 3 image allocates a lot of relblock garbage for closures
+	cd $(@D) && echo '(time (load "boot.lisp"))' | GCL_GC_PAGE_MIN=0.25 GCL_GC_PAGE_MAX=0.5 ../$<
 	cd $(@D) && $(MAKE) saved_gcl && mv saved_gcl $(@F)
 
 $(PORTDIR)/saved_gcl1: $(PORTDIR)/saved_gcl0 $(HDIR)cmpinclude.h
--- gcl27-2.7.0.orig/o/error.c
+++ gcl27-2.7.0/o/error.c
@@ -35,7 +35,7 @@ object sSterminal_interrupt;
 void
 assert_error(const char *a,unsigned l,const char *f,const char *n) {
 
-  if (!raw_image && core_end && core_end==sbrk(0))
+  if (!raw_image && core_end && core_end==sbrk(0) && errno!=ENOMEM)
     FEerror("The assertion ~a on line ~a of ~a in function ~a failed: ~a",5,
 	    make_simple_string(a),make_fixnum(l),
 	    make_simple_string(f),make_simple_string(n),make_simple_string(strerror(errno)));
--- gcl27-2.7.0.orig/o/makefile
+++ gcl27-2.7.0/o/makefile
@@ -57,7 +57,7 @@ unixtime.o: unixtime.c $(DECL)
 	$(CC) -c $(CFLAGS) $(DEFS) $*.c $(AUX_INFO) 
 
 ../gprof/unixtime.o: unixtime.c $(DECL)
-	$(CC) -DGCL_GPROF -c -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 $(filter-out -fomit-frame-pointer,$(CFLAGS)) $(DEFS) $< $(AUX_INFO)
+	$(CC) -DGCL_GPROF -c -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 $(filter-out -fomit-frame-pointer,$(CFLAGS)) $(DEFS) $< $(AUX_INFO) -o $@
 
 ../gprof/%.o: %.c $(DECL)
 	$(CC) -DGCL_GPROF -c $(filter-out -fomit-frame-pointer,$(CFLAGS)) $(DEFS) -pg $*.c $(AUX_INFO) -o $@
--- gcl27-2.7.0.orig/o/sfaslelf.c
+++ gcl27-2.7.0/o/sfaslelf.c
@@ -70,7 +70,7 @@ License for more details.
 #define PSPEC_SYM(sym,st1) (ELF_ST_BIND(sym->st_info)==STB_LOCAL &&	\
 			    ELF_ST_TYPE(sym->st_info)>=STT_LOPROC)
 
-#define MASK(n) (~(~0ULL << (n)))
+#define MASK(n) ((ul)(~(~0ULL << (n))))
 
 
 
