385abae
Description: <short summary of the patch>
385abae
 TODO: Put a short summary on the line above and replace this paragraph
385abae
 with a longer explanation of this change. Complete the meta-information
385abae
 with other relevant fields (see below for details). To make it easier, the
385abae
 information below has been extracted from the changelog. Adjust it or drop
385abae
 it.
385abae
 .
385abae
 gcl (2.6.12-32) unstable; urgency=medium
385abae
 .
385abae
   * Version_2_6_13pre40
385abae
   * Bug fix: "[INTL:pt_BR] Brazilian Portuguese debconf templates
385abae
     translation", thanks to Adriano Rafael Gomes (Closes: #811523).
385abae
Author: Camm Maguire <camm@debian.org>
385abae
Bug-Debian: https://bugs.debian.org/811523
385abae
385abae
---
385abae
The information above should follow the Patch Tagging Guidelines, please
385abae
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
385abae
are templates for supplementary fields that you might want to add:
385abae
385abae
Origin: <vendor|upstream|other>, <url of original patch>
385abae
Bug: <url in upstream bugtracker>
385abae
Bug-Debian: https://bugs.debian.org/<bugnumber>
385abae
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
385abae
Forwarded: <no|not-needed|url proving that it has been forwarded>
385abae
Reviewed-By: <name and email of someone who approved the patch>
385abae
Last-Update: <YYYY-MM-DD>
385abae
385abae
--- gcl-2.6.12.orig/h/notcomp.h
385abae
+++ gcl-2.6.12/h/notcomp.h
385abae
@@ -300,7 +300,8 @@ gcl_init_cmp_anon(void);
385abae
 
385abae
 #include "gmp_wrappers.h"
385abae
 
385abae
-#define massert(a_) if (!(a_)) assert_error(#a_,__LINE__,__FILE__,__FUNCTION__)
385abae
+#include <errno.h>
385abae
+#define massert(a_) ({errno=0;if (!(a_)||errno) assert_error(#a_,__LINE__,__FILE__,__FUNCTION__);})
385abae
 
385abae
 extern bool writable_malloc;
385abae
 #define writable_malloc_wrap(f_,rt_,a_...) ({rt_ v;bool w=writable_malloc;writable_malloc=1;v=f_(a_);writable_malloc=w;v;})
385abae
--- gcl-2.6.12.orig/lsp/gcl_mislib.lsp
385abae
+++ gcl-2.6.12/lsp/gcl_mislib.lsp
385abae
@@ -131,7 +131,7 @@ x))
385abae
 	    *gcl-major-version* *gcl-minor-version* *gcl-extra-version*
385abae
 	    (if (member :ansi-cl *features*) "ANSI" "CLtL1")
385abae
 	    (if (member :gprof *features*) "profiling" "")
385abae
-	    (gcl-compile-time)
385abae
+	    *gcl-release-date*
385abae
 	    "Source License: LGPL(gcl,gmp), GPL(unexec,bfd,xgcl)"
385abae
 	    "Binary License: "
385abae
 	    (if gpled-modules (format nil "GPL due to GPL'ed components: ~a" gpled-modules)
385abae
--- gcl-2.6.12.orig/lsp/gcl_predlib.lsp
385abae
+++ gcl-2.6.12/lsp/gcl_predlib.lsp
385abae
@@ -777,6 +777,7 @@
385abae
 (defvar *gcl-extra-version* nil)
385abae
 (defvar *gcl-minor-version* nil)
385abae
 (defvar *gcl-major-version* nil)
385abae
+(defvar *gcl-release-date*  nil)
385abae
 
385abae
 (defun warn-version (majvers minvers extvers)
385abae
   (and *gcl-major-version* *gcl-minor-version* *gcl-extra-version*
385abae
--- gcl-2.6.12.orig/makefile
385abae
+++ gcl-2.6.12/makefile
385abae
@@ -34,9 +34,9 @@ TESTDIR = ansi-tests
385abae
 
385abae
 VERSION=`cat majvers`.`cat minvers`
385abae
 
385abae
-all: $(BUILD_BFD) system command cmpnew/gcl_collectfn.o lsp/gcl_info.o do-gcl-tk # do-info
385abae
+all: $(BUILD_BFD) system command cmpnew/gcl_collectfn.o lsp/gcl_info.o do-gcl-tk release # do-info
385abae
 
385abae
-ASRC:=$(shell ls -1 o/*.c lsp/*.lsp cmpnew/*.lsp mod/*.lsp pcl/*sp clcs/*sp xgcl-2/*p) #o/*.d o/*.h h/*.h
385abae
+ASRC:=$(shell ls -1 o/*.c lsp/*.lsp cmpnew/*.lsp pcl/*sp clcs/*sp xgcl-2/*p) #o/*.d o/*.h h/*.h
385abae
 TAGS: $(ASRC)
385abae
 	etags --regex='/\#.`(defun[ \n\t]+\([^ \n\t]+\)/' $^
385abae
 
385abae
@@ -44,6 +44,9 @@ system: $(PORTDIR)/$(FLISP)
385abae
 #	[ "$(X_LIBS)" == "" ] || (cd xgcl-2 && make saved_xgcl LISP=../$< && mv saved_xgcl ../$(PORTDIR)/$(FLISP))
385abae
 	touch $@
385abae
 
385abae
+release: majvers minvers
385abae
+	date >$@
385abae
+
385abae
 xgcl: $(PORTDIR)/saved_xgcl
385abae
 
385abae
 $(PORTDIR)/saved_xgcl: $(PORTDIR)/saved_gcl
385abae
--- gcl-2.6.12.orig/o/error.c
385abae
+++ gcl-2.6.12/o/error.c
385abae
@@ -27,6 +27,7 @@ Foundation, 675 Mass Ave, Cambridge, MA
385abae
 */
385abae
 
385abae
 #include <stdlib.h>
385abae
+#include <string.h>
385abae
 #include "include.h"
385abae
 object siSuniversal_error_handler;
385abae
 
385abae
@@ -36,11 +37,11 @@ void
385abae
 assert_error(const char *a,unsigned l,const char *f,const char *n) {
385abae
 
385abae
   if (!raw_image && core_end && core_end==sbrk(0))
385abae
-    FEerror("The assertion ~a on line ~a of ~a in function ~a failed",4,
385abae
+    FEerror("The assertion ~a on line ~a of ~a in function ~a failed: ~a",5,
385abae
 	    make_simple_string(a),make_fixnum(l),
385abae
-	    make_simple_string(f),make_simple_string(n));
385abae
+	    make_simple_string(f),make_simple_string(n),make_simple_string(strerror(errno)));
385abae
   else {
385abae
-    emsg("The assertion %s on line %d of %s in function %s failed",a,l,f,n);
385abae
+    emsg("The assertion %s on line %d of %s in function %s failed: %s",a,l,f,n,strerror(errno));
385abae
     do_gcl_abort();
385abae
   }
385abae
 
385abae
--- gcl-2.6.12.orig/o/main.c
385abae
+++ gcl-2.6.12/o/main.c
385abae
@@ -242,7 +242,7 @@ get_gc_environ(void) {
385abae
   }
385abae
 
385abae
   gc_page_min=0.5;
385abae
-  if ((e=getenv("GCL_GC_PAGE_THRESH"))) {
385abae
+  if ((e=getenv("GCL_GC_PAGE_MIN"))) {
385abae
     massert(sscanf(e,"%lf",&gc_page_min)==1);
385abae
     massert(gc_page_min>=0.0);
385abae
   }
385abae
@@ -1028,12 +1028,6 @@ DEFUNO_NEW("IDENTITY",object,fLidentity,
385abae
   RETURN1 (x0);
385abae
 }
385abae
 
385abae
-DEFUNO_NEW("GCL-COMPILE-TIME",object,fSgcl_compile_time,SI
385abae
-       ,0,0,NONE,OO,OO,OO,OO,void,Lgcl_compile_time,(void),"")
385abae
-{
385abae
-  RETURN1 (make_simple_string(__DATE__ " " __TIME__));
385abae
-}
385abae
-
385abae
 DEFUNO_NEW("LDB1",object,fSldb1,SI
385abae
        ,3,3,NONE,OI,II,OO,OO,void,Lldb1,(fixnum a,fixnum b, fixnum c),"")
385abae
 {
385abae
--- gcl-2.6.12.orig/o/sfasli.c
385abae
+++ gcl-2.6.12/o/sfasli.c
385abae
@@ -115,10 +115,9 @@ LFD(build_symbol_table)(void) {
385abae
 int
385abae
 use_symbols(double d,...) {
385abae
 
385abae
+  double d2;
385abae
 #ifndef DARWIN
385abae
-
385abae
   extern void sincos(double,double *,double *);
385abae
-  double d2;
385abae
 
385abae
   sincos(d,&d,&d2;;
385abae
 
385abae
--- /dev/null
385abae
+++ gcl-2.6.12/release
385abae
@@ -0,0 +1 @@
385abae
+Fri Apr 22 15:51:11 UTC 2016
385abae
--- gcl-2.6.12.orig/unixport/makefile
385abae
+++ gcl-2.6.12/unixport/makefile
385abae
@@ -72,10 +72,11 @@ $(LSPDIR)/auto_new.lsp: $(LSPDIR)/auto.l
385abae
 sys_init.lsp: sys_init.lsp.in
385abae
 
385abae
 	cat $< | sed \
385abae
-		-e "s#@LI-VERS@#(`cat ../majvers`.`cat ../minvers`) `date`#1" \
385abae
+		-e "s#@LI-VERS@#(`cat ../majvers`.`cat ../minvers`) `cat ../release`#1" \
385abae
 		-e "s#@LI-EXTVERS@#`cat ../minvers | cut -f2 -d.`#1" \
385abae
 		-e "s#@LI-MINVERS@#`cat ../minvers | cut -f1 -d.`#1" \
385abae
 		-e "s#@LI-MAJVERS@#`cat ../majvers`#1" \
385abae
+		-e "s#@LI-RELEASE@#`cat ../release`#1" \
385abae
 		-e "s#@LI-CC@#\"$(CC) -c $(FINAL_CFLAGS)\"#1" \
385abae
 		-e "s#@LI-LD@#\"$(CC) $(LD_FLAGS) -o \"#1" \
385abae
 		-e "s#@LI-LD-LIBS@#\" $(LD_LIBS_PRE) -l$* $(LD_LIBS_POST)\"#1" \
385abae
--- gcl-2.6.12.orig/unixport/sys_init.lsp.in
385abae
+++ gcl-2.6.12/unixport/sys_init.lsp.in
385abae
@@ -51,7 +51,8 @@
385abae
 
385abae
 (setq *gcl-extra-version* @LI-EXTVERS@
385abae
       *gcl-minor-version* @LI-MINVERS@ 
385abae
-      *gcl-major-version* @LI-MAJVERS@)
385abae
+      *gcl-major-version* @LI-MAJVERS@
385abae
+      *gcl-release-date*  "@LI-RELEASE@")
385abae
 
385abae
 (defvar *system-banner* (default-system-banner))
385abae
 (setq *optimize-maximum-pages* t)
385abae
@@ -83,3 +84,5 @@
385abae
 (let* ((i 4096)(j (si::equal-tail-recursion-check i)))
385abae
   (unless (<= (ash i -1) j)
385abae
     (warn "equal is not tail recursive ~s ~s" i j)))
385abae
+
385abae
+(format t "~s heap words available~%" (multiple-value-bind (a b c d) (si::heap-report) (/ (- d c) (/ a 8))))