diff options
author | dholland <dholland> | 2015-04-25 19:58:32 +0000 |
---|---|---|
committer | dholland <dholland> | 2015-04-25 19:58:32 +0000 |
commit | 913dcf97d58126a9bbfe5f39f3a274954f5d435f (patch) | |
tree | db76f467a435b0ec75d17e7cae4c65ec36b4e45f /lang/newsqueak | |
parent | 37353d5bfa774e40c0bc1a7c00507fd18fe9eec7 (diff) | |
download | pkgsrc-913dcf97d58126a9bbfe5f39f3a274954f5d435f.tar.gz |
Add a package for Rob Pike's newsqueak, a channel-based concurrent
programming language. It is one of the ancestors of Go.
Diffstat (limited to 'lang/newsqueak')
22 files changed, 829 insertions, 0 deletions
diff --git a/lang/newsqueak/DESCR b/lang/newsqueak/DESCR new file mode 100644 index 00000000000..d0578bf7e86 --- /dev/null +++ b/lang/newsqueak/DESCR @@ -0,0 +1,2 @@ +Newsqueak is a channel-based concurrent programming language from Rob +Pike; it is a predecessor of Alef, Limbo, and Go. diff --git a/lang/newsqueak/Makefile b/lang/newsqueak/Makefile new file mode 100644 index 00000000000..b2d4ae6082c --- /dev/null +++ b/lang/newsqueak/Makefile @@ -0,0 +1,23 @@ +# $NetBSD: Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +DISTNAME= newsqueak +PKGNAME= newsqueak-20000211 +CATEGORIES= lang +MASTER_SITES= http://www.herpolhode.com/rob/ + +MAINTAINER= dholland@NetBSD.org +HOMEPAGE= http://en.wikipedia.org/wiki/Newsqueak +COMMENT= Newsqueak: a language for communicating with mice +LICENSE= public-domain + +WRKSRC= ${WRKDIR} +USE_TOOLS+= yacc +INSTALLATION_DIRS= bin share/squint/include + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/squint/squint \ + ${DESTDIR}${PREFIX}/bin/squint + ${INSTALL_DATA} ${WRKSRC}/squint/include/*.h \ + ${DESTDIR}${PREFIX}/share/squint/include/ + +.include "../../mk/bsd.pkg.mk" diff --git a/lang/newsqueak/PLIST b/lang/newsqueak/PLIST new file mode 100644 index 00000000000..14003087fdb --- /dev/null +++ b/lang/newsqueak/PLIST @@ -0,0 +1,16 @@ +@comment $NetBSD: PLIST,v 1.1 2015/04/25 19:58:32 dholland Exp $ +bin/squint +share/squint/include/arrow.h +share/squint/include/bitmapio.h +share/squint/include/box.h +share/squint/include/fio.h +share/squint/include/gnot.h +share/squint/include/gnotio.h +share/squint/include/layer.h +share/squint/include/lib.h +share/squint/include/lmenu.h +share/squint/include/menu.h +share/squint/include/nspace.h +share/squint/include/sight.h +share/squint/include/sys.h +share/squint/include/whitearrow.h diff --git a/lang/newsqueak/distinfo b/lang/newsqueak/distinfo new file mode 100644 index 00000000000..0ae165e2899 --- /dev/null +++ b/lang/newsqueak/distinfo @@ -0,0 +1,23 @@ +$NetBSD: distinfo,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +SHA1 (newsqueak.tar.gz) = 085cc8248be5b6145f57b8517e0f22469e5047c1 +RMD160 (newsqueak.tar.gz) = 56f6fcf95a58d141efc57cedbf1a49574ea8b777 +Size (newsqueak.tar.gz) = 265358 bytes +SHA1 (patch-Makefile) = 1c71432e17f2e146c6b077cf23e8dc13a65356d5 +SHA1 (patch-include_lib9.h) = 0988b189b5b3e6666cdc4f04b31b5410af63aca9 +SHA1 (patch-include_u.h) = ffb1752ebbcb600850e196e630592063827e32c9 +SHA1 (patch-lib9_Makefile) = 5e48c9cdca6d560cd7c8d9b92e729f7fbb5fa999 +SHA1 (patch-lib9_doprint.c) = c94bee65440c0a697ba426549740a4df3aa3e809 +SHA1 (patch-lib9_nan.c) = 3c7067d47d9a7a1f98f41f466dd346d1593994bb +SHA1 (patch-lib9_wait.c) = a8574632f483ea9da2f83597a165605b3bc3b2b6 +SHA1 (patch-libbio_Makefile) = 0272c0953ede97a9805a5668035938c18c9932f1 +SHA1 (patch-squint_Makefile) = ae117cb88ead5924207f03c85358a3a4baeaba90 +SHA1 (patch-squint_compile.c) = 9f4c5684a04b62ed61bb9155853d921ec870231a +SHA1 (patch-squint_error.c) = 1f7402b91c485037f154adb7346b5fa0c4bb1793 +SHA1 (patch-squint_inst) = ec4add4193884e4ae402ebbc539dcc2bacd553d8 +SHA1 (patch-squint_lex.c) = 08f503be33aac0db29295077af1e56ceb38d8ae3 +SHA1 (patch-squint_main.c) = 33afa209ca89d89c23d5cf4d225b1d0eeedf53a9 +SHA1 (patch-squint_proc.c) = 1650bb984ff237589d2d5cc83cb60e9c81cbb631 +SHA1 (patch-squint_progs_npowser) = b65ec5c6bb354bcccfaa01912f9498da031e6c07 +SHA1 (patch-squint_var.c) = 8a79fbbe4acba76214437707e1baee31e746f69c +SHA1 (patch-squint_xec.c) = 6b040eb1189233852adbe698e902946b367884c3 diff --git a/lang/newsqueak/patches/patch-Makefile b/lang/newsqueak/patches/patch-Makefile new file mode 100644 index 00000000000..603f68d6771 --- /dev/null +++ b/lang/newsqueak/patches/patch-Makefile @@ -0,0 +1,30 @@ +$NetBSD: patch-Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Configure for pkgsrc, and use bsd make. +Don't set -g; do set -fno-strict-aliasing. +Pass in PREFIX. + +--- Makefile.orig 2000-02-11 17:04:11.000000000 +0000 ++++ Makefile +@@ -1,12 +1,11 @@ +-DIRS = lib9 libbio squint ++DIRS= lib9 libbio squint + +-CFLAGS = -g -Wall $(INCLUDES) ++#CFLAGS+= -g ++CFLAGS+= -Wall $(INCLUDES) ++CFLAGS+= -fno-strict-aliasing # required in squint/var.c ++CFLAGS+= -DPREFIX=\"$(PREFIX)\" + +-all: +- for i in $(DIRS); do cd $$i; CFLAGS="$(CFLAGS)" make -$(MAKEFLAGS); cd ..; done +- +-clean: +- for i in $(DIRS); do cd $$i; CFLAGS="$(CFLAGS)" make -$(MAKEFLAGS) clean; cd ..; done +- +-%: +- for i in $(DIRS); do cd $$i; CFLAGS="$(CFLAGS)" make -$(MAKEFLAGS) $@; cd ..; done ++all depend clean: ++.for D in $(DIRS) ++ (cd $D && CFLAGS=$(CFLAGS:Q) $(MAKE) $@) || exit 1 ++.endfor diff --git a/lang/newsqueak/patches/patch-include_lib9.h b/lang/newsqueak/patches/patch-include_lib9.h new file mode 100644 index 00000000000..062ba516284 --- /dev/null +++ b/lang/newsqueak/patches/patch-include_lib9.h @@ -0,0 +1,28 @@ +$NetBSD: patch-include_lib9.h,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Provide an implementation of SET to silence some compiler warnings. +Muck with fmtinstall to avoid doing undefined/illegal things with va_list. + +--- include/lib9.h~ 2000-02-11 17:04:14.000000000 +0000 ++++ include/lib9.h +@@ -7,7 +7,7 @@ typedef unsigned short Rune; + #define create(name, mode, perm) creat(name, perm) + #define exec(a,b) execv(a,b) + #define USED(a) +-#define SET(a) ++#define SET(a) ((a) = 0) + + #define nil ((void*)0) + +@@ -96,7 +96,10 @@ int sprint(char *buf, const char *fmt, . + int snprint(char *buf, int len, const char *fmt, ...); + char* seprint(char *buf, char *e, const char *fmt, ...); + #define pow10(n) (pow(10.0, (double)(n))) +-extern int fmtinstall(int, int (*)(va_list*, Fconv*)); ++struct va_wrap { ++ va_list ap; ++}; ++extern int fmtinstall(int, int (*)(struct va_wrap *, Fconv*)); + + /* nan.c */ + double NaN(void); diff --git a/lang/newsqueak/patches/patch-include_u.h b/lang/newsqueak/patches/patch-include_u.h new file mode 100644 index 00000000000..c60885ba44b --- /dev/null +++ b/lang/newsqueak/patches/patch-include_u.h @@ -0,0 +1,35 @@ +$NetBSD: patch-include_u.h,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Add support for modern BSDs. + +--- include/u.h.orig 2000-02-11 17:05:58.000000000 +0000 ++++ include/u.h +@@ -189,6 +189,28 @@ typedef unsigned long long uvlong; + typedef long long vlong; + #endif + ++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) ++#define _XOPEN_SOURCE_EXTENDED ++ ++#include <stdarg.h> ++#include <setjmp.h> ++#include <string.h> ++#include <stdlib.h> ++#include <unistd.h> ++#include <errno.h> ++#include <math.h> ++#include <fcntl.h> ++#include <sys/wait.h> ++#include <sys/types.h> ++#include <time.h> ++#include <sys/resource.h> ++ ++typedef unsigned char uchar; ++typedef unsigned long ulong; ++typedef unsigned long long uvlong; ++typedef long long vlong; ++#endif ++ + #ifdef sgi + #include <stdarg.h> + #include <setjmp.h> diff --git a/lang/newsqueak/patches/patch-lib9_Makefile b/lang/newsqueak/patches/patch-lib9_Makefile new file mode 100644 index 00000000000..5e210f5873f --- /dev/null +++ b/lang/newsqueak/patches/patch-lib9_Makefile @@ -0,0 +1,22 @@ +$NetBSD: patch-lib9_Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Configure for pkgsrc. + +--- lib9/Makefile~ 2000-02-11 17:04:14.000000000 +0000 ++++ lib9/Makefile +@@ -15,12 +15,13 @@ INCLUDES=-I../include + + CFLAGS += $(INCLUDES) + +-CC=gcc ++CC?=gcc + + all: $(LIB) + + $(LIB): $(OFILES) +- ar r $(LIB) $(OFILES) ++ rm -f $(LIB) ++ $(AR) cq $(LIB) $(OFILES) + + clean: + rm -rf $(OFILES) diff --git a/lang/newsqueak/patches/patch-lib9_doprint.c b/lang/newsqueak/patches/patch-lib9_doprint.c new file mode 100644 index 00000000000..e25bcefdae1 --- /dev/null +++ b/lang/newsqueak/patches/patch-lib9_doprint.c @@ -0,0 +1,228 @@ +$NetBSD: patch-lib9_doprint.c,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Muck with fmtinstall to avoid doing undefined/illegal things with va_list. + +--- lib9/doprint.c~ 2000-02-11 17:04:14.000000000 +0000 ++++ lib9/doprint.c +@@ -32,21 +32,21 @@ struct Fmtalloc { + #endif + int convcount; + char index[MAXFMT]; +- int (*conv[MAXCONV])(va_list*, Fconv*); ++ int (*conv[MAXCONV])(struct va_wrap *, Fconv*); + }; + static struct Fmtalloc fmtalloc; + +-static int noconv(va_list*, Fconv*); +-static int flags(va_list*, Fconv*); ++static int noconv(struct va_wrap *, Fconv*); ++static int flags(struct va_wrap *, Fconv*); + +-static int cconv(va_list*, Fconv*); +-static int rconv(va_list*, Fconv*); +-static int sconv(va_list*, Fconv*); +-static int percent(va_list*, Fconv*); +-static int column(va_list*, Fconv*); ++static int cconv(struct va_wrap *, Fconv*); ++static int rconv(struct va_wrap *, Fconv*); ++static int sconv(struct va_wrap *, Fconv*); ++static int percent(struct va_wrap *, Fconv*); ++static int column(struct va_wrap *, Fconv*); + +-extern int numbconv(va_list*, Fconv*); +-extern int fltconv(va_list*, Fconv*); ++extern int numbconv(struct va_wrap *, Fconv*); ++extern int fltconv(struct va_wrap *, Fconv*); + + + static void +@@ -108,7 +108,7 @@ initfmt(void) + } + + int +-fmtinstall(int c, int (*f)(va_list*, Fconv*)) ++fmtinstall(int c, int (*f)(struct va_wrap *, Fconv*)) + { + + #ifdef LOCKS_AVAILABLE +@@ -165,6 +165,9 @@ doprint(char *s, char *es, const char *f + int n, c; + Rune rune; + Fconv local; ++ struct va_wrap argwrap; ++ ++ va_copy(argwrap.ap, argp); + + if(fmtalloc.convcount <= 0) + initfmt(); +@@ -252,7 +255,7 @@ l1: + goto l1; + } + if(c == '*') { +- n = va_arg(argp, int); ++ n = va_arg(argwrap.ap, int); + if(local.f1 == NONE) + local.f1 = n; + else +@@ -263,7 +266,7 @@ l1: + if(c >= 0 && c < MAXFMT) + n = fmtalloc.index[c]; + local.chr = c; +- n = (*fmtalloc.conv[n])(&argp, &local); ++ n = (*fmtalloc.conv[n])(&argwrap, &local); + if(n < 0) { + local.f3 |= -n; + goto l0; +@@ -272,7 +275,7 @@ l1: + } + + int +-numbconv(va_list *arg, Fconv *fp) ++numbconv(struct va_wrap *arg, Fconv *fp) + { + char s[IDIGIT]; + int i, f, n, b, ucase; +@@ -313,31 +316,31 @@ numbconv(va_list *arg, Fconv *fp) + f = 0; + switch(fp->f3 & (FVLONG|FLONG|FUNSIGN|FPOINTER)) { + case FVLONG|FLONG: +- vl = va_arg(*arg, vlong); ++ vl = va_arg(arg->ap, vlong); + break; + + case FUNSIGN|FVLONG|FLONG: +- vl = va_arg(*arg, uvlong); ++ vl = va_arg(arg->ap, uvlong); + break; + + case FUNSIGN|FPOINTER: +- v = (ulong)va_arg(*arg, void*); ++ v = (ulong)va_arg(arg->ap, void*); + break; + + case FLONG: +- v = va_arg(*arg, long); ++ v = va_arg(arg->ap, long); + break; + + case FUNSIGN|FLONG: +- v = va_arg(*arg, ulong); ++ v = va_arg(arg->ap, ulong); + break; + + default: +- v = va_arg(*arg, int); ++ v = va_arg(arg->ap, int); + break; + + case FUNSIGN: +- v = va_arg(*arg, unsigned); ++ v = va_arg(arg->ap, unsigned); + break; + } + if(fp->f3 & FVLONG) { +@@ -504,7 +507,7 @@ strconv(char *s, Fconv *fp) + } + + static int +-noconv(va_list *arg, Fconv *fp) ++noconv(struct va_wrap *arg, Fconv *fp) + { + char s[10]; + +@@ -520,7 +523,7 @@ noconv(va_list *arg, Fconv *fp) + } + + static int +-rconv(va_list *arg, Fconv *fp) ++rconv(struct va_wrap *arg, Fconv *fp) + { + char s[ERRLEN]; + +@@ -532,12 +535,12 @@ rconv(va_list *arg, Fconv *fp) + } + + static int +-cconv(va_list *arg, Fconv *fp) ++cconv(struct va_wrap *arg, Fconv *fp) + { + char s[10]; + Rune rune; + +- rune = va_arg(*arg, int); ++ rune = va_arg(arg->ap, int); + if(fp->chr == 'c') + rune &= 0xff; + s[runetochar(s, &rune)] = 0; +@@ -548,18 +551,18 @@ cconv(va_list *arg, Fconv *fp) + } + + static int +-sconv(va_list *arg, Fconv *fp) ++sconv(struct va_wrap *arg, Fconv *fp) + { + char *s; + Rune *r; + + if(fp->chr == 's') { +- s = va_arg(*arg, char*); ++ s = va_arg(arg->ap, char*); + if(s == 0) + s = "<null>"; + strconv(s, fp); + } else { +- r = va_arg(*arg, Rune*); ++ r = va_arg(arg->ap, Rune*); + if(r == 0) + r = (Rune *)"<n\0u\0l\0l\0>\0\0\0"; + Strconv(r, fp); +@@ -568,7 +571,7 @@ sconv(va_list *arg, Fconv *fp) + } + + static int +-percent(va_list *arg, Fconv *fp) ++percent(struct va_wrap *arg, Fconv *fp) + { + pchar('%', fp); + printcol++; +@@ -576,11 +579,11 @@ percent(va_list *arg, Fconv *fp) + } + + static int +-column(va_list *arg, Fconv *fp) ++column(struct va_wrap *arg, Fconv *fp) + { + int col, pc; + +- col = va_arg(*arg, int); ++ col = va_arg(arg->ap, int); + while(printcol < col) { + pc = (printcol+8) & ~7; + if(pc <= col) { +@@ -595,7 +598,7 @@ column(va_list *arg, Fconv *fp) + } + + static int +-flags(va_list *arg, Fconv *fp) ++flags(struct va_wrap *arg, Fconv *fp) + { + int f; + +@@ -627,7 +630,7 @@ flags(va_list *arg, Fconv *fp) + } + + int +-fltconv(va_list *arg, Fconv *fp) ++fltconv(struct va_wrap *arg, Fconv *fp) + { + char s1[FDIGIT+10], s2[FDIGIT+10]; + double f, g, h; +@@ -637,7 +640,7 @@ fltconv(va_list *arg, Fconv *fp) + f2 = fp->f2; + fp->f2 = NONE; + +- f = va_arg(*arg, double); ++ f = va_arg(arg->ap, double); + if(isNaN(f)){ + strconv("NaN", fp); + return 0; diff --git a/lang/newsqueak/patches/patch-lib9_nan.c b/lang/newsqueak/patches/patch-lib9_nan.c new file mode 100644 index 00000000000..591981c90a4 --- /dev/null +++ b/lang/newsqueak/patches/patch-lib9_nan.c @@ -0,0 +1,42 @@ +$NetBSD: patch-lib9_nan.c,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +"long" isn't necessarily 32 bits wide. + +--- lib9/nan.c~ 2000-02-11 17:04:14.000000000 +0000 ++++ lib9/nan.c +@@ -16,7 +16,7 @@ NaN(void) + union + { + double d; +- long x[2]; ++ uint32_t x[2]; + } a; + + a.x[1] = NANEXP; +@@ -30,7 +30,7 @@ isNaN(double d) + union + { + double d; +- long x[2]; ++ uint32_t x[2]; + } a; + + a.d = d; +@@ -45,7 +45,7 @@ Inf(int sign) + union + { + double d; +- long x[2]; ++ uint32_t x[2]; + } a; + + a.x[1] = NANEXP; +@@ -61,7 +61,7 @@ isInf(double d, int sign) + union + { + double d; +- long x[2]; ++ uint32_t x[2]; + } a; + + a.d = d; diff --git a/lang/newsqueak/patches/patch-lib9_wait.c b/lang/newsqueak/patches/patch-lib9_wait.c new file mode 100644 index 00000000000..faade054e1d --- /dev/null +++ b/lang/newsqueak/patches/patch-lib9_wait.c @@ -0,0 +1,15 @@ +$NetBSD: patch-lib9_wait.c,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Remove bogus extra include. + +--- lib9/wait.c~ 2000-02-11 17:04:15.000000000 +0000 ++++ lib9/wait.c +@@ -5,8 +5,6 @@ + #include <sys/resource.h> + #include <sys/wait.h> + +-#include "/usr/include/sys/wait.h" +- + int + __waitcommon(int pid, int status, struct rusage *rusage, Waitmsg *w) { + long utime, stime; diff --git a/lang/newsqueak/patches/patch-libbio_Makefile b/lang/newsqueak/patches/patch-libbio_Makefile new file mode 100644 index 00000000000..2e1b7cfe350 --- /dev/null +++ b/lang/newsqueak/patches/patch-libbio_Makefile @@ -0,0 +1,34 @@ +$NetBSD: patch-libbio_Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Configure for pkgsrc; honor CC and AR. +Remove some wrong dangling references. + +--- libbio/Makefile.orig 2000-02-11 17:04:17.000000000 +0000 ++++ libbio/Makefile +@@ -17,19 +17,22 @@ OFILES=\ + bseek.o\ + bwrite.o\ + +-HFILES=/sys/include/bio.h ++#HFILES=/sys/include/bio.h + + INCLUDES=-I../include + + CFLAGS += $(INCLUDES) + +-CC=gcc ++CC?=gcc ++ ++all: $(LIB) + + $(LIB): $(OFILES) +- ar r $(LIB) $(OFILES) ++ rm -f $(LIB) ++ $(AR) cq $(LIB) $(OFILES) + + clean: +- rm -rf $(TARG) $(OFILES) ++ rm -rf $(OFILES) + + world:; make depend; make $(LIB) + diff --git a/lang/newsqueak/patches/patch-squint_Makefile b/lang/newsqueak/patches/patch-squint_Makefile new file mode 100644 index 00000000000..ddf637ba580 --- /dev/null +++ b/lang/newsqueak/patches/patch-squint_Makefile @@ -0,0 +1,60 @@ +$NetBSD: patch-squint_Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Configure for pkgsrc; honor LDFLAGS, CC, and YACC. +Add explicit "all" target to simplify parent makefile. +Don't require that . is in $PATH. +Prune trailing tab line in make recipe. + +--- squint/Makefile.orig 2000-02-11 17:04:38.000000000 +0000 ++++ squint/Makefile +@@ -2,10 +2,10 @@ TARG = squint + INCLUDES = -I../include + LIBDIR = ../lib + LIBS9 = -lbio -l9 +-LIBS = $(LIBS9) -lm +-LDFLAGS = -L$(LIBDIR) +-CC = gcc +-LD = gcc ++LIBS += $(LIBS9) -lm ++LDFLAGS += -L$(LIBDIR) ++CC ?= gcc ++CCLD ?= $(CC) + + CFLAGS += $(INCLUDES) + +@@ -22,11 +22,13 @@ LIBO=libio.o liblib.o + + OFILES = $(FO) $(CO) $(SO) $(LIBO) + ++all: $(TARG) ++ + $(TARG): $(FO) $(CO) $(SO) $(LIBO) $(LIBDIR)/*.a +- $(LD) $(LDFLAGS) -o $@ $(FO) $(CO) $(SO) $(LIBO) $(LIBS) ++ $(CCLD) $(LDFLAGS) -o $@ $(FO) $(CO) $(SO) $(LIBO) $(LIBS) + + y.tab.h squint.c: squint.y +- yacc -d squint.y ++ $(YACC) -d squint.y + mv y.tab.c squint.c + + ydefs.h: y.tab.h +@@ -36,8 +38,8 @@ slib.h: sliblib.h slibio.h + cat $< > slib.h + + nodenames.h typenames.h: node.h enumtoname +- enumtoname Ntype < node.h > nodenames.h +- enumtoname Ttype < node.h > typenames.h ++ ./enumtoname Ntype < node.h > nodenames.h ++ ./enumtoname Ttype < node.h > typenames.h + + inst.h insttab.h: inst + ( echo 'typedef enum Inst{' ; \ +@@ -52,7 +54,7 @@ inst.h insttab.h: inst + sed 's/.\(.*\)/ {i\1, "&"},/' inst ; \ + echo '};' ; \ + ) > insttab.h +- ++ + inst: $(CODE) + cat $(CODE) | grep '^i.*(Proc \*proc)' | sed 's/^i/I/; s/(.*//; s/.*/&/' | sort > ninst + cmp -s inst ninst || mv ninst inst diff --git a/lang/newsqueak/patches/patch-squint_compile.c b/lang/newsqueak/patches/patch-squint_compile.c new file mode 100644 index 00000000000..26c0b759a16 --- /dev/null +++ b/lang/newsqueak/patches/patch-squint_compile.c @@ -0,0 +1,15 @@ +$NetBSD: patch-squint_compile.c,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Avoid naming conflict with standard C. + +--- squint/compile.c~ 2000-02-11 17:04:43.000000000 +0000 ++++ squint/compile.c +@@ -228,7 +228,7 @@ gen(Node *n, int retain) + case PRINT: + gen(n->l, 1); + printgen(n->l); +- emit(Isprint); ++ emit(Isprint_); + if(!retain) + emit(Iprint); + return; diff --git a/lang/newsqueak/patches/patch-squint_error.c b/lang/newsqueak/patches/patch-squint_error.c new file mode 100644 index 00000000000..5a622b9412f --- /dev/null +++ b/lang/newsqueak/patches/patch-squint_error.c @@ -0,0 +1,79 @@ +$NetBSD: patch-squint_error.c,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Muck with fmtinstall to avoid doing undefined/illegal things with va_list. + +--- squint/error.c~ 2000-02-11 17:04:40.000000000 +0000 ++++ squint/error.c +@@ -108,11 +108,11 @@ rpanic(char *s, ...) + } + + int +-bconv(va_list *va, Fconv *f) ++bconv(struct va_wrap *va, Fconv *f) + { + int o; + extern int printcol; +- o = va_arg(*va, int); ++ o = va_arg(va->ap, int); + while(printcol<o-8) + strconv("\t", f); + strconv(" "+(8-(o-printcol)), f); +@@ -120,12 +120,12 @@ bconv(va_list *va, Fconv *f) + } + + int +-nconv(va_list *va, Fconv *f) ++nconv(struct va_wrap *va, Fconv *f) + { + Node *n; + int t; + char buf[32]; +- n = va_arg(*va, Node*); ++ n = va_arg(va->ap, Node*); + t = n->t; + if(t<0 || sizeof(Ntypename)/sizeof(Ntypename[0])<=t){ + sprint(buf, "mystery node(%d)", t); +@@ -136,12 +136,12 @@ nconv(va_list *va, Fconv *f) + } + + int +-tconv(va_list *va, Fconv *f) ++tconv(struct va_wrap *va, Fconv *f) + { + int t; + char buf[1024]; + Node *n; +- n = va_arg(*va, Node*); ++ n = va_arg(va->ap, Node*); + t = n->o.t; + if(t<0 || sizeof(Ttypename)/sizeof(Ttypename[0])<=t){ + sprint(buf, "mystery type(%d)", t); +@@ -156,12 +156,12 @@ tconv(va_list *va, Fconv *f) + } + + int +-econv(va_list *va, Fconv *f) ++econv(struct va_wrap *va, Fconv *f) + { + char buf[16], *x; + int t; + Node *n; +- n = va_arg(*va, Node*); ++ n = va_arg(va->ap, Node*); + t = n->o.i; + if(t<128 && strchr("+-*/%|&^~?!><=", t)){ + sprint(buf, "%c", t); +@@ -232,11 +232,11 @@ econv(va_list *va, Fconv *f) + } + + int +-mconv(va_list *va, Fconv *f) ++mconv(struct va_wrap *va, Fconv *f) + { + char buf[4096]; + Node *n; +- n = va_arg(*va, Node*); ++ n = va_arg(va->ap, Node*); + switch(n->t){ + case NID: + strcpy(buf, n->o.s->name); diff --git a/lang/newsqueak/patches/patch-squint_inst b/lang/newsqueak/patches/patch-squint_inst new file mode 100644 index 00000000000..a343aeb4ad4 --- /dev/null +++ b/lang/newsqueak/patches/patch-squint_inst @@ -0,0 +1,15 @@ +$NetBSD: patch-squint_inst,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Avoid naming conflict with standard C. + +--- squint/inst~ 2000-02-11 17:04:34.000000000 +0000 ++++ squint/inst +@@ -95,7 +95,7 @@ Iret + Irsh + Isnd + Isndptr +-Isprint ++Isprint_ + Istore + Istoreary + Istoreauto diff --git a/lang/newsqueak/patches/patch-squint_lex.c b/lang/newsqueak/patches/patch-squint_lex.c new file mode 100644 index 00000000000..5dcfbc5944c --- /dev/null +++ b/lang/newsqueak/patches/patch-squint_lex.c @@ -0,0 +1,33 @@ +$NetBSD: patch-squint_lex.c,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Use $PREFIX instead of Rob's homedir. +Muck with fmtinstall to avoid doing undefined/illegal things with va_list. + +--- squint/lex.c.orig 2000-02-11 17:04:41.000000000 +0000 ++++ squint/lex.c +@@ -349,7 +349,7 @@ newfile(char *s, int stdin) + char buf[1024]; + fd=open(s, 0); + if(fd<0 && s[0]!='/' && s[0]!='.'){ +- sprint(buf, "/usr/rob/src/squint/include/%s", s); ++ sprint(buf, PREFIX "/share/squint/include/%s", s); + fd=open(buf, 0); + } + if(fd<0) +@@ -381,14 +381,14 @@ printfileline(char *buf, File *f, int l, + } + + int +-zconv(va_list *va, Fconv *f) ++zconv(struct va_wrap *va, Fconv *f) + { + int o; + char buf[4096]; + + SET(o); + if(f->chr == 'Z') +- o = va_arg(*va, int); ++ o = va_arg(va->ap, int); + if(initializing) + strcpy(buf, "squint: "); + else{ diff --git a/lang/newsqueak/patches/patch-squint_main.c b/lang/newsqueak/patches/patch-squint_main.c new file mode 100644 index 00000000000..0c55752d2d5 --- /dev/null +++ b/lang/newsqueak/patches/patch-squint_main.c @@ -0,0 +1,33 @@ +$NetBSD: patch-squint_main.c,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Muck with fmtinstall to avoid doing undefined/illegal things with va_list. + +--- squint/main.c~ 2000-02-11 17:04:43.000000000 +0000 ++++ squint/main.c +@@ -4,16 +4,16 @@ + #include <bio.h> + #include "fns.h" + +-extern int bconv(va_list *, Fconv*); +-extern int econv(va_list *, Fconv*); +-extern int iconv(va_list *, Fconv*); +-extern int mconv(va_list *, Fconv*); +-extern int nconv(va_list *, Fconv*); +-extern int tconv(va_list *, Fconv*); +-extern int Aconv(va_list *, Fconv*); +-extern int Cconv(va_list *, Fconv*); +-extern int Uconv(va_list *, Fconv*); +-extern int zconv(va_list *, Fconv*); ++extern int bconv(struct va_wrap *, Fconv*); ++extern int econv(struct va_wrap *, Fconv*); ++extern int iconv(struct va_wrap *, Fconv*); ++extern int mconv(struct va_wrap *, Fconv*); ++extern int nconv(struct va_wrap *, Fconv*); ++extern int tconv(struct va_wrap *, Fconv*); ++extern int Aconv(struct va_wrap *, Fconv*); ++extern int Cconv(struct va_wrap *, Fconv*); ++extern int Uconv(struct va_wrap *, Fconv*); ++extern int zconv(struct va_wrap *, Fconv*); + + int bflag; + int cflag; diff --git a/lang/newsqueak/patches/patch-squint_proc.c b/lang/newsqueak/patches/patch-squint_proc.c new file mode 100644 index 00000000000..ffe97439a84 --- /dev/null +++ b/lang/newsqueak/patches/patch-squint_proc.c @@ -0,0 +1,44 @@ +$NetBSD: patch-squint_proc.c,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Muck with fmtinstall to avoid doing undefined/illegal things with va_list. + +--- squint/proc.c~ 2000-02-11 17:04:40.000000000 +0000 ++++ squint/proc.c +@@ -468,12 +468,12 @@ stacktrace(Proc *p) + } + + int +-Aconv(va_list *va, Fconv *f) ++Aconv(struct va_wrap *va, Fconv *f) + { + int i, n; + Store *s; + char buf[32]; +- s = va_arg(*va, Store*); ++ s = va_arg(va->ap, Store*); + n=s->len; + if(n>4) + n=4; +@@ -490,11 +490,11 @@ Aconv(va_list *va, Fconv *f) + } + + int +-Cconv(va_list *va, Fconv *f) ++Cconv(struct va_wrap *va, Fconv *f) + { + Store *s; + +- s = va_arg(*va, Store*); ++ s = va_arg(va->ap, Store*); + if(s->len>128){ + strconv("\"very long string\"", f); + return sizeof(long); +@@ -506,7 +506,7 @@ Cconv(va_list *va, Fconv *f) + } + + int +-Uconv(va_list *va, Fconv *f) ++Uconv(struct va_wrap *va, Fconv *f) + { + USED(va); + strconv("unit", f); diff --git a/lang/newsqueak/patches/patch-squint_progs_npowser b/lang/newsqueak/patches/patch-squint_progs_npowser new file mode 100644 index 00000000000..2f17270a291 --- /dev/null +++ b/lang/newsqueak/patches/patch-squint_progs_npowser @@ -0,0 +1,15 @@ +$NetBSD: patch-squint_progs_npowser,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +remove another reference to Rob's homedir + +--- squint/progs/npowser~ 2000-02-11 17:04:28.000000000 +0000 ++++ squint/progs/npowser +@@ -7,7 +7,7 @@ type rat: struct of { + }; + type item:rat; + +-include "/usr/rob/src/squint/progs/drat" ++include "progs/drat" + + type PS: dch; # power series + type PS2: array[2] of dch; # pair of power series diff --git a/lang/newsqueak/patches/patch-squint_var.c b/lang/newsqueak/patches/patch-squint_var.c new file mode 100644 index 00000000000..0dfcea27cff --- /dev/null +++ b/lang/newsqueak/patches/patch-squint_var.c @@ -0,0 +1,15 @@ +$NetBSD: patch-squint_var.c,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Avoid naming conflict with standard C. + +--- squint/var.c~ 2000-02-11 17:04:38.000000000 +0000 ++++ squint/var.c +@@ -567,7 +567,7 @@ idel(Proc *proc) + */ + + int +-isprint(Proc *proc) ++isprint_(Proc *proc) + { + Store *s; + s=emalloc(SHSZ+proc->nprbuf+1); diff --git a/lang/newsqueak/patches/patch-squint_xec.c b/lang/newsqueak/patches/patch-squint_xec.c new file mode 100644 index 00000000000..93e44070f8c --- /dev/null +++ b/lang/newsqueak/patches/patch-squint_xec.c @@ -0,0 +1,22 @@ +$NetBSD: patch-squint_xec.c,v 1.1 2015/04/25 19:58:32 dholland Exp $ + +Muck with fmtinstall to avoid doing undefined/illegal things with va_list. + +--- squint/xec.c~ 2000-02-11 17:04:43.000000000 +0000 ++++ squint/xec.c +@@ -21,13 +21,13 @@ void xec(void); + void xxec(void); + + int +-iconv(va_list *va, Fconv *f) ++iconv(struct va_wrap *va, Fconv *f) + { + int i; + char buf[16]; + void *o; /* really int (**o)(Proc*) */ + +- o = va_arg(*va, void*); ++ o = va_arg(va->ap, void*); + for(i=0; i<NInst; i++) + if((void*)insttab[i].fp==o){ + strconv(insttab[i].name, f); |