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-101) unstable; urgency=medium
 .
   * Version_2.6.13pre98
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: 2021-01-17

--- gcl-2.6.12.orig/configure
+++ gcl-2.6.12/configure
@@ -3974,7 +3974,7 @@ $as_echo "removing $1 from LDFLAGS" >&6;
 
 }
 
-add_args_to_cflags -fsigned-char -pipe -fcommon \
+add_args_to_cflags  -fsigned-char -pipe -fcommon \
                     -fno-builtin-malloc -fno-builtin-free \
                     -fno-PIE -fno-pie -fno-PIC -fno-pic \
 	            -Wall \
@@ -4036,6 +4036,8 @@ case $use in
 	assert_arg_to_cflags -mms-bitfields
         assert_arg_to_ldflags -Wl,--stack,8000000;;
     386-macosx)
+#	assert_arg_to_cflags -Wno-error=implicit-function-declaration
+	add_arg_to_cflags -Wno-incomplete-setjmp-declaration
 	assert_arg_to_ldflags -Wl,-no_pie
 	if test "$build_cpu" = "x86_64" ; then
 	    assert_arg_to_cflags -m64
@@ -4246,10 +4248,6 @@ fi
 # for the system.  This can usually be done via the "uname" command, but
 # there are a few systems, like Next, where this doesn't work.
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking system version (for dynamic loading)" >&5
-$as_echo_n "checking system version (for dynamic loading)... " >&6; }
-if machine=`uname -m` ; then true; else machine=unknown ; fi
-
 for ac_prog in makeinfo
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -4295,6 +4293,10 @@ test -n "$MAKEINFO" || MAKEINFO=""false"
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking system version (for dynamic loading)" >&5
+$as_echo_n "checking system version (for dynamic loading)... " >&6; }
+if machine=`uname -m` ; then true; else machine=unknown ; fi
+
 if test -f /usr/lib/NextStep/software_version; then
     system=NEXTSTEP-`${AWK} '/3/,/3/' /usr/lib/NextStep/software_version`
 else
@@ -6191,6 +6193,7 @@ else
 /* end confdefs.h.  */
 
 		#include <stdio.h>
+		#include <stdlib.h>
 		#define EXTER
 		#define INLINE
 		#include "$MP_INCLUDE"
@@ -6319,6 +6322,7 @@ else
 /* end confdefs.h.  */
 
 		#include <stdio.h>
+		#include <stdlib.h>
 		#define EXTER
 		#define INLINE
 		#include "$MP_INCLUDE"
--- gcl-2.6.12.orig/configure.in
+++ gcl-2.6.12/configure.in
@@ -258,7 +258,7 @@ remove_arg_from_ldflags() {
     
 }
 
-add_args_to_cflags -fsigned-char -pipe -fcommon \
+add_args_to_cflags  -fsigned-char -pipe -fcommon \
                     -fno-builtin-malloc -fno-builtin-free \
                     -fno-PIE -fno-pie -fno-PIC -fno-pic \
 	            -Wall \
@@ -294,6 +294,8 @@ case $use in
 	assert_arg_to_cflags -mms-bitfields
         assert_arg_to_ldflags -Wl,--stack,8000000;;
     386-macosx)
+#	assert_arg_to_cflags -Wno-error=implicit-function-declaration
+	add_arg_to_cflags -Wno-incomplete-setjmp-declaration
 	assert_arg_to_ldflags -Wl,-no_pie
 	if test "$build_cpu" = "x86_64" ; then
 	    assert_arg_to_cflags -m64
@@ -453,12 +455,12 @@ fi
 # for the system.  This can usually be done via the "uname" command, but
 # there are a few systems, like Next, where this doesn't work.
 
-AC_MSG_CHECKING([system version (for dynamic loading)])
-if machine=`uname -m` ; then true; else machine=unknown ; fi
-
 AC_CHECK_PROGS(MAKEINFO,makeinfo,"false")
 AC_SUBST(MAKEINFO)
 
+AC_MSG_CHECKING([system version (for dynamic loading)])
+if machine=`uname -m` ; then true; else machine=unknown ; fi
+
 if test -f /usr/lib/NextStep/software_version; then
     system=NEXTSTEP-`${AWK} '/3/,/3/' /usr/lib/NextStep/software_version`
 else
@@ -971,6 +973,7 @@ AC_RUN_IFELSE(
     [AC_LANG_PROGRAM(
 	    [[
 		#include <stdio.h>
+		#include <stdlib.h>
 		#define EXTER
 		#define INLINE
 		#include "$MP_INCLUDE"
@@ -1019,6 +1022,7 @@ AC_RUN_IFELSE(
     [AC_LANG_PROGRAM(
 	    [[
 		#include <stdio.h>
+		#include <stdlib.h>
 		#define EXTER
 		#define INLINE
 		#include "$MP_INCLUDE"
--- gcl-2.6.12.orig/gmp4/acinclude.m4
+++ gcl-2.6.12/gmp4/acinclude.m4
@@ -610,10 +610,11 @@ GMP_PROG_CC_WORKS_PART([$1], [long long
 #if defined (__GNUC__) && ! defined (__cplusplus)
 typedef unsigned long long t1;typedef t1*t2;
 static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
-{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
-f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
-for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
-h(){}g(){}
+{t1 c=0,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
+int h(){return 0;}
+int g(){return 0;}
+int f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
+        for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();} return 0;}
 #else
 int dummy;
 #endif
@@ -625,8 +626,8 @@ GMP_PROG_CC_WORKS_PART([$1], [long long
    1666 to get an ICE with -O1 -mpowerpc64.  */
 
 #if defined (__GNUC__) && ! defined (__cplusplus)
-f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();}
-g(){}
+int g(){return 0;}
+int f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();return 0;}
 #else
 int dummy;
 #endif
@@ -3812,6 +3813,7 @@ AC_DEFUN([GMP_PROG_CC_FOR_BUILD_WORKS],
 # remove anything that might look like compiler output to our "||" expression
 rm -f conftest* a.out b.out a.exe a_out.exe
 cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main ()
 {
@@ -3886,6 +3888,7 @@ AC_DEFUN([GMP_PROG_EXEEXT_FOR_BUILD],
 AC_CACHE_CHECK([for build system executable suffix],
                gmp_cv_prog_exeext_for_build,
 [cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main ()
 {
@@ -3922,6 +3925,7 @@ AC_DEFUN([GMP_C_FOR_BUILD_ANSI],
 AC_CACHE_CHECK([whether build system compiler is ANSI],
                gmp_cv_c_for_build_ansi,
 [cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main (int argc, char **argv)
 {
@@ -3956,6 +3960,7 @@ AC_DEFUN([GMP_CHECK_LIBM_FOR_BUILD],
 AC_CACHE_CHECK([for build system compiler math library],
                gmp_cv_check_libm_for_build,
 [cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main ()
 {
--- gcl-2.6.12.orig/gmp4/configure
+++ gcl-2.6.12/gmp4/configure
@@ -808,6 +808,7 @@ infodir
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -909,6 +910,7 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1161,6 +1163,15 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1298,7 +1309,7 @@ fi
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+		libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1451,6 +1462,7 @@ Fine tuning of the installation director
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -6335,10 +6347,11 @@ if test "$gmp_prog_cc_works" = yes; then
 #if defined (__GNUC__) && ! defined (__cplusplus)
 typedef unsigned long long t1;typedef t1*t2;
 static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
-{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
-f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
-for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
-h(){}g(){}
+{t1 c=0,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
+int h(){return 0;}
+int g(){return 0;}
+int f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
+        for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();} return 0;}
 #else
 int dummy;
 #endif
@@ -6397,8 +6410,8 @@ if test "$gmp_prog_cc_works" = yes; then
    1666 to get an ICE with -O1 -mpowerpc64.  */
 
 #if defined (__GNUC__) && ! defined (__cplusplus)
-f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();}
-g(){}
+int g(){return 0;}
+int f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();return 0;}
 #else
 int dummy;
 #endif
@@ -7888,10 +7901,11 @@ if test "$gmp_prog_cc_works" = yes; then
 #if defined (__GNUC__) && ! defined (__cplusplus)
 typedef unsigned long long t1;typedef t1*t2;
 static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
-{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
-f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
-for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
-h(){}g(){}
+{t1 c=0,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
+int h(){return 0;}
+int g(){return 0;}
+int f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
+        for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();} return 0;}
 #else
 int dummy;
 #endif
@@ -7950,8 +7964,8 @@ if test "$gmp_prog_cc_works" = yes; then
    1666 to get an ICE with -O1 -mpowerpc64.  */
 
 #if defined (__GNUC__) && ! defined (__cplusplus)
-f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();}
-g(){}
+int g(){return 0;}
+int f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();return 0;}
 #else
 int dummy;
 #endif
@@ -9716,6 +9730,7 @@ $as_echo_n "checking build system compil
 # remove anything that might look like compiler output to our "||" expression
 rm -f conftest* a.out b.out a.exe a_out.exe
 cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main ()
 {
@@ -9748,6 +9763,7 @@ $as_echo_n "checking build system compil
 # remove anything that might look like compiler output to our "||" expression
 rm -f conftest* a.out b.out a.exe a_out.exe
 cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main ()
 {
@@ -9781,6 +9797,7 @@ $as_echo_n "checking build system compil
 # remove anything that might look like compiler output to our "||" expression
 rm -f conftest* a.out b.out a.exe a_out.exe
 cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main ()
 {
@@ -9860,6 +9877,7 @@ if ${gmp_cv_prog_exeext_for_build+:} fal
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main ()
 {
@@ -9897,6 +9915,7 @@ if ${gmp_cv_c_for_build_ansi+:} false; t
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main (int argc, char **argv)
 {
@@ -9932,6 +9951,7 @@ if ${gmp_cv_check_libm_for_build+:} fals
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.c <<EOF
+#include <stdlib.h>
 int
 main ()
 {
--- gcl-2.6.12.orig/o/error.c
+++ gcl-2.6.12/o/error.c
@@ -146,7 +146,7 @@ Icall_gen_error_handler(object ci,object
     b[i]= va_arg(ap,object);
   va_end(ap);
 
-  return IapplyVector(sSuniversal_error_handler,n,b);
+  IapplyVector(sSuniversal_error_handler,n,b);
 
 }
 
--- gcl-2.6.12.orig/o/main.c
+++ gcl-2.6.12/o/main.c
@@ -28,6 +28,8 @@ Foundation, 675 Mass Ave, Cambridge, MA
 #include <unistd.h>
 #include <string.h>
 #include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 static void
 init_main(void);
@@ -462,6 +464,8 @@ DEFUN_NEW("EQUAL-TAIL-RECURSION-CHECK",o
   RETURN1((object)(w-stack_to_be_allocated));
 }
 
+#if !defined(DARWIN)&&!defined(__MINGW32__)
+
 static int
 mbin(const char *s,char *o) {
 
@@ -497,7 +501,7 @@ which(const char *n,char *o) {
 
 }
 
-
+#endif
 
 int
 main(int argc, char **argv, char **envp) {
--- gcl-2.6.12.orig/o/sfaslmacho.c
+++ gcl-2.6.12/o/sfaslmacho.c
@@ -31,7 +31,7 @@
       (_fl<=S_SYMBOL_STUBS || _fl==S_16BYTE_LITERALS) && _fl!=S_ZEROFILL;})
 
 
-#define MASK(n) (~(~0L << (n)))
+#define MASK(n) (~(~0ULL << (n)))
 
 
 
--- gcl-2.6.12.orig/o/string.d
+++ gcl-2.6.12/o/string.d
@@ -24,6 +24,7 @@ Foundation, 675 Mass Ave, Cambridge, MA
 	string routines
 */
 
+#include <string.h>
 #include "include.h"
 
 object sKstart1;
--- gcl-2.6.12.orig/o/unexmacosx.c
+++ gcl-2.6.12/o/unexmacosx.c
@@ -560,7 +560,7 @@ copy_data_segment (struct load_command *
       sc.fileoff = curr_file_offset;
       sc.filesize = core_end-mach_mapstart;
       sc.maxprot = VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE;
-      sc.initprot = VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE;
+      sc.initprot = VM_PROT_READ | VM_PROT_WRITE /* | VM_PROT_EXECUTE */;
       sc.nsects = 0;
       sc.flags = 0;
 
--- gcl-2.6.12.orig/unixport/makefile
+++ gcl-2.6.12/unixport/makefile
@@ -85,7 +85,6 @@ sys_init.lsp: sys_init.lsp.in
 		-e "s#@LI-OPT-TWO@#\"$(O2FLAGS)\"#1" \
 		-e "s#@LI-INIT-LSP@#\"$@\"#1" >$@
 
-
 saved_%:raw_% $(RSYM) sys_init.lsp raw_%_map msys \
 		$(CMPDIR)/gcl_cmpmain.lsp \
 		$(CMPDIR)/gcl_lfun_list.lsp \
