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-8) unstable; urgency=medium
 .
   * Version_2_6_13pre7
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: <YYYY-MM-DD>

--- gcl-2.6.12.orig/gcl-tk/comm.c
+++ gcl-2.6.12/gcl-tk/comm.c
@@ -66,7 +66,7 @@ fScheck_fd_for_input(fixnum fd,fixnum ti
 
 
 struct connection_state *
-setup_connection_state(fd)
+setup_connection_state(int fd)
 { struct connection_state * res;
   res = (void *)malloc(sizeof(struct connection_state));
   bzero(res,sizeof(struct connection_state));
--- gcl-2.6.12.orig/gcl-tk/guis.h
+++ gcl-2.6.12/gcl-tk/guis.h
@@ -4,6 +4,10 @@
 #include <stdlib.h>
 
 #define NO_PRELINK_UNEXEC_DIVERSION
+#define IMMNUM_H
+#define GMP_WRAPPERS_H
+#define ERROR_H
+
 #include "include.h"
 
 #ifdef NeXT
--- gcl-2.6.12.orig/gmp4/mpn/x86_64/k8/redc_1.asm
+++ gcl-2.6.12/gmp4/mpn/x86_64/k8/redc_1.asm
@@ -114,7 +114,7 @@ ifdef(`PIC',`
 
 	JUMPTABSECT
 	ALIGN(8)
-L(tab):	JMPENT(	L(0m4), L(tab))
+L(tab):	JMPENT(	L(0), L(tab))
 	JMPENT(	L(1), L(tab))
 	JMPENT(	L(2), L(tab))
 	JMPENT(	L(3), L(tab))
@@ -397,6 +397,7 @@ L(le1):	add	%r10, (up)
 
 
 	ALIGN(16)
+L(0):
 L(0m4):
 L(lo0):	mov	(mp,nneg,8), %rax
 	mov	nneg, i
--- gcl-2.6.12.orig/h/att_ext.h
+++ gcl-2.6.12/h/att_ext.h
@@ -29,7 +29,7 @@ void *malloc(size_t);
 void *realloc(void *,size_t);
 /* void * memalign(size_t,size_t); */
 void *alloc_contblock(size_t);
-inline void *alloc_relblock(size_t);
+void *alloc_relblock(size_t);
 /* object fSallocate_contiguous_pages(); */
 /* object fSallocate_relocatable_pages(); */
 
@@ -291,9 +291,7 @@ EXTER object sSAsystem_directoryA;
 #ifdef UNIX
 EXTER char *kcl_self;
 #endif
-#if !defined(IN_MAIN) || !defined(ATT)
 EXTER bool raw_image;
-#endif
 char *merge_system_directory();
 
 
--- gcl-2.6.12.orig/h/cmpincl1.h
+++ gcl-2.6.12/h/cmpincl1.h
@@ -1,2 +1 @@
-#define EXTER extern
 #define CMPINCLUDE
--- gcl-2.6.12.orig/h/compbas.h
+++ gcl-2.6.12/h/compbas.h
@@ -1,2 +1,12 @@
 #include <stdarg.h>
 #define _VA_LIST_DEFINED
+#ifndef EXTER
+#define EXTER extern
+#endif
+#ifndef INLINE
+#if defined(__GNUC__) && __GNUC__ <= 4
+#define INLINE extern inline
+#else
+#define INLINE inline
+#endif
+#endif
--- gcl-2.6.12.orig/h/error.h
+++ gcl-2.6.12/h/error.h
@@ -1,4 +1,7 @@
-#define Icall_error_handler(a_,b_,c_,d_...) \
+#ifndef ERROR_H
+#define ERROR_H
+
+#define Icall_error_handler(a_,b_,c_,d_...)			\
   Icall_gen_error_handler(Cnil,null_string,a_,b_,c_,##d_)
 #define Icall_continue_error_handler(a_,b_,c_,d_,e_...) \
   Icall_gen_error_handler(Ct,a_,b_,c_,d_,##e_)
@@ -8,12 +11,8 @@ extern enum type t_vtype;
 extern int vtypep_fn(object);
 extern void Check_type(object *,int (*)(object),object);
 
+#define PFN(a_) INLINE int Join(a_,_fn)(object x) {return a_(x);}
 
-#ifdef IN_MAIN
-#define PFN(a_) int Join(a_,_fn)(object x) {return a_(x);}
-#else
-#define PFN(a_) extern int Join(a_,_fn)(object x);
-#endif
 PFN(integerp)
 PFN(non_negative_integerp)
 PFN(rationalp)
@@ -201,3 +200,4 @@ object ihs_top_function_name(ihs_ptr h);
    abort();\
  })
 
+#endif /*ERROR_H*/
--- gcl-2.6.12.orig/h/gmp_wrappers.h
+++ gcl-2.6.12/h/gmp_wrappers.h
@@ -1,12 +1,8 @@
-#ifndef GMP_EXTERN
-#define GMP_EXTERN extern
-#endif
-#ifndef GMP_EXTERN_INLINE
-#define GMP_EXTERN_INLINE GMP_EXTERN __inline__
-#endif
+#ifndef GMP_WRAPPERS_H
+#define GMP_WRAPPERS_H
 
-GMP_EXTERN jmp_buf gmp_jmp;
-GMP_EXTERN int jmp_gmp,gmp_relocatable;
+EXTER jmp_buf gmp_jmp;
+EXTER int jmp_gmp,gmp_relocatable;
 
 #define join(a_,b_) a_ ## b_
 #define Join(a_,b_) join(a_,b_)
@@ -95,7 +91,7 @@ GMP_EXTERN int jmp_gmp,gmp_relocatable;
    set to -1 otherwise.  20040815 CM*/
 
 #define MEM_GMP_CALL(n_,rt_,a_,s_,b_...) \
-   GMP_EXTERN_INLINE Join(RF_,rt_) Join(m,a_)(Join(P,n_)(b_)) { \
+   INLINE Join(RF_,rt_) Join(m,a_)(Join(P,n_)(b_)) { \
            int j;\
            Join(RD_,rt_);\
            if (gmp_relocatable) {\
@@ -195,3 +191,5 @@ MEM_GMP_CALL(2,size_t,mpz_sizeinbase,0,m
 /*#define __gmpz_realloc m__gmpz_realloc*/
 #define __gmpz_size m__gmpz_size
 #define __gmpz_sizeinbase m__gmpz_sizeinbase
+
+#endif /*GMP_WRAPPERS_H*/
--- gcl-2.6.12.orig/h/immnum.h
+++ gcl-2.6.12/h/immnum.h
@@ -17,10 +17,10 @@
 #define iif2(x,y) is_imm_fixnum2(x,y)
 
 
-EXTER inline fixnum
+INLINE fixnum
 lnabs(fixnum x) {return x<0 ? ~x : x;}
 
-EXTER inline char
+INLINE char
 clz(ufixnum x) {
 #ifdef HAVE_CLZL
   return x ? __builtin_clzl(x) : sizeof(x)*8;
@@ -29,7 +29,7 @@ clz(ufixnum x) {
 #endif
 }
 
-EXTER inline char
+INLINE char
 ctz(ufixnum x) {
 #ifdef HAVE_CTZL
   return __builtin_ctzl(x);/*x ? __builtin_clzl(x) : sizeof(x)*8;*/
@@ -38,10 +38,10 @@ ctz(ufixnum x) {
 #endif
 }
 
-EXTER inline char
+INLINE char
 fixnum_length(fixnum x) {return sizeof(x)*8-clz(lnabs(x));}
 
-EXTER inline object
+INLINE object
 immnum_length(object x) {return iif(x) ? mif(fixnum_length(fif(x))) : integer_length(x);}
 
 
@@ -57,7 +57,7 @@ immnum_length(object x) {return iif(x) ?
 #define POPD 0x3F
 #endif
 
-EXTER inline char
+INLINE char
 fixnum_popcount(ufixnum x) {
   x-=POPA&(x>>1);
   x=(x&POPB)+((x>>2)&POPB);
@@ -70,33 +70,33 @@ fixnum_popcount(ufixnum x) {
   return x&POPD;
 }
 
-EXTER inline char
+INLINE char
 /* fixnum_count(fixnum x) {return __builtin_popcountl(lnabs(x));} */
 fixnum_count(fixnum x) {return fixnum_popcount(lnabs(x));}
 
-EXTER inline object
+INLINE object
 immnum_count(object x) {return iif(x) ? mif(fixnum_count(fif(x))) : integer_count(x);}
 
 /*bs=sizeof(long)*8;
   lb=bs-clz(labs(x));|x*y|=|x|*|y|<2^(lbx+lby)<2^(bs-1);
   0 bounded by 2^0, +-1 by 2^1,mpf by 2^(bs-1), which is sign bit
   protect labs from most negative fix, here all immfix ok*/
-EXTER inline bool
+INLINE bool
 fixnum_mul_safe_abs(fixnum x,fixnum y) {return clz(x)+clz(y)>sizeof(x)*8+1;}
-EXTER inline object
+INLINE object
 safe_mul_abs(fixnum x,fixnum y) {return fixnum_mul_safe_abs(x,y) ? make_fixnum(x*y) : fixnum_times(x,y);}
-EXTER inline bool
+INLINE bool
 fixnum_mul_safe(fixnum x,fixnum y) {return fixnum_mul_safe_abs(labs(x),labs(y));}
-EXTER inline object
+INLINE object
 safe_mul(fixnum x,fixnum y) {return fixnum_mul_safe(x,y) ? make_fixnum(x*y) : fixnum_times(x,y);}
-EXTER inline object
+INLINE object
 immnum_times(object x,object y) {return iif2(x,y) ? safe_mul(fif(x),fif(y)) : number_times(x,y);}
 
-EXTER inline object
+INLINE object
 immnum_plus(object x,object y) {return iif2(x,y) ? make_fixnum(fif(x)+fif(y)) : number_plus(x,y);}
-EXTER inline object
+INLINE object
 immnum_minus(object x,object y) {return iif2(x,y) ? make_fixnum(fif(x)-fif(y)) : number_minus(x,y);}
-EXTER inline object
+INLINE object
 immnum_negate(object x) {return iif(x) ? make_fixnum(-fif(x)) : number_negate(x);}
 
 #define BOOLCLR		0
@@ -116,7 +116,7 @@ immnum_negate(object x) {return iif(x) ?
 #define BOOLORC1	015
 #define BOOLORC2	013
 
-EXTER inline fixnum
+INLINE fixnum
 fixnum_boole(fixnum op,fixnum x,fixnum y) {
   switch(op) {
   case BOOLCLR:	 return 0;
@@ -139,7 +139,7 @@ fixnum_boole(fixnum op,fixnum x,fixnum y
   return 0;/*FIXME error*/
 }
   
-EXTER inline object
+INLINE object
 immnum_boole(fixnum o,object x,object y) {return iif2(x,y) ? mif(fixnum_boole(o,fif(x),fif(y))) : log_op2(o,x,y);}
 
 #define immnum_bool(o,x,y) immnum_boole(fixint(o),x,y)
@@ -156,93 +156,93 @@ immnum_boole(fixnum o,object x,object y)
 #define immnum_orc1(x,y)  immnum_boole(BOOLORC1,x,y)
 #define immnum_orc2(x,y)  immnum_boole(BOOLORC2,x,y)
 
-EXTER inline fixnum
+INLINE fixnum
 fixnum_div(fixnum x,fixnum y,fixnum d) {
   fixnum z=x/y;
   if (d && x!=y*z && (x*d>0 ? y>0 : y<0))
     z+=d;
   return z;
 }
-EXTER inline fixnum
+INLINE fixnum
 fixnum_rem(fixnum x,fixnum y,fixnum d) {
   fixnum z=x%y;
   if (d && z && (x*d>0 ? y>0 : y<0))
     z+=y;
   return z;
 }
-EXTER inline object
+INLINE object
 immnum_truncate(object x,object y) {return iif2(x,y)&&y!=make_fixnum(0) ? mif(fixnum_div(fif(x),fif(y),0)) : (intdivrem(x,y,0,&x,NULL),x);}
-EXTER inline object
+INLINE object
 immnum_floor(object x,object y) {return iif2(x,y)&&y!=make_fixnum(0) ? mif(fixnum_div(fif(x),fif(y),-1)) : (intdivrem(x,y,-1,&x,NULL),x);}
-EXTER inline object
+INLINE object
 immnum_ceiling(object x,object y) {return iif2(x,y)&&y!=make_fixnum(0) ? mif(fixnum_div(fif(x),fif(y),1)) : (intdivrem(x,y,1,&x,NULL),x);}
-EXTER inline object
+INLINE object
 immnum_mod(object x,object y) {return iif2(x,y)&&y!=make_fixnum(0) ? mif(fixnum_rem(fif(x),fif(y),-1)) : (intdivrem(x,y,-1,NULL,&y),y);}
-EXTER inline object
+INLINE object
 immnum_rem(object x,object y) {return iif2(x,y)&&y!=make_fixnum(0) ? mif(fixnum_rem(fif(x),fif(y),0)) : (intdivrem(x,y,0,NULL,&y),y);}
 
-EXTER inline fixnum
+INLINE fixnum
 fixnum_rshft(fixnum x,fixnum y) {
   return y>=sizeof(x)*8 ? (x<0 ? -1 : 0) : x>>y;
 }
-EXTER inline object
+INLINE object
 fixnum_lshft(fixnum x,fixnum y) {
   return clz(labs(x))>y ? make_fixnum(x<<y) : (x ? fixnum_big_shift(x,y) : make_fixnum(0));
 }
-EXTER inline object
+INLINE object
 fixnum_shft(fixnum x,fixnum y) {
   return y<0 ? make_fixnum(fixnum_rshft(x,-y)) : fixnum_lshft(x,y);
 }
-EXTER inline object
+INLINE object
 immnum_shft(object x,object y) {return iif2(x,y) ? fixnum_shft(fif(x),fif(y)) : integer_shift(x,y);}
 
-EXTER inline bool
+INLINE bool
 fixnum_bitp(fixnum p,fixnum x) {return fixnum_rshft(x,p)&0x1;}
 
-EXTER inline bool
+INLINE bool
 immnum_bitp(object x,object y) {return iif2(x,y) ? fixnum_bitp(fif(x),fif(y)) : integer_bitp(x,y);}
 
 
 #define immnum_comp(x,y,c) iif2(x,y) ? (x c y) : (number_compare(x,y) c 0)
 
-EXTER inline bool
+INLINE bool
 immnum_lt(object x,object y) {return immnum_comp(x,y,<);}
-EXTER inline bool
+INLINE bool
 immnum_le(object x,object y) {return immnum_comp(x,y,<=);}
-EXTER inline bool
+INLINE bool
 immnum_eq(object x,object y) {return immnum_comp(x,y,==);}
-EXTER inline bool
+INLINE bool
 immnum_ne(object x,object y) {return immnum_comp(x,y,!=);}
-EXTER inline bool
+INLINE bool
 immnum_gt(object x,object y) {return immnum_comp(x,y,>);}
-EXTER inline bool
+INLINE bool
 immnum_ge(object x,object y) {return immnum_comp(x,y,>=);}
 
-EXTER inline bool
+INLINE bool
 immnum_minusp(object x) {return iif(x) ? ((ufixnum)x)<((ufixnum)make_fixnum(0)) : number_minusp(x);}
-EXTER inline bool
+INLINE bool
 immnum_plusp(object x) {return iif(x) ? ((ufixnum)x)>((ufixnum)make_fixnum(0)) : number_plusp(x);}
-EXTER inline bool
+INLINE bool
 immnum_zerop(object x) {return iif(x) ? ((ufixnum)x)==((ufixnum)make_fixnum(0)) : number_zerop(x);}
-EXTER inline bool
+INLINE bool
 immnum_evenp(object x) {return iif(x) ? !(((ufixnum)x)&0x1) : number_evenp(x);}
-EXTER inline bool
+INLINE bool
 immnum_oddp(object x) {return iif(x) ? (((ufixnum)x)&0x1) : number_oddp(x);}
 
-EXTER inline object
+INLINE object
 immnum_signum(object x) {
   ufixnum ux=(ufixnum)x,uz=((ufixnum)make_fixnum(0));
   return iif(x) ? (ux<uz ? mif(-1) : (ux==uz ? mif(0) : mif(1))) : number_signum(x);
 }
-EXTER inline object
+INLINE object
 immnum_abs(object x) {return iif(x) ? make_fixnum(labs(fif(x))) : number_abs(x);}
 
-EXTER inline fixnum
+INLINE fixnum
 fixnum_ldb(fixnum s,fixnum p,fixnum i) {
   return ((1UL<<s)-1)&fixnum_rshft(i,p);
 }
 
-EXTER inline object
+INLINE object
 immnum_ldb(object x,object i) {
   if (iif(i))
     if (consp(x)) {
@@ -256,7 +256,7 @@ immnum_ldb(object x,object i) {
   return number_ldb(x,i);
 }
 
-EXTER inline bool
+INLINE bool
 immnum_ldbt(object x,object i) {
   if (iif(i))
     if (consp(x)) {
@@ -270,13 +270,13 @@ immnum_ldbt(object x,object i) {
   return number_ldbt(x,i)!=Cnil;
 }
 
-EXTER inline fixnum
+INLINE fixnum
 fixnum_dpb(fixnum s,fixnum p,fixnum n,fixnum i) {
   fixnum z=(1UL<<s)-1;
   return (i&~(z<<p))|((n&z)<<p);
 }
 
-EXTER inline object
+INLINE object
 immnum_dpb(object n,object x,object i) {
   if (iif2(n,i))
     if (consp(x)) {
@@ -290,13 +290,13 @@ immnum_dpb(object n,object x,object i) {
   return number_dpb(n,x,i);
 }
 
-EXTER inline fixnum
+INLINE fixnum
 fixnum_dpf(fixnum s,fixnum p,fixnum n,fixnum i) {
   fixnum z=((1UL<<s)-1)<<p;
   return (i&~z)|(n&z);
 }
 
-EXTER inline object
+INLINE object
 immnum_dpf(object n,object x,object i) {
   if (iif2(n,i))
     if (consp(x)) {
@@ -310,15 +310,15 @@ immnum_dpf(object n,object x,object i) {
   return number_dpf(n,x,i);
 }
 
-EXTER inline object
+INLINE object
 immnum_max(object x,object y) {return iif2(x,y) ? ((ufixnum)x>=(ufixnum)y ? x : y) : (number_compare(x,y)>=0?x:y);}
-EXTER inline object
+INLINE object
 immnum_min(object x,object y) {return iif2(x,y) ? ((ufixnum)x<=(ufixnum)y ? x : y) : (number_compare(x,y)<=0?x:y);}
 
-EXTER inline bool
+INLINE bool
 immnum_logt(object x,object y) {return iif2(x,y) ? fixnum_boole(BOOLAND,fif(x),fif(y))!=0 : !number_zerop(log_op2(BOOLAND,x,y));}
 
-EXTER inline fixnum
+INLINE fixnum
 fixnum_gcd(fixnum x,fixnum y) {
 
   fixnum t;
@@ -343,16 +343,16 @@ fixnum_gcd(fixnum x,fixnum y) {
 
 }
 
-EXTER inline object
+INLINE object
 immnum_gcd(object x,object y) {return iif2(x,y) ? mif(fixnum_gcd(labs(fif(x)),labs(fif(y)))) : get_gcd(x,y);}
 
-EXTER inline object
+INLINE object
 fixnum_lcm(fixnum x,fixnum y) {
   fixnum g=fixnum_gcd(x,y);
   return g ? safe_mul_abs(x,fixnum_div(y,g,0)) : make_fixnum(0);
 }
 
-EXTER inline object
+INLINE object
 immnum_lcm(object x,object y) {return iif2(x,y) ? fixnum_lcm(labs(fif(x)),labs(fif(y))) : get_lcm(x,y);}
 
 #endif
--- gcl-2.6.12.orig/h/include.h
+++ gcl-2.6.12/h/include.h
@@ -87,12 +87,6 @@ Foundation, 675 Mass Ave, Cambridge, MA
 #define	isalphanum(x)	isalnum(x)
 #endif
 
-#ifdef IN_MAIN
-#define EXTER
-#else
-#define EXTER extern 
-#endif
-
 #if defined(GMP) || defined(NEED_MP_H)
 #include "../h/mp.h"
 #endif
--- gcl-2.6.12.orig/h/notcomp.h
+++ gcl-2.6.12/h/notcomp.h
@@ -28,10 +28,7 @@ EXTER long real_maxpage;
 char *getenv();
 EXTER char *this_lisp;
 
-#ifndef IN_MAIN
-EXTER
-char stdin_buf[], stdout_buf[];
-#endif
+EXTER char stdin_buf[],stdout_buf[];
 
 EXTER object user_package;
 
--- gcl-2.6.12.orig/h/page.h
+++ gcl-2.6.12/h/page.h
@@ -106,7 +106,7 @@ extern fixnum writable_pages;
 EXTER long first_data_page,real_maxpage,phys_pages,available_pages;
 EXTER void *data_start,*initial_sbrk;
 
-#if !defined(IN_MAIN) && defined(SGC)
+#if defined(SGC)
 #include "writable.h"
 #endif
 
--- gcl-2.6.12.orig/h/protoize.h
+++ gcl-2.6.12/h/protoize.h
@@ -1,13 +1,12 @@
 /* alloc.c:89:OF */ extern void *alloc_page (long n); /* (n) int n; */
-/* alloc.c:149:OF */ inline void add_page_to_freelist (char *p, struct typemanager *tm); /* (p, tm) char *p; struct typemanager *tm; */
 /* alloc.c:196:OF */ extern object type_name (int t); /* (t) int t; */
-/* alloc.c:213:OF */ inline object alloc_object (enum type t); /* (t) enum type t; */
-/* alloc.c:213:OF */ inline void add_pages(struct typemanager *,fixnum);
-/* alloc.c:296:OF */ extern inline object make_cons (object a, object d); /* (a, d) object a; object d; */
+/* alloc.c:213:OF */ object alloc_object (enum type t); /* (t) enum type t; */
+/* alloc.c:213:OF */ void add_pages(struct typemanager *,fixnum);
+/* alloc.c:296:OF */ extern object make_cons (object a, object d); /* (a, d) object a; object d; */
 /* alloc.c:364:OF */ extern object on_stack_cons (object x, object y); /* (x, y) object x; object y; */
 /* alloc.c:376:OF */ extern object fSallocated (object typ); /* (typ) object typ; */
 /* alloc.c:401:OF */ extern object fSreset_number_used (object typ); /* (typ) object typ; */
-/* alloc.c:480:OF */ extern inline void insert_contblock (void *p, ufixnum s); /* (p, s) char *p; int s; */
+/* alloc.c:480:OF */ extern void insert_contblock (void *p, ufixnum s); /* (p, s) char *p; int s; */
 /* alloc.c:480:OF */ extern void insert_maybe_sgc_contblock (char *p, int s); /* (p, s) char *p; int s; */
 /* alloc.c:611:OF */ extern void set_maxpage (void); /* () */
 /* alloc.c:635:OF */ extern void gcl_init_alloc (void *); /* () */
@@ -1841,43 +1840,40 @@ struct htent *gethash(object,object);
 int
 update_real_maxpage(void);
 
-inline fixnum
+fixnum
 set_tm_maxpage(struct typemanager *,fixnum);
 
 void
 init_gmp_rnd_state(__gmp_randstate_struct *);
 
-inline void
-set_sgc_bit(struct pageinfo *,void *);
-
 void
 reinit_gmp(void);
 
 object
 mod(object,object);
 
-inline void
+void
 intdivrem(object,object,fixnum,object *,object *);
 
-inline object
+object
 integer_count(object);
 
-inline object
+object
 integer_length(object);
 
-inline bool
+bool
 integer_bitp(object,object);
 
-inline object 
+object 
 fixnum_times(fixnum,fixnum);
 
-inline object
+object
 log_op2(fixnum,object,object);
 
-inline object
+object
 fixnum_big_shift(fixnum,fixnum);
 
-inline object
+object
 integer_shift(object,object);
 
 object
@@ -1921,22 +1917,19 @@ sigint(void);
 void
 allocate_code_block_reserve(void);
 
-inline void
-resize_hole(ufixnum,enum type);
-
-inline void *
+void *
 alloc_contblock_no_gc(size_t);
 
-inline void
+void
 reset_contblock_freelist(void);
 
-inline void
+void
 empty_relblock(void);
 
 fixnum
 check_avail_pages(void);
 
-inline int
+int
 mbrk(void *);
 
 void
@@ -1948,5 +1941,8 @@ alloc_code_space(size_t);
 object 
 fSmake_vector1_2(fixnum,fixnum,object,object);
 
-inline struct pageinfo *
+struct pageinfo *
 get_pageinfo(void *);
+
+void
+add_page_to_freelist(char *, struct typemanager *);
--- gcl-2.6.12.orig/h/writable.h
+++ gcl-2.6.12/h/writable.h
@@ -1,7 +1,7 @@
 EXTER fixnum last_page;
 EXTER int last_result;
 
-EXTER inline int
+INLINE int
 set_writable(fixnum i,bool m) {
 
   fixnum j;
@@ -32,7 +32,7 @@ set_writable(fixnum i,bool m) {
 
 }
 
-EXTER inline int
+INLINE int
 is_writable(fixnum i) {
 
   fixnum j;
@@ -51,7 +51,7 @@ is_writable(fixnum i) {
   
 }
 
-EXTER inline int
+INLINE int
 is_writable_cached(fixnum i) {
 
   if (last_page==i)
--- gcl-2.6.12.orig/makefile
+++ gcl-2.6.12/makefile
@@ -265,7 +265,7 @@ $(HDIR)new_decl.h:
 
 $(HDIR)mcompdefs.h: $(HDIR)compdefs.h $(HDIR)new_decl.h
 	$(AWK) 'BEGIN {print "#include \"include.h\"";print "#include \"cmponly.h\"";print "---"} {a=$$1;gsub("\\.\\.\\.","",a);print "\"#define " $$1 "\" " a}' $< |\
-	$(CC) -E -I./$(HDIR) - |\
+	$(CC) -E -P -I./$(HDIR) - |\
 	$(AWK) '/^\-\-\-$$/ {i=1;next} {if (!i) next} {gsub("\"","");print}' >$@
 
 $(HDIR)cmpinclude.h: $(HDIR)mcompdefs.h $(CMPINCLUDE_FILES) $(HDIR)config.h
--- gcl-2.6.12.orig/o/alloc.c
+++ gcl-2.6.12/o/alloc.c
@@ -134,7 +134,7 @@ acomp(const void *v1,const void *v2) {
 
 }
 
-inline struct pageinfo *
+struct pageinfo *
 get_pageinfo(void *x) {
 
   struct pageinfo **pp=bsearchleq(&x,contblock_array->v.v_self,contblock_array->v.v_fillp,sizeof(*contblock_array->v.v_self),acomp);
@@ -144,7 +144,7 @@ get_pageinfo(void *x) {
 
 }
 
-inline void
+static inline void
 add_page_to_contblock_list(void *p,fixnum m) {
  
   struct pageinfo *pp=pageinfo(p);
@@ -176,7 +176,70 @@ icomp(const void *v1,const void *v2) {
   return *f1<*f2 ? -1 : *f1==*f2 ? 0 : +1;
 }
 
-inline void
+
+void
+add_page_to_freelist(char *p, struct typemanager *tm) {
+
+  short t,size;
+  long i=tm->tm_nppage,fw;
+  object x,f;
+  struct pageinfo *pp;
+
+ t=tm->tm_type;
+
+ size=tm->tm_size;
+ f=tm->tm_free;
+ pp=pageinfo(p);
+ bzero(pp,sizeof(*pp));
+ pp->type=t;
+ pp->magic=PAGE_MAGIC;
+
+ if (cell_list_head==NULL) 
+   cell_list_tail=cell_list_head=pp;
+ else if (pp > cell_list_tail) {
+   cell_list_tail->next=pp;
+   cell_list_tail=pp;
+ }
+
+ x= (object)pagetochar(page(p));
+ /* set_type_of(x,t); */
+ make_free(x);
+
+#ifdef SGC
+
+ if (sgc_enabled && tm->tm_sgc)
+   pp->sgc_flags=SGC_PAGE_FLAG;
+
+#ifndef SGC_WHOLE_PAGE
+ if (TYPEWORD_TYPE_P(pp->type))
+   x->d.s=(sgc_enabled && tm->tm_sgc) ? SGC_RECENT : SGC_NORMAL;
+#endif
+
+ /* array headers must be always writable, since a write to the
+    body does not touch the header.   It may be desirable if there
+    are many arrays in a system to make the headers not writable,
+    but just SGC_TOUCH the header each time you write to it.   this
+    is what is done with t_structure */
+  if (t==(tm_of(t_array)->tm_type))
+    pp->sgc_flags|=SGC_PERM_WRITABLE;
+   
+#endif 
+
+ fw= *(fixnum *)x;
+ while (--i >= 0) {
+   *(fixnum *)x=fw;
+   SET_LINK(x,f);
+   f=x;
+   x= (object) ((char *)x + size);
+ }
+
+ tm->tm_free=f;
+ tm->tm_nfree += tm->tm_nppage;
+ tm->tm_npage++;
+
+}
+
+static inline void
 maybe_reallocate_page(struct typemanager *ntm,ufixnum count) {
 
   void **y,**n;
@@ -248,7 +311,7 @@ int reserve_pages_for_signal_handler=30;
    reserve_pages_for_signal_handler pages on hand in the hole
  */
 
-inline void
+void
 empty_relblock(void) {
 
   object o=sSAleaf_collection_thresholdA->s.s_dbind;
@@ -262,7 +325,7 @@ empty_relblock(void) {
 
 }
 
-inline void
+static inline void
 resize_hole(ufixnum hp,enum type tp) {
   
   char *new_start=heap_end+hp*PAGESIZE;
@@ -283,7 +346,7 @@ resize_hole(ufixnum hp,enum type tp) {
   
 }
 
-inline void *
+void *
 alloc_page(long n) {
 
   bool s=n<0;
@@ -332,7 +395,7 @@ alloc_page(long n) {
 
 struct pageinfo *cell_list_head=NULL,*cell_list_tail=NULL;;
 
-inline ufixnum
+static inline ufixnum
 sum_maxpages(void) {
 
   ufixnum i,j;
@@ -352,7 +415,7 @@ check_avail_pages(void) {
 }
 
 
-inline fixnum
+fixnum
 set_tm_maxpage(struct typemanager *tm,fixnum n) {
   
   fixnum r=tm->tm_type==t_relocatable,j=tm->tm_maxpage,z=(n-j)*(r ? 2 : 1);
@@ -365,69 +428,6 @@ set_tm_maxpage(struct typemanager *tm,fi
   return 1;
 }
   
-
-inline void
-add_page_to_freelist(char *p, struct typemanager *tm) {
-
-  short t,size;
-  long i=tm->tm_nppage,fw;
-  object x,f;
-  struct pageinfo *pp;
-
- t=tm->tm_type;
-
- size=tm->tm_size;
- f=tm->tm_free;
- pp=pageinfo(p);
- bzero(pp,sizeof(*pp));
- pp->type=t;
- pp->magic=PAGE_MAGIC;
-
- if (cell_list_head==NULL) 
-   cell_list_tail=cell_list_head=pp;
- else if (pp > cell_list_tail) {
-   cell_list_tail->next=pp;
-   cell_list_tail=pp;
- }
-
- x= (object)pagetochar(page(p));
- /* set_type_of(x,t); */
- make_free(x);
-
-#ifdef SGC
-
- if (sgc_enabled && tm->tm_sgc)
-   pp->sgc_flags=SGC_PAGE_FLAG;
-
-#ifndef SGC_WHOLE_PAGE
- if (TYPEWORD_TYPE_P(pp->type))
-   x->d.s=(sgc_enabled && tm->tm_sgc) ? SGC_RECENT : SGC_NORMAL;
-#endif
-
- /* array headers must be always writable, since a write to the
-    body does not touch the header.   It may be desirable if there
-    are many arrays in a system to make the headers not writable,
-    but just SGC_TOUCH the header each time you write to it.   this
-    is what is done with t_structure */
-  if (t==(tm_of(t_array)->tm_type))
-    pp->sgc_flags|=SGC_PERM_WRITABLE;
-   
-#endif 
-
- fw= *(fixnum *)x;
- while (--i >= 0) {
-   *(fixnum *)x=fw;
-   SET_LINK(x,f);
-   f=x;
-   x= (object) ((char *)x + size);
- }
-
- tm->tm_free=f;
- tm->tm_nfree += tm->tm_nppage;
- tm->tm_npage++;
-
-}
-
 object
 type_name(int t) {
   return make_simple_string(tm_table[(int)t].tm_name+1);
@@ -435,7 +435,7 @@ type_name(int t) {
 
 
 static void
-call_after_gbc_hook(t) {
+call_after_gbc_hook(int t) {
   if (sSAafter_gbc_hookA && sSAafter_gbc_hookA->s.s_dbind!= Cnil) {
     set_up_string_register(tm_table[(int)t].tm_name+1);
     ifuncall1(sSAafter_gbc_hookA->s.s_dbind,intern(string_register,system_package));
@@ -536,7 +536,7 @@ rebalance_maxpages(struct typemanager *m
 
 }
 
-inline long
+long
 opt_maxpage(struct typemanager *my_tm) {
 
   double x=0.0,y=0.0,z,r;
@@ -707,7 +707,7 @@ find_contblock(ufixnum n,void **p) {
   return find_cbpp(*p,n);
 }
 
-inline void
+void
 print_cb(int print) {
 
   struct contblock *cbp,***cbppp,**cbpp=&cb_pointer;
@@ -729,7 +729,7 @@ print_cb(int print) {
 
 }
   
-inline void
+void
 insert_contblock(void *p,ufixnum s) {
 
   struct contblock *cbp=p,**cbpp,***cbppp;
@@ -761,7 +761,7 @@ delete_contblock(void *p,struct contbloc
 
 }
 
-inline void
+void
 reset_contblock_freelist(void) {
 
   cb_pointer=NULL;
@@ -769,7 +769,7 @@ reset_contblock_freelist(void) {
   
 }
 
-inline void *
+static inline void *
 alloc_from_freelist(struct typemanager *tm,fixnum n) {
 
   void *p;
@@ -851,7 +851,7 @@ too_full_p(struct typemanager *tm) {
 
 }
 
-inline void *
+static inline void *
 alloc_after_gc(struct typemanager *tm,fixnum n) {
 
   if (tm->tm_npage+tpage(tm,n)>tm->tm_maxpage && GBC_enable) {
@@ -883,7 +883,7 @@ alloc_after_gc(struct typemanager *tm,fi
 
 }
 
-inline void
+void
 add_pages(struct typemanager *tm,fixnum m) {
 
   switch (tm->tm_type) {
@@ -923,7 +923,7 @@ add_pages(struct typemanager *tm,fixnum
 
 }
 
-inline void *
+static inline void *
 alloc_after_adding_pages(struct typemanager *tm,fixnum n) {
   
   fixnum m=tpage(tm,n);
@@ -945,7 +945,7 @@ alloc_after_adding_pages(struct typemana
 
 }
 
-inline void *
+static inline void *
 alloc_after_reclaiming_pages(struct typemanager *tm,fixnum n) {
 
   fixnum m=tpage(tm,n),reloc_min;
@@ -972,10 +972,10 @@ alloc_after_reclaiming_pages(struct type
 
 }
 
-inline void *alloc_mem(struct typemanager *,fixnum);
+static inline void *alloc_mem(struct typemanager *,fixnum);
 
 #ifdef SGC
-inline void *
+static inline void *
 alloc_after_turning_off_sgc(struct typemanager *tm,fixnum n) {
 
   if (!sgc_enabled) return NULL;
@@ -985,7 +985,7 @@ alloc_after_turning_off_sgc(struct typem
 }
 #endif
 
-inline void *
+static inline void *
 alloc_mem(struct typemanager *tm,fixnum n) {
 
   void *p;
@@ -1007,7 +1007,7 @@ alloc_mem(struct typemanager *tm,fixnum
   return exhausted_report(tm->tm_type,tm);
 }
 
-inline object
+object
 alloc_object(enum type t)  {
 
   object obj;
@@ -1022,12 +1022,12 @@ alloc_object(enum type t)  {
   
 }
 
-inline void *
+void *
 alloc_contblock(size_t n) {
   return alloc_mem(tm_of(t_contiguous),CEI(n,CPTR_SIZE));
 }
 
-inline void *
+void *
 alloc_contblock_no_gc(size_t n) {
 
   struct typemanager *tm=tm_of(t_contiguous);
@@ -1073,7 +1073,7 @@ alloc_code_space(size_t sz) {
 
 }
 
-inline void *
+void *
 alloc_relblock(size_t n) {
 
   return alloc_mem(tm_of(t_relocatable),CEI(n,PTR_ALIGN));
@@ -1089,7 +1089,7 @@ load_cons(object p,object a,object d) {
   p->c.c_car=a;
 }
 
-inline object
+object
 make_cons(object a,object d) {
 
   static struct typemanager *tm=tm_table+t_cons;/*FIXME*/
@@ -1105,7 +1105,7 @@ make_cons(object a,object d) {
 
 
 
-inline object on_stack_cons(object x, object y) {
+object on_stack_cons(object x, object y) {
   object p = (object) alloca_val;
   load_cons(p,x,y);
   return p;
--- gcl-2.6.12.orig/o/gbc.c
+++ gcl-2.6.12/o/gbc.c
@@ -158,7 +158,7 @@ in_contblock_stack_list(void *p,void ***
   return a && a[0]==p;
 }
 
-inline char
+static inline char
 get_bit(char *v,struct pageinfo *pi,void *x) {
   void *ve=CB_DATA_START(pi);
   fixnum off=(x-ve)>>LOG_BYTES_CONTBLOCK,i=off>>LOG_BITS_CHAR,s=off&~(~0UL<<LOG_BITS_CHAR);
@@ -168,7 +168,7 @@ get_bit(char *v,struct pageinfo *pi,void
   return (v[i]>>s)&0x1;
 }
 
-inline void
+static inline void
 set_bit(char *v,struct pageinfo *pi,void *x) {
   void *ve=CB_DATA_START(pi);
   fixnum off=(x-ve)>>LOG_BYTES_CONTBLOCK,i=off>>LOG_BITS_CHAR,s=off&~(~0UL<<LOG_BITS_CHAR);
@@ -183,7 +183,7 @@ set_bit(char *v,struct pageinfo *pi,void
 #define ptr_get(v,i,s) (v+(((i<<LOG_BITS_CHAR)|s)<<LOG_BYTES_CONTBLOCK))
 #define ptr_set(x,v,i,s) ({fixnum _o=(x-v)>>LOG_BYTES_CONTBLOCK;i=_o>>LOG_BITS_CHAR;s=_o&~(~0UL<<LOG_BITS_CHAR);})
 
-inline void
+static inline void
 set_bits(char *v,struct pageinfo *pi,void *x1,void *x2) {
 
   void *ds=CB_DATA_START(pi);
@@ -206,7 +206,7 @@ set_bits(char *v,struct pageinfo *pi,voi
 
 }
 
-inline void *
+static inline void *
 get_bits(char *v,struct pageinfo *pi,void *x) {
 
   void *ds=CB_DATA_START(pi),*de=CB_DATA_END(pi);
@@ -232,42 +232,42 @@ get_bits(char *v,struct pageinfo *pi,voi
   return ds<de ? ds : de;
 }
 
-inline char
+static inline char
 get_mark_bit(struct pageinfo *pi,void *x) {
   return get_bit(CB_MARK_START(pi),pi,x);
 }
 
-inline void
+static inline void
 set_mark_bit(struct pageinfo *pi,void *x) {
   set_bit(CB_MARK_START(pi),pi,x);
 }
 
-inline void *
+static inline void *
 get_mark_bits(struct pageinfo *pi,void *x) {
   return get_bits(CB_MARK_START(pi),pi,x);
 }
 
-inline void
+static inline void
 set_mark_bits(struct pageinfo *pi,void *x1,void *x2) {
   set_bits(CB_MARK_START(pi),pi,x1,x2);
 }
 
-inline char
+static inline char
 get_sgc_bit(struct pageinfo *pi,void *x) {
   return get_bit(CB_SGCF_START(pi),pi,x);
 }
 
-inline void
+static inline void
 set_sgc_bit(struct pageinfo *pi,void *x) {
   set_bit(CB_SGCF_START(pi),pi,x);
 }
 
-inline void *
+static inline void *
 get_sgc_bits(struct pageinfo *pi,void *x) {
   return get_bits(CB_SGCF_START(pi),pi,x);
 }
 
-inline void
+static inline void
 set_sgc_bits(struct pageinfo *pi,void *x1,void *x2) {
   set_bits(CB_SGCF_START(pi),pi,x1,x2);
 }
--- gcl-2.6.12.orig/o/gmp_big.c
+++ gcl-2.6.12/o/gmp_big.c
@@ -93,6 +93,7 @@ object big_fixnum1;
 void
 gcl_init_big1(void) {
     mp_set_memory_functions( gcl_gmp_alloc,gcl_gmp_realloc,gcl_gmp_free);
+    jmp_gmp=0;
 }
 
 #else
--- gcl-2.6.12.orig/o/gmp_num_log.c
+++ gcl-2.6.12/o/gmp_num_log.c
@@ -46,7 +46,7 @@ integer_log_op2(fixnum op,object x,enum
 
 }
 
-inline object
+object
 log_op2(fixnum op,object x,object y) {
 
   enum type tx=type_of(x),ty=type_of(y);
--- gcl-2.6.12.orig/o/main.c
+++ gcl-2.6.12/o/main.c
@@ -38,8 +38,6 @@ initlisp(void);
 static int
 multiply_stacks(int);
 
-#define IN_MAIN
-
 #ifdef KCLOVM
 #include <ovm/ovm.h>
 void change_contexts();
@@ -47,6 +45,11 @@ int ovm_process_created;
 void initialize_process();
 #endif
 
+
+#define EXTER
+#define INLINE
+
+
 #include "include.h"
 #include <signal.h>
 #include "page.h"
@@ -118,7 +121,7 @@ cstack_dir(fixnum j) {
 
 fixnum log_maxpage_bound=sizeof(fixnum)*8-1;
 
-inline int
+int
 mbrk(void *v) {
 
   ufixnum uv=(ufixnum)v,uc=(ufixnum)sbrk(0),ux,um;
@@ -1120,10 +1123,6 @@ init_main(void) {
   
 }
 
-#ifdef SGC
-#include "writable.h"
-#endif
-
 #ifdef HAVE_PRINT_INSN_I386
 
 #include "dis-asm.h"
--- gcl-2.6.12.orig/o/makefile
+++ gcl-2.6.12/o/makefile
@@ -20,7 +20,7 @@ OBJS:=$(addsuffix .o,typespec main alloc
 	num_pred num_comp num_arith num_sfun num_co num_log num_rand earith character sequence list hash\
 	array string regexpr structure toplevel file read backq print format pathname unixfsys unixfasl\
 	error unixtime unixsys unixsave funlink fat_string run_process nfunlink usig usig2 utils makefun\
-	sockets gmp_wrappers clxsocket init_pari nsocket sfasl prelink)
+	sockets clxsocket init_pari nsocket sfasl prelink)
 OBJS:=$(OBJS) $(RL_OBJS) $(EXTRAS)
 
 INI_FILES=$(patsubst %.o,%.ini,${OBJS})
--- gcl-2.6.12.orig/o/num_arith.c
+++ gcl-2.6.12/o/num_arith.c
@@ -62,7 +62,7 @@ object fixnum_sub(fixnum i, fixnum j)
    }
 }
 
-inline object 
+object 
 fixnum_times(fixnum i, fixnum j) {
 
 #ifdef HAVE_CLZL
--- gcl-2.6.12.orig/o/num_co.c
+++ gcl-2.6.12/o/num_co.c
@@ -277,7 +277,7 @@ LFD(Ldenominator)(void)
 		vs_base[0] = small_fixnum(1);
 }
 
-inline void
+void
 intdivrem(object x,object y,fixnum d,object *q,object *r) {
 
   enum type tx=type_of(x),ty=type_of(y);
--- gcl-2.6.12.orig/o/num_log.c
+++ gcl-2.6.12/o/num_log.c
@@ -37,12 +37,12 @@ Foundation, 675 Mass Ave, Cambridge, MA
 
 
 
-inline object
+object
 fixnum_big_shift(fixnum x,fixnum w) {
   MPOP(return,shifti,SI_TO_MP(x,big_fixnum1),w);
 }
 
-inline object
+object
 integer_fix_shift(object x, fixnum w) { 
   if (type_of(x)==t_fixnum) {
     fixnum fx=fix(x);
@@ -51,7 +51,7 @@ integer_fix_shift(object x, fixnum w) {
   MPOP(return,shifti,MP(x),w);
 }
 	
-inline object
+object
 integer_shift(object x,object y) {
   enum type tx=type_of(x),ty=type_of(y);
   if (ty==t_fixnum)
@@ -66,12 +66,12 @@ integer_shift(object x,object y) {
   }
 }
       
-inline object
+object
 integer_length(object x) {
   return make_fixnum(type_of(x)==t_fixnum ? fixnum_length(fix(x)) : MP_SIZE_IN_BASE2(MP(x)));
 }
 
-inline object
+object
 integer_count(object x) {
   return make_fixnum(type_of(x)==t_fixnum ? fixnum_count(fix(x)) : MP_BITCOUNT(MP(x)));
 }
@@ -120,7 +120,7 @@ LFD(Lboole)(void)
 
 }
 
-inline bool
+bool
 integer_bitp(object p,object x) {
   enum type tp=type_of(p),tx=type_of(x);
 
--- gcl-2.6.12.orig/o/num_sfun.c
+++ gcl-2.6.12/o/num_sfun.c
@@ -94,7 +94,7 @@ number_exp(object x)
 	}
 }
 
-inline object
+static inline object
 number_fix_iexpt(object x,fixnum y,fixnum ly,fixnum j) {
   object z;
   
@@ -103,7 +103,7 @@ number_fix_iexpt(object x,fixnum y,fixnu
   return fixnum_bitp(j,y) ? number_times(x,z) : z;
 }
 
-inline object
+static inline object
 number_big_iexpt(object x,object y,fixnum ly,fixnum j) {
   object z;
   
@@ -113,7 +113,7 @@ number_big_iexpt(object x,object y,fixnu
 
 }
 
-inline object
+static inline object
 number_zero_expt(object x,bool promote_short_p) {
 
   switch (type_of(x)) {
@@ -135,7 +135,7 @@ number_zero_expt(object x,bool promote_s
 }
 
 
-inline object
+static inline object
 number_ui_expt(object x,fixnum fy) {
 
   switch (type_of(x)) {
@@ -173,17 +173,17 @@ number_ui_expt(object x,fixnum fy) {
     
 }
 
-inline object
+static inline object
 number_ump_expt(object x,object y) {
   return number_big_iexpt(x,y,fix(integer_length(y)),0);
 }
 
-inline object
+static inline object
 number_log_expt(object x,object y) {
   return number_zerop(y) ? number_zero_expt(y,type_of(x)==t_longfloat) : number_exp(number_times(number_nlog(x),y));
 }
 
-inline object
+static inline object
 number_invert(object x,object y,object z) {
 
   switch (type_of(z)) {
@@ -198,7 +198,7 @@ number_invert(object x,object y,object z
 }
     
 
-inline object 
+static inline object 
 number_si_expt(object x,object y) {
   switch (type_of(y)) {
   case t_fixnum:
--- gcl-2.6.12.orig/o/package.d
+++ gcl-2.6.12/o/package.d
@@ -114,7 +114,7 @@ static int package_sizes[]={
   32749, 65521, 131071, 262139,   524287, 1048573};
 
 static int
-suitable_package_size(n)
+suitable_package_size(int n)
 {int *i=package_sizes;
  if (n>= 1000000) return 1048573;
  while(*i < n) { i++;}