Blob Blame Raw
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.
 .
 gcl (2.6.12-50) unstable; urgency=medium
 .
   * list_order.6
Author: Camm Maguire <camm@debian.org>

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

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2017-06-14

--- gcl-2.6.12.orig/h/386-gnu.h
+++ gcl-2.6.12/h/386-gnu.h
@@ -59,3 +59,5 @@
 #define RELOC_H "elf32_i386_reloc.h"
 
 #define NEED_STACK_CHK_GUARD
+
+#define DEFINED_REAL_MAXPAGE (1UL<<18) /*FIXME brk probe broken*/
--- gcl-2.6.12.orig/h/m68k-linux.h
+++ gcl-2.6.12/h/m68k-linux.h
@@ -78,3 +78,5 @@ int cacheflush(void *,int,int,int);
 #define RELOC_H "elf32_m68k_reloc.h"
 
 #define NEED_STACK_CHK_GUARD
+
+#define DEFINED_REAL_MAXPAGE (1UL<<18) /*FIXME brk probe broken*/
--- gcl-2.6.12.orig/h/sh4-linux.h
+++ gcl-2.6.12/h/sh4-linux.h
@@ -56,3 +56,5 @@
 #define RELOC_H "elf32_sh4_reloc.h"
 
 #define NEED_STACK_CHK_GUARD
+
+#define DEFINED_REAL_MAXPAGE (1UL<<18) /*FIXME brk probe broken*/
--- gcl-2.6.12.orig/o/main.c
+++ gcl-2.6.12/o/main.c
@@ -302,6 +302,9 @@ update_real_maxpage(void) {
   }
 #endif
 
+#ifdef DEFINED_REAL_MAXPAGE
+  real_maxpage=DEFINED_REAL_MAXPAGE;
+#else
   massert(cur=sbrk(0));
   beg=data_start ? data_start : cur;
   for (i=0,j=(1L<<log_maxpage_bound);j>PAGESIZE;j>>=1)
@@ -311,7 +314,8 @@ update_real_maxpage(void) {
 	i+=j;
       }
   massert(!mbrk(cur));
-
+#endif
+  
   phys_pages=ufmin(get_phys_pages1(0)+page(beg),real_maxpage)-page(beg);
 
   get_gc_environ();