Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jan 2015 08:40:35 +0000 (UTC)
From:      Mikhail Teterin <mi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r377989 - in head/lang/scm: . files
Message-ID:  <201501270840.t0R8eZ8E007896@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mi
Date: Tue Jan 27 08:40:34 2015
New Revision: 377989
URL: https://svnweb.freebsd.org/changeset/ports/377989
QAT: https://qat.redports.org/buildarchive/r377989/

Log:
  Upgrade from 5f1 to 5f2.
  
  The bad news:
  
  	1. gcc is still required -- clang can build the binaries, but
  	   some self-tests will fail, unless all optimization was
             disabled. This is, probably, due to some suspect code in
             bytenumb.c -- would be good to investigate.
  	2. Building this port in parallel is still not possible -- the
  	   Makefile is too convoluted and same sources are recompiled
  	   multiple times with different #defines set.
  
  The good news:
  
  	1. Resolve a large number of warnings.
  	2. Fix build on ia64 and sparc64 (tested on pluto and flame
             respectively). Other platforms (alpha, powerpc?) have a
  	   better chance of working now...

Added:
  head/lang/scm/files/ia64-patch   (contents, props changed)
  head/lang/scm/files/patch-warnings   (contents, props changed)
Modified:
  head/lang/scm/Makefile
  head/lang/scm/distinfo
  head/lang/scm/files/patch-build.scm
  head/lang/scm/files/patch-scmfig.h

Modified: head/lang/scm/Makefile
==============================================================================
--- head/lang/scm/Makefile	Tue Jan 27 06:56:44 2015	(r377988)
+++ head/lang/scm/Makefile	Tue Jan 27 08:40:34 2015	(r377989)
@@ -2,27 +2,29 @@
 # $FreeBSD$
 
 PORTNAME=	scm
-PORTVERSION=	5f1
-PORTREVISION=	1
+PORTVERSION=	5f2
 CATEGORIES=	lang scheme
 MASTER_SITES=	http://groups.csail.mit.edu/mac/ftpdir/scm/%SUBDIR%/
 MASTER_SITE_SUBDIR=	. OLD
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX} slib-3b4.zip slib-psd1-3.tar.gz
-EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX} slib-3b4.zip
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX} slib-3b5.zip slib-psd1-3.tar.gz
+EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	mi@aldan.algebra.com
 COMMENT=	Scheme interpreter
 
 LICENSE=	LGPL21
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-USES=		gmake readline zip
+USES=		readline zip
 USE_GCC=	any
 HAS_CONFIGURE=	yes
 CONFIGURE_ENV=	--prefix=${PREFIX}
 MAKE_JOBS_UNSAFE=	yes
 
+CFLAGS+=	-Wall -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wcast-qual
+CFLAGS+=	-Wno-unused-label -Wno-uninitialized
+
 SUB_FILES=	require.scm
 
 PLIST_SUB=	VERSION="${PORTVERSION}"
@@ -49,18 +51,26 @@ SCM_MODULES_X11=x.so
 
 .include <bsd.port.options.mk>
 
-.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
-BROKEN=		Does not compile on ia64, powerpc, or sparc64
+.if ${PORT_OPTIONS:MX11}
+SCM_MODULES+=	${SCM_MODULES_X11}
+SCM_DATA+=	${SCM_DATA_X11}
+.endif
+
+.if ${ARCH} == "ia64"
+EXTRA_PATCHES+=	${FILESDIR}/ia64-patch
+ARCHOBJS=	continue-ia64.S
 .endif
 
 post-extract:
-	@${TAR} -C ${WRKDIR} -zxf ${DISTDIR}/slib-psd1-3.tar.gz
+	# Certain .scm files are needed during build:
+	@${TAR} -C ${WRKDIR} -zxf ${DISTDIR}/${DISTFILES:Mslib*.zip} '*.scm'
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|/usr/include|${LOCALBASE}/include| ; \
 		 /strip/s|^|#|' ${WRKSRC}/Makefile
 	@${REINPLACE_CMD} -e 's|%%CC%%|${CC}|g ; \
 		 s|%%CFLAGS%%|${CFLAGS}|g ; \
+		 s|%%ARCHOBJS%%|${ARCHOBJS}|g ; \
 		 s|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/build.scm
 	@${REINPLACE_CMD} -e 's|__osf__|__FreeBSD__|' ${WRKSRC}/gmalloc.c
 	@${REINPLACE_CMD} -e 's|gnuregex\.h|gnu/regex.h|g' ${WRKSRC}/rgx.c
@@ -68,38 +78,16 @@ post-patch:
 		${WRKSRC}/xgen.scm
 
 do-install:
-	(cd ${WRKSRC} && ${INSTALL_PROGRAM} scm scmlit \
-		${STAGEDIR}${PREFIX}/bin)
-	(cd ${WRKSRC} && ${INSTALL_MAN} scm.1 \
-		${STAGEDIR}${MANPREFIX}/man/man1)
+	${INSTALL_PROGRAM} ${WRKSRC}/scm ${WRKSRC}/scmlit \
+		${STAGEDIR}${PREFIX}/bin
+	${INSTALL_MAN} ${WRKSRC}/scm.1 ${STAGEDIR}${MANPREFIX}/man/man1
 	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/scm
-	(cd ${WRKDIR} && ${INSTALL_DATA} require.scm \
-		${STAGEDIR}${PREFIX}/lib/scm)
-.for i in ${SCM_DATA}
-	(cd ${WRKSRC} && ${INSTALL_DATA} ${i} \
-		${STAGEDIR}${PREFIX}/lib/scm)
-.endfor
-.for i in ${SCM_MODULES}
-	(cd ${WRKSRC} && ${INSTALL_LIB} ${i} \
-		${STAGEDIR}${PREFIX}/lib/scm)
-.endfor
-.if ${PORT_OPTIONS:MX11}
-.for i in ${SCM_DATA_X11}
-	(cd ${WRKSRC} && ${INSTALL_DATA} ${i} \
-		${STAGEDIR}${PREFIX}/lib/scm)
-.endfor
-.for i in ${SCM_MODULES_X11}
-	(cd ${WRKSRC} && ${INSTALL_LIB} ${i} \
-		${STAGEDIR}${PREFIX}/lib/scm)
-.endfor
-.endif
-	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/scm/slib
-	(cd ${WRKDIR}/slib && ${INSTALL_DATA} *.scm \
-		${STAGEDIR}${PREFIX}/lib/scm/slib)
-	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/scm/slib/psd
-	(cd ${WRKDIR}/slib/psd && ${INSTALL_DATA} *.scm \
-		${STAGEDIR}${PREFIX}/lib/scm/slib/psd)
-	(cd ${WRKDIR}/scm && ${INSTALL_DATA} scm.info \
-		${STAGEDIR}${PREFIX}/${INFO_PATH})
+	${INSTALL_DATA} ${WRKDIR}/require.scm ${SCM_DATA:S|^|${WRKSRC}/|} \
+		${STAGEDIR}${PREFIX}/lib/scm
+	${INSTALL_LIB} ${SCM_MODULES:S|^|${WRKSRC}/|} \
+		${STAGEDIR}${PREFIX}/lib/scm
+	${TAR} -C ${STAGEDIR}${PREFIX}/lib/scm -xf ${DISTDIR}/${DISTFILES:Mslib*.tar.gz} '*.scm'
+	${INSTALL_DATA} ${WRKDIR}/slib/*.scm ${STAGEDIR}${PREFIX}/lib/scm/slib/
+	${INSTALL_DATA} ${WRKDIR}/scm/scm.info ${STAGEDIR}${PREFIX}/${INFO_PATH}
 
 .include <bsd.port.mk>

Modified: head/lang/scm/distinfo
==============================================================================
--- head/lang/scm/distinfo	Tue Jan 27 06:56:44 2015	(r377988)
+++ head/lang/scm/distinfo	Tue Jan 27 08:40:34 2015	(r377989)
@@ -1,6 +1,6 @@
-SHA256 (scm-5f1.zip) = f469e08e03fef5e2fa54349faaff630e63e88fc39f5fc98a6a55a6aa865a57c0
-SIZE (scm-5f1.zip) = 952965
-SHA256 (slib-3b4.zip) = ddfa66c61db1dec44147cad98e46cb9ec151f62dfaa10aa2508fbd26d46272a7
-SIZE (slib-3b4.zip) = 1099910
+SHA256 (scm-5f2.zip) = 29f182bb5e675d4dcffac897b5e08c59739513fd09e5f1928c2c5419ca921114
+SIZE (scm-5f2.zip) = 954890
+SHA256 (slib-3b5.zip) = f8b64a9820c2ccbdb263a0cb7bcf4caadce0857fdf4e2f52111ca33b4a131760
+SIZE (slib-3b5.zip) = 1105432
 SHA256 (slib-psd1-3.tar.gz) = 1665fc6cf572e6d8d99e81b4f6b1e65b04a095b69baebd85d0085ad552dc2955
 SIZE (slib-psd1-3.tar.gz) = 62397

Added: head/lang/scm/files/ia64-patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/scm/files/ia64-patch	Tue Jan 27 08:40:34 2015	(r377989)
@@ -0,0 +1,9 @@
+--- Makefile	2013-03-10 03:29:54.000000000 +0000
++++ Makefile	2015-01-23 21:59:51.747074000 +0000
+@@ -104,5 +104,5 @@
+ ofiles = scm.o time.o repl.o scl.o sys.o eval.o subr.o unif.o rope.o \
+ 	continue.o findexec.o script.o debug.o
+-# continue-ia64.o
++ofiles+= continue-ia64.o
+ ifiles = Init$(VERSION).scm Transcen.scm Link.scm Macro.scm Macexp.scm \
+ 	Tscript.scm compile.scm Iedline.scm Idiffer.scm

Modified: head/lang/scm/files/patch-build.scm
==============================================================================
--- head/lang/scm/files/patch-build.scm	Tue Jan 27 06:56:44 2015	(r377988)
+++ head/lang/scm/files/patch-build.scm	Tue Jan 27 08:40:34 2015	(r377989)
@@ -1,11 +1,18 @@
---- build.scm.orig	2009-08-04 03:35:57.000000000 +0900
-+++ build.scm	2009-08-07 01:59:30.000000000 +0900
+--- build.scm	2009-08-04 03:35:57.000000000 +0900
++++ build.scm	2015-01-23 16:23:32.000000000 -0500
+@@ -618,5 +618,5 @@
+ 
+      (nostart gcc "" "-e __start -nostartfiles" #f ("ecrt0.c") ())
+-     (dump gcc "" "" #f ("unexelf.c" "gmalloc.c") ())
++     (dump gcc "" "" #f ("unexelf.c") ())
+ 
+      (m hp-ux "" "-lm" #f () ())
 @@ -665,14 +665,15 @@
       (dump darwin "" "" #f ("unexmacosx.c" "lastfile.c") ())
       (dlll darwin "-DSUN_DL" "-ldl" "" () ())
  
 -     (c freebsd "" "-export-dynamic" #f () ())
-+     (c freebsd "" "-Wl,-export-dynamic" #f () ())
++     (c freebsd "" "-Wl,-export-dynamic %%ARCHOBJS%%" #f () ())
       (m freebsd "" "-lm" #f () ())
 -     (curses freebsd "" "-lncurses" "/usr/lib/libncurses.a" () ())
 +     (curses freebsd "" "-lcurses" "/usr/lib/libcurses.a" () ())
@@ -17,7 +24,7 @@
 +     (graphics freebsd "-I%%LOCALBASE%%/include -DX11" "-lX11" "-L%%LOCALBASE%%/lib" () ())
 +     (dlll freebsd "-DSUN_DL" "" "" () ())
 +     (nostart freebsd "" "" #f () ())
-+     (dump freebsd "" "" #f ("unexelf.c" "gmalloc.c") ())
++     (dump freebsd "" "" #f ("unexelf.c") ())
       (curses netbsd "-I/usr/pkg/include" "-lncurses" "-Wl,-rpath -Wl,/usr/pkg/lib -L/usr/pkg/lib" () ())
       (editline netbsd "-I/usr/pkg/include" "-lreadline" "-Wl,-rpath -Wl,/usr/pkg/lib -L/usr/pkg/lib" () ())
       (graphics netbsd "-I/usr/X11R6/include -DX11" "-lX11" "-Wl,-rpath -Wl,/usr/X11R6/lib -L/usr/X11R6/lib" () ())

Modified: head/lang/scm/files/patch-scmfig.h
==============================================================================
--- head/lang/scm/files/patch-scmfig.h	Tue Jan 27 06:56:44 2015	(r377988)
+++ head/lang/scm/files/patch-scmfig.h	Tue Jan 27 08:40:34 2015	(r377989)
@@ -1,4 +1,4 @@
---- scmfig.h.orig
+--- scmfig.h
 +++ scmfig.h
 @@ -256,11 +256,7 @@
  #ifdef __alpha
@@ -9,24 +9,30 @@
 -# define CDR_DOUBLES
 -#endif
 -#ifdef __x86_64
-+#if defined(__amd64__) || defined(__ia64__) || defined(__powerpc64__) || defined(__x86_64__)
++#if defined(__amd64__) || defined(__ia64__) || defined(__powerpc64__) || defined(__x86_64__) || defined(__sparc64__)
  # define SHORT_INT
  # define CDR_DOUBLES
  #endif
-@@ -393,14 +389,10 @@
+@@ -393,14 +389,6 @@
  # define WHITE_SPACES  ' ':case '\t':case '\r':case '\f'
  #endif
  
 -#ifdef __ia64__
-+# if defined(__amd64__) || defined(__ia64__) || defined(__powerpc64__) || defined(__x86_64__)
- # define PTR2INT(x) ((long)(x))
- #else
+-# define PTR2INT(x) ((long)(x))
++#define PTR2INT(x) ((intptr_t)(x))
+-#else
 -# ifdef __x86_64
 -#  define PTR2INT(x) ((long)(x))
 -# else
 -#  define PTR2INT(x) ((int)(x))
 -# endif
-+# define PTR2INT(x) ((int)(x))
- #endif
+-#endif
  
  #ifndef __builtin_expect
+@@ -824,5 +816,5 @@
+ # ifdef ARM_ULIB
+     extern volatile int errno;
+-# else
++# elif defined(PLAN9)
+     extern int errno;
+ # endif

Added: head/lang/scm/files/patch-warnings
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/scm/files/patch-warnings	Tue Jan 27 08:40:34 2015	(r377989)
@@ -0,0 +1,6855 @@
+--- byte.c	2008-01-30 22:31:40.000000000 -0500
++++ byte.c	2015-01-23 18:55:19.000000000 -0500
+@@ -21,6 +21,6 @@
+ #include "scm.h"
+ 
+-char s_make_bytes[] = "make-bytes";
+-SCM scm_make_bytes(k, n)
++static const char s_make_bytes[] = "make-bytes";
++static SCM scm_make_bytes(k, n)
+      SCM k, n;
+ {
+@@ -39,5 +39,5 @@
+ }
+ #define s_bytes (s_make_bytes+5)
+-SCM scm_bytes(ints)
++static SCM scm_bytes(ints)
+      SCM ints;
+ {
+@@ -55,6 +55,6 @@
+   return res;
+ }
+-static char s_bt_ref[] = "byte-ref";
+-SCM scm_byte_ref(str, k)
++static const char s_bt_ref[] = "byte-ref";
++static SCM scm_byte_ref(str, k)
+      SCM str, k;
+ {
+@@ -64,6 +64,6 @@
+   return MAKINUM(UCHARS(str)[INUM(k)]);
+ }
+-static char s_bt_set[] = "byte-set!";
+-SCM scm_byte_set(str, k, n)
++static const char s_bt_set[] = "byte-set!";
++static SCM scm_byte_set(str, k, n)
+      SCM str, k, n;
+ {
+@@ -75,6 +75,6 @@
+   return UNSPECIFIED;
+ }
+-static char s_bytes2list[] = "bytes->list";
+-SCM scm_bytes2list(str)
++static const char s_bytes2list[] = "bytes->list";
++static SCM scm_bytes2list(str)
+      SCM str;
+ {
+@@ -87,6 +87,6 @@
+   return res;
+ }
+-static char s_bt_reverse[] = "bytes-reverse!";
+-SCM scm_bytes_reverse(str)
++static const char s_bt_reverse[] = "bytes-reverse!";
++static SCM scm_bytes_reverse(str)
+      SCM str;
+ {
+@@ -103,6 +103,6 @@
+   return str;
+ }
+-static char s_write_byte[] = "write-byte";
+-SCM scm_write_byte(chr, port)
++static const char s_write_byte[] = "write-byte";
++static SCM scm_write_byte(chr, port)
+      SCM chr, port;
+ {
+@@ -114,6 +114,6 @@
+   return UNSPECIFIED;
+ }
+-static char s_read_byte[] = "read-byte";
+-SCM scm_read_byte(port)
++static const char s_read_byte[] = "read-byte";
++static SCM scm_read_byte(port)
+      SCM port;
+ {
+@@ -126,6 +126,6 @@
+ }
+ 
+-static char s_sub_rd[] = "subbytes-read!";
+-SCM scm_subbytes_read(sstr, start, args)
++static const char s_sub_rd[] = "subbytes-read!";
++static SCM scm_subbytes_read(sstr, start, args)
+      SCM sstr, start, args;
+ {
+@@ -173,6 +173,6 @@
+ }
+ 
+-static char s_sub_wr[] = "subbytes-write";
+-SCM scm_subbytes_write(sstr, start, args)
++static const char s_sub_wr[] = "subbytes-write";
++static SCM scm_subbytes_write(sstr, start, args)
+      SCM sstr, start, args;
+ {
+--- bytenumb.c	2013-03-24 19:37:38.000000000 -0400
++++ bytenumb.c	2015-01-23 18:55:19.000000000 -0500
+@@ -27,5 +27,5 @@
+ #include "scm.h"
+ 
+-int get_bytes_length(obj)
++static int get_bytes_length(obj)
+      SCM obj;
+ {
+@@ -47,8 +47,8 @@
+ }
+ 
+-static char s_wrong_length[] = "wrong length";
++static const char s_wrong_length[] = "wrong length";
+ static SCM list_of_0;
+ 
+-char * get_bytes(obj, minlen, s_name)
++static void * get_bytes(obj, minlen, s_name)
+      SCM obj;
+      int minlen;
+@@ -60,13 +60,15 @@
+ 	 obj, ARG1, s_name);
+   {
++#ifndef RECKLESS
+     int byvlen = get_bytes_length(obj);
++#endif
+     ASRTER((minlen < 0) ? byvlen >= -minlen : byvlen == minlen,
+ 	   MAKINUM(byvlen), s_wrong_length, s_name);
+-    return (char*)scm_addr(cons(obj, list_of_0), s_name);
++    return scm_addr(cons(obj, list_of_0), s_name);
+   }
+ }
+ 
+-static char s_bytes_to_integer[] = "bytes->integer";
+-SCM scm_bytes_to_integer(sbyts, sn)
++static const char s_bytes_to_integer[] = "bytes->integer";
++static SCM scm_bytes_to_integer(sbyts, sn)
+      SCM sbyts;
+      SCM sn;
+@@ -76,5 +78,5 @@
+   {
+     int cnt = abs(n);
+-    char *byts = get_bytes(sbyts, -cnt, s_bytes_to_integer);
++    const unsigned char *byts = get_bytes(sbyts, -cnt, s_bytes_to_integer);
+     int iu = 0, id = cnt - sizeof(BIGDIG);
+     sizet ndigs = (cnt + sizeof(BIGDIG) - 1) / sizeof(BIGDIG);
+@@ -88,5 +90,5 @@
+ 	for (; j < sizeof(BIGDIG); j++) {
+ 	  dig = (dig<<8) +
+-	    (0xFF ^ ((id + j >= 0) ? (((unsigned char *)byts)[id + j]) : 255));
++	    (0xFF ^ ((id + j >= 0) ? byts[id + j] : 255));
+ 	  /* printf("byts[%d + %d] = %lx\n", id, j, 0xFF & dig); */
+ 	}
+@@ -102,5 +104,5 @@
+ 	for (; j < sizeof(BIGDIG); j++) {
+ 	  dig = (dig<<8) +
+-	    ((id + j >= 0) ? (((unsigned char *)byts)[id + j]) : 0);
++	    ((id + j >= 0) ? byts[id + j] : 0);
+ 	}
+ 	digs[iu] = dig;
+@@ -112,6 +114,6 @@
+ }
+ 
+-static char s_integer_to_bytes[] = "integer->bytes";
+-SCM scm_integer_to_bytes(sn, slen)
++static const char s_integer_to_bytes[] = "integer->bytes";
++static SCM scm_integer_to_bytes(sn, slen)
+      SCM sn;
+      SCM slen;
+@@ -150,5 +152,5 @@
+ 	    sizet j = sizeof(BIGDIG);
+ 	    dig = (iu < ndigs) ? digs[iu] : 0;
+-	    dig = dig ^ ((1 << (8 * sizeof(BIGDIG))) - 1);
++	    dig = dig ^ ((1UL << (8 * sizeof(BIGDIG))) - 1);
+ 	    /* printf("j = %d; id = %d; iu = %d; dig = %04x; borrow = %d\n", j, id, iu, dig, borrow); */
+ 	    for (; 0 < j-- && 0 <= id;) {
+@@ -156,5 +158,5 @@
+ 	      int dg = (0xFF & dig) + borrow;
+ 	      borrow = dg >> 8;
+-	      ((unsigned char *)byts)[id--] = dg;
++	      byts[id--] = dg;
+ 	      dig = (dig)>>8;
+ 	    }
+@@ -167,5 +169,5 @@
+ 	    for (; 0 < j-- && 0 <= id;) {
+ 	      /* printf("byts[%d] = %02x\n", id, 0xFF & dig); */
+-	      ((unsigned char *)byts)[id--] = 0xFF & dig;
++	      byts[id--] = 0xFF & dig;
+ 	      dig = (dig>>8);
+ 	    }
+@@ -177,23 +179,23 @@
+ }
+ 
+-static char s_bytes_to_ieee_float[] = "bytes->ieee-float";
+-SCM scm_bytes_to_ieee_float(sbyts)
++static const char s_bytes_to_ieee_float[] = "bytes->ieee-float";
++static SCM scm_bytes_to_ieee_float(sbyts)
+      SCM sbyts;
+ {
+-  char *byts = get_bytes(sbyts, 4, s_bytes_to_ieee_float);
++  const unsigned char *byts = get_bytes(sbyts, 4, s_bytes_to_ieee_float);
+   int len = LENGTH(sbyts);
+-  int s = (1<<(7)) & ((((unsigned char*)(byts))[0]));
+-  int e = ((0x7f&((((unsigned char*)(byts))[0])))<<1)
+-    + ((0x80&((((unsigned char*)(byts))[1])))>>7);
+-  float f = (((unsigned char*)(byts))[ -1 + (len)]);
++  int s = (1<<(7)) & (((byts)[0]));
++  int e = ((0x7f&(((byts))[0]))<<1)
++    + ((0x80&((((byts))[1])))>>7);
++  float f = (((byts))[ -1 + (len)]);
+   int idx = -2 + (len);
+   while (!((idx)<=1)) {
+     {
+       int T_idx = -1 + (idx);
+-      f = ((((unsigned char*)(byts))[idx])) + ((f) / 0x100);
++      f = ((((byts))[idx])) + ((f) / 0x100);
+       idx = T_idx;
+     }
+   }
+-  f = ((0x7f&((((unsigned char*)(byts))[1]))) + ((f) / 0x100)) / 0x80;
++  f = ((0x7f&((((byts))[1]))) + ((f) / 0x100)) / 0x80;
+   if ((0<(e))
+       && ((e)<0xff))
+@@ -207,23 +209,23 @@
+ }
+ 
+-static char s_bytes_to_ieee_double[] = "bytes->ieee-double";
+-SCM scm_bytes_to_ieee_double(sbyts)
++static const char s_bytes_to_ieee_double[] = "bytes->ieee-double";
++static SCM scm_bytes_to_ieee_double(sbyts)
+      SCM sbyts;
+ {
+-  char *byts = get_bytes(sbyts, 8, s_bytes_to_ieee_double);
++  const unsigned char *byts = get_bytes(sbyts, 8, s_bytes_to_ieee_double);
+   int len = LENGTH(sbyts);
+-  int s = (1<<(7)) & ((((unsigned char*)(byts))[0]));
+-  int e = ((0x7f&((((unsigned char*)(byts))[0])))<<4)
+-    + ((0xf0&((((unsigned char*)(byts))[1])))>>4);
+-  double f = (((unsigned char*)(byts))[ -1 + (len)]);
++  int s = (1<<(7)) & ((((byts))[0]));
++  int e = ((0x7f&((((byts))[0])))<<4)
++    + ((0xf0&((((byts))[1])))>>4);
++  double f = (((byts))[ -1 + (len)]);
+   int idx = -2 + (len);
+   while (!((idx)<=1)) {
+     {
+       int T_idx = -1 + (idx);
+-      f = ((((unsigned char*)(byts))[idx])) + ((f) / 0x100);
++      f = ((((byts))[idx])) + ((f) / 0x100);
+       idx = T_idx;
+     }
+   }
+-  f = ((0xf&((((unsigned char*)(byts))[1]))) + ((f) / 0x100)) / 0x10;
++  f = ((0xf&((((byts))[1]))) + ((f) / 0x100)) / 0x10;
+   if ((0<(e))
+       && ((e)<0x7ff))
+@@ -237,6 +239,6 @@
+ }
+ 
+-static char s_ieee_float_to_bytes[] = "ieee-float->bytes";
+-SCM scm_ieee_float_to_bytes(in_flt)
++static const char s_ieee_float_to_bytes[] = "ieee-float->bytes";
++static SCM scm_ieee_float_to_bytes(in_flt)
+      SCM in_flt;
+ {
+@@ -318,6 +320,6 @@
+ }
+ 
+-static char s_ieee_double_to_bytes[] = "ieee-double->bytes";
+-SCM scm_ieee_double_to_bytes(in_flt)
++static const char s_ieee_double_to_bytes[] = "ieee-double->bytes";
++static SCM scm_ieee_double_to_bytes(in_flt)
+      SCM in_flt;
+ {
+@@ -398,18 +400,18 @@
+ }
+ 
+-static char s_integer_byte_collate_M[] = "integer-byte-collate!";
+-SCM scm_integer_byte_collate_M(byte_vector)
++static const char s_integer_byte_collate_M[] = "integer-byte-collate!";
++static SCM scm_integer_byte_collate_M(byte_vector)
+      SCM byte_vector;
+ {
+-  char* bv = get_bytes(byte_vector, -1, s_integer_byte_collate_M);
++  unsigned char* bv = get_bytes(byte_vector, -1, s_integer_byte_collate_M);
+   bv[0] = 0x80^(bv[0]);
+   return byte_vector;
+ }
+ 
+-static char s_ieee_byte_collate_M[] = "ieee-byte-collate!";
+-SCM scm_ieee_byte_collate_M(byte_vector)
++static const char s_ieee_byte_collate_M[] = "ieee-byte-collate!";
++static SCM scm_ieee_byte_collate_M(byte_vector)
+      SCM byte_vector;
+ {
+-  char* byv = get_bytes(byte_vector, 4, s_ieee_byte_collate_M);
++  unsigned char* byv = get_bytes(byte_vector, 4, s_ieee_byte_collate_M);
+   int byvlen = get_bytes_length(byte_vector);
+   if (0x80&(byv[0])) {
+@@ -425,9 +427,9 @@
+ }
+ 
+-static char s_ieee_byte_decollate_M[] = "ieee-byte-decollate!";
+-SCM scm_ieee_byte_decollate_M(byte_vector)
++static const char s_ieee_byte_decollate_M[] = "ieee-byte-decollate!";
++static SCM scm_ieee_byte_decollate_M(byte_vector)
+      SCM byte_vector;
+ {
+-  char* byv = get_bytes(byte_vector, 4, s_ieee_byte_collate_M);
++  unsigned char* byv = get_bytes(byte_vector, 4, s_ieee_byte_collate_M);
+   int byvlen = get_bytes_length(byte_vector);
+   if (!(0x80&(byv[0]))) {
+--- continue.h	2008-02-19 00:12:54.000000000 -0500
++++ continue.h	2015-01-26 23:02:16.000000000 -0500
+@@ -70,5 +66,9 @@
+ 
+ #ifdef sparc
+-# define FLUSH_REGISTER_WINDOWS asm("ta 3")
++# ifdef __sparcv9
++#  define FLUSH_REGISTER_WINDOWS asm("flushw")
++# else
++#  define FLUSH_REGISTER_WINDOWS asm("ta 3")
++# endif
+ #else
+ # define FLUSH_REGISTER_WINDOWS /* empty */
+@@ -142,4 +138,6 @@
+ 
+ extern long thrown_value;
++void init_storage P((STACKITEM *start, long init_heap_size));
++void mark_locations P((const STACKITEM x[], sizet n));
+ long stack_size P((STACKITEM *start));
+ CONTINUATION *make_root_continuation P((STACKITEM *stack_base));
+--- crs.c	2009-10-21 15:41:30.000000000 -0400
++++ crs.c	2015-01-23 18:55:19.000000000 -0500
+@@ -43,5 +43,5 @@
+ #define WIN(obj) ((WINDOW*)CDR(obj))
+ #define WINP(obj) (tc16_window==TYP16(obj))
+-int freewindow(win)
++static int freewindow(win)
+      WINDOW *win;
+ {
+@@ -50,9 +50,9 @@
+   return 0;
+ }
+-int bwaddch(c, win) int c; WINDOW *win; {waddch(win, c);return c;}
+-int bwaddstr(str, win) char *str; WINDOW *win; {waddstr(win, str);return 0;}
+-sizet bwwrite(str, siz, num, win)
++static int bwaddch(c, win) int c; WINDOW *win; {waddch(win, c);return c;}
++static int bwaddstr(str, win) const char *str; WINDOW *win; {waddstr(win, str);return 0;}
++static sizet bwwrite(str, siz, num, win)
+      sizet siz, num;
+-     char *str; WINDOW *win;
++     const char *str; WINDOW *win;
+ {
+   sizet i = 0, prod = siz*num;
+@@ -74,5 +74,5 @@
+   freewindow};
+ 
+-SCM mkwindow(win)
++static SCM mkwindow(win)
+      WINDOW *win;
+ {
+@@ -85,6 +85,6 @@
+ }
+ 
+-SCM *loc_stdscr = 0;
+-SCM linitscr()
++static SCM *loc_stdscr = NULL;
++static SCM linitscr(void)
+ {
+   WINDOW *win;
+@@ -96,5 +96,5 @@
+   return *loc_stdscr = mkwindow(win);
+ }
+-SCM lendwin()
++static SCM lendwin(void)
+ {
+   if (IMP(*loc_stdscr)) return BOOL_F;
+@@ -102,7 +102,7 @@
+ }
+ 
+-static char s_newwin[] = "newwin", s_subwin[] = "subwin", s_mvwin[] = "mvwin",
++static const char s_newwin[] = "newwin", s_subwin[] = "subwin", s_mvwin[] = "mvwin",
+ 	    s_overlay[] = "overlay", s_overwrite[] = "overwrite";
+-SCM lnewwin(lines, cols, args)
++static SCM lnewwin(lines, cols, args)
+      SCM lines, cols, args;
+ {
+@@ -121,5 +121,5 @@
+ }
+ 
+-SCM lmvwin(win, y, x)
++static SCM lmvwin(win, y, x)
+      SCM win, y, x;
+ {
+@@ -130,5 +130,5 @@
+ }
+ 
+-SCM lsubwin(win, lines, args)
++static SCM lsubwin(win, lines, args)
+      SCM win, lines, args;
+ {
+@@ -150,5 +150,5 @@
+ }
+ 
+-SCM loverlay(srcwin, dstwin)
++static SCM loverlay(srcwin, dstwin)
+      SCM srcwin, dstwin;
+ {
+@@ -158,5 +158,5 @@
+ }
+ 
+-SCM loverwrite(srcwin, dstwin)
++static SCM loverwrite(srcwin, dstwin)
+      SCM srcwin, dstwin;
+ {
+@@ -166,7 +166,7 @@
+ }
+ 
+-static char s_wmove[] = "wmove", s_wadd[] = "wadd", s_winsch[] = "winsch",
++static const char s_wmove[] = "wmove", s_wadd[] = "wadd", s_winsch[] = "winsch",
+ 	s_box[] = "box";
+-SCM lwmove(win, y, x)
++static SCM lwmove(win, y, x)
+      SCM win, y, x;
+ {
+@@ -177,5 +177,5 @@
+ }
+ 
+-SCM lwadd(win, obj)
++static SCM lwadd(win, obj)
+      SCM win, obj;
+ {
+@@ -189,5 +189,5 @@
+ }
+ 
+-SCM lwinsch(win, obj)
++static SCM lwinsch(win, obj)
+      SCM win, obj;
+ {
+@@ -199,5 +199,5 @@
+ }
+ 
+-SCM lbox(win, vertch, horch)
++static SCM lbox(win, vertch, horch)
+      SCM win, vertch, horch;
+ {
+@@ -217,6 +217,6 @@
+ }
+ 
+-static char s_getyx[] = "getyx", s_winch[] = "winch", s_unctrl[] = "unctrl";
+-SCM lgetyx(win)
++static const char s_getyx[] = "getyx", s_winch[] = "winch", s_unctrl[] = "unctrl";
++static SCM lgetyx(win)
+      SCM win;
+ {
+@@ -227,5 +227,5 @@
+ }
+ 
+-SCM lwinch(win)
++static SCM lwinch(win)
+      SCM win;
+ {
+@@ -234,16 +234,16 @@
+ }
+ 
+-SCM lunctrl(c)
++static SCM lunctrl(c)
+      SCM c;
+ {
+   ASRTER(ICHRP(c), c, ARG1, s_unctrl);
+   {
+-    char *str = unctrl(ICHR(c));
++    const char *str = unctrl(ICHR(c));
+     return makfrom0str(str);
+   }
+ }
+-static char s_owidth[] = "output-port-width";
+-static char s_oheight[] = "output-port-height";
+-SCM owidth(arg)
++static const char s_owidth[] = "output-port-width";
++static const char s_oheight[] = "output-port-height";
++static SCM owidth(arg)
+      SCM arg;
+ {
+@@ -256,20 +256,21 @@
+   return MAKINUM(80);
+ }
+-SCM oheight(arg)
++static SCM oheight(arg)
+      SCM arg;
+ {
+   if (UNBNDP(arg)) arg = cur_outp;
+   ASRTER(NIMP(arg) && OPOUTPORTP(arg), arg, ARG1, s_owidth);
+-  if (NIMP(*loc_stdscr))
++  if (NIMP(*loc_stdscr)) {
+     if (WINP(arg)) return MAKINUM(WIN(arg)->_maxy+1);
+     else return MAKINUM(LINES);
++  }
+   return MAKINUM(24);
+ }
+-SCM lrefresh()
++static SCM lrefresh()
+ {
+   return MAKINUM(wrefresh(curscr));
+ }
+ 
+-#define SUBR0(lname, name) SCM lname(){name();return UNSPECIFIED;}
++#define SUBR0(lname, name) static SCM lname(){name();return UNSPECIFIED;}
+ SUBR0(lnl, nl)
+ SUBR0(lnonl, nonl)
+@@ -283,5 +284,5 @@
+ SUBR0(lresetty, resetty)
+ 
+-static char s_nonl[] = "nonl", s_nocbreak[] = "nocbreak",
++static const char s_nonl[] = "nonl", s_nocbreak[] = "nocbreak",
+ 	    s_noecho[] = "noecho", s_noraw[] = "noraw";
+ 
+@@ -302,6 +303,6 @@
+ 	{0, 0}};
+ 
+-#define SUBRW(ln, n, s_n, sn) static char s_n[]=sn;\
+-	SCM ln(w)SCM w;\
++#define SUBRW(ln, n, s_n, sn) static const char s_n[]=sn;\
++	static SCM ln(w)SCM w;\
+ 	{ASRTER(NIMP(w) && WINP(w), w, ARG1, sn);\
+ 	return ERR==n(WIN(w))?BOOL_F:BOOL_T;}
+@@ -336,6 +337,6 @@
+ 	{0, 0}};
+ 
+-#define SUBROPT(ln, n, s_n, sn) static char s_n[]=sn;\
+-	SCM ln(w, b)SCM w, b;\
++#define SUBROPT(ln, n, s_n, sn) static const char s_n[]=sn;\
++	static SCM ln(w, b)SCM w, b;\
+ 	{ASRTER(NIMP(w) && WINP(w), w, ARG1, sn);\
+ 	return ERR==n(WIN(w), BOOL_F != b)?BOOL_F:BOOL_T;}
+@@ -347,6 +348,6 @@
+ 
+ /*  SUBROPT(lclearok, clearok, s_clearok, "clearok") */
+-static char s_clearok[] = "clearok";
+-SCM lclearok(w, b) SCM w, b;
++static const char s_clearok[] = "clearok";
++static SCM lclearok(w, b) SCM w, b;
+ {
+   if (BOOL_T==w) return ERR==clearok(curscr, BOOL_F != b)?BOOL_F:BOOL_T;
+--- debug.c	2008-01-30 22:31:48.000000000 -0500
++++ debug.c	2015-01-23 18:55:19.000000000 -0500
+@@ -291,5 +291,8 @@
+      int writing;
+ {
+-  SCM env, linum = UNDEFINED;
++  SCM env;
++#ifdef CAUTIOUS
++  SCM linum = UNDEFINED;
++#endif
+   proc = CODE(proc);
+   lputs("#<CLOSURE ", port);
+@@ -320,6 +323,6 @@
+ }
+ 
+-static char s_int2linum[] = "integer->line-number";
+-SCM scm_int2linum(n)
++static const char s_int2linum[] = "integer->line-number";
++static SCM scm_int2linum(n)
+      SCM n;
+ {
+@@ -329,6 +332,6 @@
+ }
+ 
+-static char s_linum2int[] = "line-number->integer";
+-SCM scm_linum2int(linum)
++static const char s_linum2int[] = "line-number->integer";
++static SCM scm_linum2int(linum)
+      SCM linum;
+ {
+@@ -337,5 +340,5 @@
+ }
+ 
+-SCM scm_linump(obj)
++static SCM scm_linump(obj)
+      SCM obj;
+ {
+@@ -343,6 +346,6 @@
+ }
+ 
+-static char s_remove_linums[] = "remove-line-numbers!";
+-SCM scm_remove_linums(x)
++static const char s_remove_linums[] = "remove-line-numbers!";
++static SCM scm_remove_linums(x)
+      SCM x;
+ {
+@@ -377,5 +380,5 @@
+ 
+ #ifdef CAUTIOUS
+-long num_frames(estk, i)
++static long num_frames(estk, i)
+      SCM estk;
+      int i;
+@@ -390,5 +393,5 @@
+ }
+ 
+-SCM *estk_frame(estk, i, nf)
++static SCM *estk_frame(estk, i, nf)
+      SCM estk;
+      int i, nf;
+@@ -408,5 +411,5 @@
+ }
+ 
+-SCM stacktrace1(estk, i)
++static SCM stacktrace1(estk, i)
+      SCM estk;
+      int i;
+@@ -444,5 +447,5 @@
+ }
+ 
+-SCM *cont_frame(contin, nf)
++static SCM *cont_frame(contin, nf)
+      SCM contin;
+      int nf;
+@@ -455,5 +458,5 @@
+ }
+ 
+-static char s_stack_trace[] = "stack-trace";
++static const char s_stack_trace[] = "stack-trace";
+ SCM scm_stack_trace(contin)
+      SCM contin;
+@@ -476,6 +479,6 @@
+ }
+ 
+-static char s_frame_trace[] = "frame-trace";
+-SCM scm_frame_trace(contin, nf)
++static const char s_frame_trace[] = "frame-trace";
++static SCM scm_frame_trace(contin, nf)
+      SCM contin, nf;
+ {
+@@ -493,6 +496,6 @@
+ }
+ 
+-static char s_frame2env[] = "frame->environment";
+-SCM scm_frame2env(contin, nf)
++static const char s_frame2env[] = "frame->environment";
++static SCM scm_frame2env(contin, nf)
+      SCM contin, nf;
+ {
+@@ -506,6 +509,6 @@
+ }
+ 
+-static char s_frame_eval[] = "frame-eval";
+-SCM scm_frame_eval(contin, nf, expr)
++static const char s_frame_eval[] = "frame-eval";
++static SCM scm_frame_eval(contin, nf, expr)
+      SCM contin, nf, expr;
+ {
+@@ -526,5 +529,5 @@
+ #endif
+ 
+-static char s_scope_trace[] = "scope-trace";
++static const char s_scope_trace[] = "scope-trace";
+ SCM scm_scope_trace(env)
+      SCM env;
+@@ -593,6 +596,6 @@
+ }
+ 
+-static char s_env_annotation[] = "environment-annotation";
+-SCM scm_env_annotation(var, stenv)
++static const char s_env_annotation[] = "environment-annotation";
++static SCM scm_env_annotation(var, stenv)
+      SCM var, stenv;
+ {
+--- differ.c	2010-08-21 22:12:34.000000000 -0400
++++ differ.c	2015-01-23 18:55:19.000000000 -0500
+@@ -24,69 +24,81 @@
+ #include "scm.h"
+ 
+-#ifdef __x86_64
+-# define I32 int
+-#else
+-# define I32 long
+-#endif
+-/* Currently A:fixZ32b are actually A:fixZ64b.  Remove next line when
++/* Currently A:fixZ32b are actually A:fixZ64b.  Use int64_t, when
+    this gets fixed. */
+-#define I32 long
+-
+-SCM_EXPORT SCM  array_dims P((SCM ra));
++#define I32 int64_t
+ 
+ typedef int (*int_function) ();
+ 
+ typedef struct {
+-  void* (*subarray) ();
++  const void * (*subarray)(const void *, int start, int end);
+   int_function array_refsEql_P;
+   int_function array_refs_revEql_P;
+ } fp_procs;
+ 
+-int fp_compare(I32 *fp,int fpoff,I32 *cc,void *a,int m,void *b,int n,int_function array_refsEql_P,int p_lim);
++static int fp_compare(I32 *fp, int fpoff, I32 *cc,
++    const void *a, int m,
++    const void *b, int n,
++    int_function array_refsEql_P, int p_lim);
+ 
+-int fp_run(I32 *fp,int fpoff,int k,void *a,int m,void *b,int n,int_function array_refsEql_P,I32 *cc,int p);
++static int fp_run(I32 *fp, int fpoff, int k,
++    const void *a, int m,
++    const void *b, int n,
++    int_function array_refsEql_P,
++    I32 *cc, int p);
+ 
+-int diff_mid_split(int n,I32 *rr,I32 *cc,int cost);
++static int diff_mid_split(int n, const I32 *rr, const I32 *cc,int cost);
+ 
+-void fp_init(I32 *fp,int fpoff,int fill,int mindx,int maxdx);
++static void fp_init(I32 *fp, int fpoff, int fill, int mindx, int maxdx);
+ 
+-int diff_divide_and_conquer(I32 *fp,int fpoff,I32 *ccrr,void *a,int start_a,int end_a,void *b,int start_b,int end_b,I32 *edits,int edx,int epo,fp_procs *procs,int p_lim);
++static int diff_divide_and_conquer(I32 *fp, int fpoff, I32 *ccrr,
++    const void *a, int start_a, int end_a,
++    const void *b, int start_b, int end_b,
++    I32 *edits, int edx, int epo, const fp_procs *procs, int p_lim);
+ 
+-int diff2et(I32 *fp,int fpoff,I32 *ccrr,void *a,int start_a,int end_a,void *b,int start_b,int end_b,I32 *edits,int edx,int epo,fp_procs *procs,int p_lim);
++static int diff2et(I32 *fp, int fpoff, I32 *ccrr,
++    const void *a, int start_a, int end_a,
++    const void *b, int start_b, int end_b,
++    I32 *edits, int edx, int epo, const fp_procs *procs, int p_lim);
+ 
+-int diff2ez(I32 *fp,int fpoff,I32 *ccrr,void *a,int start_a,int end_a,void *b,int start_b,int end_b,I32 *edits,int edx,int epo,fp_procs *procs,int p_lim);
++static int diff2ez(I32 *fp, int fpoff, I32 *ccrr,
++    const void *a, int start_a, int end_a,
++    const void *b, int start_b, int end_b,
++    I32 *edits, int edx, int epo, const fp_procs *procs, int p_lim);
+ 
+-void check_cost(unsigned char *name,int est,int cost);
++static void check_cost(const char *name, int est, int cost);
+ 
+-SCM_EXPORT SCM  diff2edits P((SCM Edits, SCM Fp, SCM Args));
++static SCM  diff2edits P((SCM Edits, SCM Fp, SCM Args));
+ 
+-SCM_EXPORT SCM  diff2editlen P((SCM Fp, SCM A, SCM Args));
++static SCM  diff2editlen P((SCM Fp, SCM A, SCM Args));
+ 
+ #define MAX(a,b)		(a<b ? b : a)
+ #define MIN(a,b)		(a>b ? b : a)
+ 
+-I32 *long_subarray(ra, start, end)
+-     I32 *ra; int start, end;
++static const void *I32_subarray(_ra, start, end)
++     const void *_ra; int start, end;
+ {
++  const I32 *ra = _ra;
+   return &(ra[start]);
+ }
+-short *short_subarray(ra, start, end)
+-     short *ra; int start, end;
++static const void *short_subarray(_ra, start, end)
++     const void *_ra; int start, end;
+ {
++  const short *ra = _ra;
+   return &(ra[start]);
+ }
+-char *char_subarray(ra, start, end)
+-     char *ra; int start, end;
++static const void *char_subarray(_ra, start, end)
++     const void *_ra; int start, end;
+ {
++  const char *ra = _ra;
+   return &(ra[start]);
+ }
+ 
+-int long_array_refsEql_P(a, x, m, b, y, n)
++static int long_array_refsEql_P(a, x, m, b, y, n)
+      I32 *a; int x, m; I32 *b; int y, n;
+ {
+   return (a[x])==(b[y]);
+ }
+-int long_array_refs_revEql_P(a, x, m, b, y, n)
+-     I32 *a; int x, m; I32 *b; int y, n;
++static int long_array_refs_revEql_P(a, x, m, b, y, n)
++     const I32 *a; int x, m; const I32 *b; int y, n;
+ {
+ /*   if (x > m) printf("long x(%d) > m(%d)\n", x, m); */
+@@ -94,11 +106,11 @@
+   return a[(m)-(x)-1]==b[(n)-(y)-1];
+ }
+-int short_array_refsEql_P(a, x, m, b, y, n)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501270840.t0R8eZ8E007896>