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-4) unstable; urgency=medium
 .
   * Version_2_7_0pre7
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: 2023-12-21

--- gcl27-2.7.0.orig/configure
+++ gcl27-2.7.0/configure
@@ -8959,6 +8959,13 @@ printf "%s\n" "#define NO_GETTOD 1" >>co
 fi
 
 
+ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat"
+if test "x$ac_cv_func_readlinkat" = xyes
+then :
+  printf "%s\n" "#define HAVE_READLINKAT 1" >>confdefs.h
+
+fi
+
 
 ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
 if test "x$ac_cv_header_sys_ioctl_h" = xyes
--- gcl27-2.7.0.orig/configure.in
+++ gcl27-2.7.0/configure.in
@@ -1696,6 +1696,7 @@ AC_CHECK_FUNCS(rename)
 AC_CHECK_FUNC(uname, , AC_DEFINE(NO_UNAME,1,[no uname call]))
 AC_CHECK_FUNC(gettimeofday,, AC_DEFINE(NO_GETTOD,[1],[no gettimeofday call]))
 
+AC_CHECK_FUNCS(readlinkat)
 
 AC_CHECK_HEADERS(sys/ioctl.h)
 
--- gcl27-2.7.0.orig/git.tag
+++ gcl27-2.7.0/git.tag
@@ -1,2 +1,2 @@
-"Version_2_7_0pre5"
+"Version_2_7_0pre7"
 
--- gcl27-2.7.0.orig/h/386-macosx.defs
+++ gcl27-2.7.0/h/386-macosx.defs
@@ -1,16 +1,9 @@
 # powerpc-macosx.defs
 
-# Disable Apple's custom C preprocessor which gets confused when
-# preprocessing some of the *.d files in the o/ subdirectory.
-CC = gcc $(CPPFLAGS)
-
 # Set this to avoid warnings when linking against libncurses.
 # This is due to the requirements of the two level namespace.
 LIBS := `echo $(LIBS) | sed -e 's/-lncurses/ /'`
 
-# Set this for the linker to operate correctly.
-MACOSX_DEPLOYMENT_TARGET = 10.2
-
 # Define this to build an executable rsym.
 RSYM = rsym
 ifneq ($(findstring bfd,$(LIBS)),) 
--- gcl27-2.7.0.orig/h/gclincl.h.in
+++ gcl27-2.7.0/h/gclincl.h.in
@@ -186,6 +186,9 @@
 /* Define to 1 if you have the <readline/readline.h> header file. */
 #undef HAVE_READLINE_READLINE_H
 
+/* Define to 1 if you have the `readlinkat' function. */
+#undef HAVE_READLINKAT
+
 /* Define to 1 if you have the `rename' function. */
 #undef HAVE_RENAME
 
--- gcl27-2.7.0.orig/h/powerpc-macosx.defs
+++ gcl27-2.7.0/h/powerpc-macosx.defs
@@ -1,16 +1,9 @@
 # powerpc-macosx.defs
 
-# Disable Apple's custom C preprocessor which gets confused when
-# preprocessing some of the *.d files in the o/ subdirectory.
-CC = gcc $(CPPFLAGS)
-
 # Set this to avoid warnings when linking against libncurses.
 # This is due to the requirements of the two level namespace.
 LIBS := `echo $(LIBS) | sed -e 's/-lncurses/ /'`
 
-# Set this for the linker to operate correctly.
-MACOSX_DEPLOYMENT_TARGET = 10.2
-
 # Define this to build an executable rsym.
 RSYM = rsym
 ifneq ($(findstring bfd,$(LIBS)),) 
--- gcl27-2.7.0.orig/o/main.c
+++ gcl27-2.7.0/o/main.c
@@ -395,8 +395,9 @@ DEFUN("SET-LOG-MAXPAGE-BOUND",object,fSs
   GBC(t_relocatable);
   dend=heap_end+PAGESIZE+CEI(rb_pointer-rb_begin(),PAGESIZE);
   if (end >= dend) {
+    putenv("GCL_MEM_MULTIPLE=1.0");/*invoking this function overrides mem_multiple*/
     minimize_image();
-    log_maxpage_bound=l;/*FIXME maybe this should be under mem_multiple, not over*/
+    log_maxpage_bound=l;
     update_real_maxpage();
     maybe_set_hole_from_maxpages();
   }
--- gcl27-2.7.0.orig/o/unixfsys.c
+++ gcl27-2.7.0/o/unixfsys.c
@@ -281,7 +281,7 @@ DEFUN("READLINKAT",object,fSreadlinkat,S
   massert(z1<sizeof(FN1));
   memcpy(FN1,s->st.st_self,z1);
   FN1[z1]=0;
-#ifndef __MINGW32__
+#ifndef HAVE_READLINKAT
   massert((l=readlinkat(d ? dirfd((DIR *)d) : AT_FDCWD,FN1,FN2,sizeof(FN2)))>=0 && l<sizeof(FN2));
 #else
   l=0;
--- gcl27-2.7.0.orig/unixport/boot.lisp
+++ gcl27-2.7.0/unixport/boot.lisp
@@ -1,6 +1,6 @@
 (in-package :compiler)(cdebug)(setq *compile-print* nil si::*notify-gbc* t *annotate* nil)
 
-
+(si::set-log-maxpage-bound 30);FIXME oom bootstrap less, bss shrank dump error when unrestricted
 
 #+pre-gcl
 (progn
