diff options
author | jtb <jtb@pkgsrc.org> | 2001-01-31 07:30:25 +0000 |
---|---|---|
committer | jtb <jtb@pkgsrc.org> | 2001-01-31 07:30:25 +0000 |
commit | 504be27e54c1e6c3e5bf5436d29aa3745e39c285 (patch) | |
tree | 890d5ebda45674c4ef0805bf013282a22b103e08 /math/rlab/patches | |
parent | 6accc2546260ac007ec58a9f0e1431330eed5e86 (diff) | |
download | pkgsrc-504be27e54c1e6c3e5bf5436d29aa3745e39c285.tar.gz |
Initial import of Rlab:
Interactive, interpreted scientific programming environment
Diffstat (limited to 'math/rlab/patches')
-rw-r--r-- | math/rlab/patches/patch-aa | 114 | ||||
-rw-r--r-- | math/rlab/patches/patch-ab | 372 | ||||
-rw-r--r-- | math/rlab/patches/patch-ac | 13 | ||||
-rw-r--r-- | math/rlab/patches/patch-ad | 10 | ||||
-rw-r--r-- | math/rlab/patches/patch-ae | 10 | ||||
-rw-r--r-- | math/rlab/patches/patch-af | 216 | ||||
-rw-r--r-- | math/rlab/patches/patch-ag | 572 | ||||
-rw-r--r-- | math/rlab/patches/patch-ah | 737 | ||||
-rw-r--r-- | math/rlab/patches/patch-ai | 181 | ||||
-rw-r--r-- | math/rlab/patches/patch-aj | 13 | ||||
-rw-r--r-- | math/rlab/patches/patch-ak | 22 | ||||
-rw-r--r-- | math/rlab/patches/patch-al | 28 |
12 files changed, 2288 insertions, 0 deletions
diff --git a/math/rlab/patches/patch-aa b/math/rlab/patches/patch-aa new file mode 100644 index 00000000000..fc8d911f38d --- /dev/null +++ b/math/rlab/patches/patch-aa @@ -0,0 +1,114 @@ +$NetBSD: patch-aa,v 1.1.1.1 2001/01/31 07:30:38 jtb Exp $ + +--- configure.in.orig Fri Dec 17 16:01:06 1999 ++++ configure.in +@@ -284,7 +284,7 @@ + ar r libfitest_f.a fitest_f.o + OLD_LIBS="$LIBS" + LIBS="-L. -lfitest_f" +- CFLAGS="-DUSE_UPPER" ++ CFLAGS="$CFLAGS -DUSE_UPPER" + ] + + AC_TRY_RUN([#include "fitest.h" +@@ -298,7 +298,7 @@ + [F77CONV="no"]) + + [ if test "$F77CONV" = "no" ; then +- CFLAGS="-DUSE_F2C" ] ++ CFLAGS="$CFLAGS -DUSE_F2C" ] + AC_TRY_RUN([#include "fitest.h" + main() + { +@@ -311,7 +311,7 @@ + [ fi ] + + [ if test "$F77CONV" = "no" ; then +- CFLAGS="-DUSE_LOWER" ] ++ CFLAGS="$CFLAGS -DUSE_LOWER" ] + AC_TRY_RUN([#include "fitest.h" + main() + { +@@ -324,7 +324,7 @@ + [ fi ] + + [ if test "$F77CONV" = "no" ; then +- CFLAGS="-DUSE_FRONT" ] ++ CFLAGS="$CFLAGS -DUSE_FRONT" ] + AC_TRY_RUN([#include "fitest.h" + main() + { +@@ -524,7 +524,7 @@ + if test -z "$x_libraries" ; then + xlibdir="" + else +- xlibdir="-L$x_libraries" ++ xlibdir="-Wl,-R$x_libraries -L$x_libraries" + fi + + X11LIB="$xlibdir -lX11" +@@ -561,6 +561,16 @@ + dnl Check for specification of Plplot directory root + dnl + ++AC_ARG_WITH(tcl, [ --with-tcl location of Tcl], ++[ ++ TCLLIB="-Wl,-R$withval/lib -L$withval/lib -ltcl83" ++]) ++ ++AC_ARG_WITH(tk, [ --with-tk location of Tk], ++[ ++ TKLIB="-Wl,-R$withval/lib -L$withval/lib -ltk83" ++]) ++ + AC_ARG_WITH(plplot, [ --with-plplot use Plplot], + [ + if test -n "$PLOT_PROG" ; then +@@ -573,10 +583,10 @@ + fi + + PLOT_PROG="plplot" +- PLIB_DIR=-L$withval ++ PLIB_DIR=-L$withval/lib + PLOT_DIR="$withval" +- PLIB_INC_DIR="-I$withval" +- PLIBS="-L$withval -lplplotdX $X11LIB" ++ PLIB_INC_DIR=-I$withval/include ++ PLIBS="-L$withval/lib/plplot -lplplotd -lplmatrix $TKLIB $TCLLIB $X11LIB" + ]) + + dnl ------------------------------------------------------------------ +@@ -648,14 +658,17 @@ + dnl then setup for GC. The default action (nothing is specified) is to + dnl configure for GC. + +-AC_ARG_ENABLE(GC, +- [ --disable-GC disable use of the Garbage-Collector], +- [if test "$enableval" = "yes" ; then +- AC_DEFINE(HAVE_GC) [LIBGC="../gc/gc.a"; +- IGC="-I./gc"] +- fi], +- [AC_DEFINE(HAVE_GC) [LIBGC="./gc/gc.a"; +- IGC="-I./gc"]]) ++AC_ARG_WITH(GC, ++ [ --with-GC use the Garbage-Collector], ++ [if test "$withval" = "yes" ; then ++ echo "ERROR! must specify Garbage-Collector installation directory." ++ exit 1; ++ fi ++ AC_DEFINE(HAVE_GC) ++ LIBGC="-L$withval/lib -lgc" ++ IGC="-I$withval/include -I./gc" ++]) ++ + dnl ------------------------------------------------------------------ + + AC_TRY_LINK([#include <stdio.h>], +@@ -738,6 +751,7 @@ + AC_SUBST(PAGER) + AC_SUBST(CFLAGS) + AC_SUBST(FFLAGS) ++AC_SUBST(LDLAGS) + AC_SUBST(EXFLAGS) + AC_SUBST(C_SH_FLAGS) + AC_SUBST(F_SH_FLAGS) diff --git a/math/rlab/patches/patch-ab b/math/rlab/patches/patch-ab new file mode 100644 index 00000000000..0faafa28ff4 --- /dev/null +++ b/math/rlab/patches/patch-ab @@ -0,0 +1,372 @@ +$NetBSD: patch-ab,v 1.1.1.1 2001/01/31 07:30:37 jtb Exp $ + +--- Makefile.in.orig Fri Apr 30 14:32:04 1999 ++++ Makefile.in +@@ -99,14 +99,14 @@ + # -lfftpack FFTPACK library (double precision version) + # -lranlib RANLIB (random number generation) + # +-LAPACK = ./flibs/lapack/liblapack.a +-LAPACK_LIB = -L./flibs/lapack -llapack ++LAPACK = ./flibs/lapack/liblapackrlab.a ++LAPACK_LIB = -L./flibs/lapack -llapackrlab + +-BLAS = ./flibs/blas/libblas.a +-BLAS_LIB = -L./flibs/blas -lblas ++BLAS = ./flibs/blas/libblasrlab.a ++BLAS_LIB = -L./flibs/blas -lblasrlab + +-FFTPACK = ./flibs/fftpack/libfftpack.a +-FFTPACK_LIB = -L./flibs/fftpack -lfftpack ++FFTPACK = ./flibs/fftpack/libfftpackrlab.a ++FFTPACK_LIB = -L./flibs/fftpack -lfftpackrlab + + Ranlib = ./flibs/ranlib/src/libranlib.a + RANLIB_LIB = -L./flibs/ranlib/src -lranlib +@@ -236,7 +236,7 @@ + SRC = $(R_SRC) $(F_SRC) $(EXTRA_SRC) $(GNU_SRC) $(CMD_SRC) + OBJ = $(R_OBJ) $(F_OBJ) $(EXTRA_OBJ) $(GNU_OBJ) $(CMD_OBJ) + +-all: gc libs rlab ++all: libs rlab + + libs: $(LAPACK) $(BLAS) $(FFTPACK) $(Ranlib) $(Minpack) + +@@ -268,7 +268,7 @@ + + rlab: $(OBJ) + $(F77) $(EXFLAGS) $(CFLAGS) $(DEFS) $(SPECIAL_FLAGS) \ +- $(OBJ) $(R_LIBS) $(PLOT_LIBS) -o rlab ++ $(OBJ) $(LDFLAGS) $(R_LIBS) $(PLOT_LIBS) -o rlab + + # + # Ignore these unless you know what CodeTEST Native for Solaris is. +@@ -301,51 +301,72 @@ + COPYDIR = rlib toolbox controls-toolbox doc examples .rlab config.h test.r \ + test.getline test.input Makefile + +-install: rlab mkdir +- -if [ `/bin/pwd` != `(cd ${TOPDIR}; /bin/pwd)` ] ; then \ +- tar cf - ${COPYDIR} [A-Z]* | (cd ${TOPDIR}; umask 022; tar xf - ) ;\ +- fi +- if test "$(PLOT_PROG)" = "plplot" ; then\ +- cp misc/plplot.r ${TOPDIR}/rlib/plot.r;\ +- cd misc/plhelp; tar cf - . | (cd ${RHELPDIR}; umask 022; tar xf - ) ;\ +- fi +- if test "$(PLOT_PROG)" = "pgplot" ; then\ +- cp misc/pgplot.r ${TOPDIR}/rlib/plot.r;\ +- cd misc/pghelp; tar cf - . | (cd ${RHELPDIR}; umask 022; tar xf - ) ;\ ++install: rlab ++ $(BSD_INSTALL_DATA_DIR) $(prefix)/share/rlab ++ $(BSD_INSTALL_DATA) $(buildir)/.rlab $(prefix)/share/rlab ++ $(BSD_INSTALL_DATA_DIR) $(prefix)/share/rlab/rlib ++ @for f in $(buildir)/rlib/*; do \ ++ i="$(BSD_INSTALL_DATA) $$f $(prefix)/share/rlab/rlib/"; \ ++ echo $$i; $$i; \ ++ done ++ $(BSD_INSTALL_DATA_DIR) $(prefix)/share/rlab/toolbox ++ @for f in $(buildir)/toolbox/*; do \ ++ i="$(BSD_INSTALL_DATA) $$f $(prefix)/share/rlab/toolbox/"; \ ++ echo $$i; $$i; \ ++ done ++ $(BSD_INSTALL_DATA_DIR) $(prefix)/share/rlab/controls-toolbox ++ @for f in $(buildir)/controls-toolbox/*; do \ ++ i="$(BSD_INSTALL_DATA) $$f $(prefix)/share/rlab/controls-toolbox/"; \ ++ echo $$i; $$i; \ ++ done ++ $(BSD_INSTALL_DATA_DIR) $(prefix)/share/rlab/help ++ @for f in $(buildir)/doc/help/*; do \ ++ i="$(BSD_INSTALL_DATA) $$f $(prefix)/share/rlab/help/"; \ ++ echo $$i; $$i; \ ++ done ++ $(BSD_INSTALL_DATA_DIR) $(prefix)/share/rlab/examples ++ @for f in $(buildir)/examples/* $(buildir)/test.*; do \ ++ i="$(BSD_INSTALL_DATA) $$f $(prefix)/share/rlab/examples/"; \ ++ echo $$i; $$i; \ ++ done ++ $(BSD_INSTALL_DATA_DIR) $(prefix)/share/doc/rlab ++ $(BSD_INSTALL_DATA) $(buildir)/doc/rlab-ref.ps $(prefix)/share/doc/rlab ++ @for f in BUGS PROBLEMS README.Metis README.PGRAF \ ++ README.PLPLOT README.SPARSE TODO WHATS.NEW; do \ ++ i="$(BSD_INSTALL_DATA) $(buildir)/$$f $(prefix)/share/doc/rlab/"; \ ++ echo $$i; $$i; \ ++ done ++ $(BSD_INSTALL_DATA_DIR) $(prefix)/share/doc/html/rlab ++ @for f in $(buildir)/doc/html/*; do \ ++ i="$(BSD_INSTALL_DATA) $$f $(prefix)/share/doc/html/rlab/"; \ ++ echo $$i; $$i; \ ++ done ++ if test "$(PLOT_PROG)" = "plplot" ; then \ ++ $(BSD_INSTALL_DATA) $(buildir)/misc/plplot.r $(prefix)/share/rlab/rlib/plot.r;\ ++ for f in $(buildir)/misc/plhelp/*; do \ ++ i="$(BSD_INSTALL_DATA) $$f $(prefix)/share/rlab/help/"; \ ++ echo $$i; $$i; \ ++ done \ + fi + if test "$(PLOT_PROG)" = "gnuplot" ; then\ +- cp misc/gnuplot.r ${TOPDIR}/rlib/plot.r;\ +- cp misc/gp-compat.r ${TOPDIR}/rlib/gp-compat.r;\ +- cd misc/gnuplothelp; tar cf - . | (cd ${RHELPDIR}; umask 022; tar xf - ) ;\ ++ $(BSD_INSTALL_DATA) $(buildir)/misc/gnuplot.r $(prefix)/share/rlab/rlib/plot.r;\ ++ $(BSD_INSTALL_DATA) $(buildir)/misc/gp-compat.r $(prefix)/share/rlab/rlib/gp-compat.r;\ ++ for f in $(buildir)/misc/gnuplothelp/*; do \ ++ i="$(BSD_INSTALL_DATA) $$f $(prefix)/share/rlab/help/"; \ ++ echo $$i; $$i; \ ++ done \ + fi + if test "$(PLOT_PROG)" = "plotmtv" ; then\ +- cp misc/plotmtv.r ${TOPDIR}/rlib/plotmtv.r;\ +- fi +- $(INSTALL_PROGRAM) rlab $(bindir)/rlab-$(VER) +- if test -x "$(bindir)/rlab2" ; then\ +- rm -f $(bindir)/rlab2;\ ++ $(BSD_INSTALL_DATA) $(buildir)/misc/plotmtv.r $(prefix)/share/rlab/rlib/;\ + fi ++ $(BSD_INSTALL_PROGRAM) $(buildir)/rlab $(bindir)/rlab-$(VER) + sed 's@rlab_exec_prefix@$(exec_prefix)@' ./misc/rlab > ./misc/rlab.tmp.0 + sed 's@rlab_ver_string@$(VER)@' ./misc/rlab.tmp.0 > ./misc/rlab.tmp.1 + sed 's@plot_dir@$(PLOT_DIR)@' ./misc/rlab.tmp.1 > ./misc/rlab.tmp.2 + sed 's@plot_prog@$(PLOT_PROG)@' ./misc/rlab.tmp.2 > ./misc/rlab2 + rm -f ./misc/rlab.tmp.0 ./misc/rlab.tmp.1 ./misc/rlab.tmp.2 +- $(INSTALL_PROGRAM) ./misc/rlab2 $(bindir)/rlab2 +- if test "$(LN)" = "ln" ; then\ +- @echo "RECOMMENDED YOU MV $(TOPDIR) to $(libdir)/rlab2";\ +- fi +- if test "$(LN)" = "ln -s" ; then\ +- if test -r "$(libdir)/rlab2" ; then\ +- mv $(libdir)/rlab2 $(libdir)/rlab2.old;\ +- fi;\ +- cd $(libdir); $(LN) ./rlab-$(VER) ./rlab2;\ +- fi +- cd $(buildir); $(INSTALL) doc/rlab2.1 $(mandir)/rlab2.1 +- +-mkdir: +- -mkdir $(exec_prefix) $(bindir) $(libdir) $(mand) \ +- $(mandir) $(TOPDIR) $(RLIBDIR) $(DOCDIR) \ +- $(RHELPDIR) $(TOOLBOX) $(CTOOLBOX) ++ $(BSD_INSTALL_SCRIPT) $(buildir)/misc/rlab2 $(bindir)/rlab2 ++ $(BSD_INSTALL_MAN) $(buildir)/doc/rlab2.1 $(mandir) + + FRC: + +@@ -526,22 +547,23 @@ + # + + main.o: main.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h code.h list.h symbol.h util.h rfile.h rfileio.h mdc.h \ +- complex.h bltin.h version.h getopt.h class.h bltin1.h bltin2.h \ +- bltin3.h msr.h rfft.h gc/gc_private.h gc/gc_priv.h gc/config.h \ ++ mem.h /usr/pkg/include/gc.h code.h list.h symbol.h util.h rfile.h \ ++ rfileio.h mdc.h complex.h bltin.h version.h getopt.h class.h bltin1.h \ ++ bltin2.h bltin3.h msr.h rfft.h gc/gc_priv.h gc/gcconfig.h \ + gc/gc_hdrs.h fpe.h mathl.h + init.o: init.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ + symbol.h list.h util.h print.h bltin.h bltin1.h bltin2.h bltin3.h \ + msr.h rfft.h rfileio.h mdc.h complex.h rdl.h msrf2.h + code.o: code.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- code.h list.h symbol.h class.h mem.h gc/gc.h y.tab.h bltin.h \ +- function.h util.h rfile.h mdc.h complex.h ++ code.h list.h symbol.h class.h mem.h /usr/pkg/include/gc.h y.tab.h \ ++ bltin.h function.h util.h rfile.h mdc.h complex.h + symbol.o: symbol.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h symbol.h list.h mem.h gc/gc.h function.h util.h ++ listnode.h symbol.h list.h mem.h /usr/pkg/include/gc.h function.h \ ++ util.h + list.o: list.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- util.h list.h mem.h gc/gc.h ++ util.h list.h mem.h /usr/pkg/include/gc.h + listnode.o: listnode.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h mem.h gc/gc.h util.h list.h ++ listnode.h mem.h /usr/pkg/include/gc.h util.h list.h + op.o: op.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h code.h \ + list.h symbol.h class.h util.h + opapp.o: opapp.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +@@ -551,118 +573,124 @@ + complex.o: complex.c complex.h rlab.h config.h ent.h mds.h mdr.h \ + btree.h listnode.h util.h list.h mathl.h + function.o: function.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h code.h list.h symbol.h function.h util.h mem.h gc/gc.h ++ listnode.h code.h list.h symbol.h function.h util.h mem.h \ ++ /usr/pkg/include/gc.h + rel.o: rel.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ + code.h list.h symbol.h class.h util.h + util.o: util.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- code.h list.h symbol.h mem.h gc/gc.h bltin.h mdc.h complex.h \ +- function.h sort.h fpe.h ++ code.h list.h symbol.h mem.h /usr/pkg/include/gc.h bltin.h mdc.h \ ++ complex.h function.h sort.h fpe.h + btree.o: btree.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- class.h symbol.h list.h function.h util.h mem.h gc/gc.h ++ class.h symbol.h list.h function.h util.h mem.h /usr/pkg/include/gc.h + mm.o: mm.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ + complex.h + misc.o: misc.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h + fpe.o: fpe.c config.h + ent.o: ent.c ent.h mds.h rlab.h config.h listnode.h mdr.h btree.h \ +- class.h mem.h gc/gc.h util.h list.h ++ class.h mem.h /usr/pkg/include/gc.h util.h list.h + mathl.o: mathl.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ + mathl.h complex.h util.h list.h + rfileio.o: rfileio.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h class.h symbol.h list.h bltin.h mem.h gc/gc.h util.h mdc.h \ +- complex.h msr.h msc.h mathl.h ++ listnode.h class.h symbol.h list.h bltin.h mem.h \ ++ /usr/pkg/include/gc.h util.h mdc.h complex.h msr.h msc.h mathl.h + mdr.o: mdr.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h mdrf2.h mdrf1.h mdc.h complex.h util.h list.h bltin1.h \ +- bltin.h mathl.h fi.h bl.h ++ mem.h /usr/pkg/include/gc.h mdrf2.h mdrf1.h mdc.h complex.h util.h \ ++ list.h bltin1.h bltin.h mathl.h fi.h bl.h + class.o: class.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- util.h list.h class.h mem.h gc/gc.h bltin.h function.h mdrf1.h mdc.h \ +- complex.h mdcf1.h mdr_mdc.h mdsf1.h mdr_mds.h msr.h msrf1.h msrf2.h \ +- msc.h mscf1.h mscf2.h ++ util.h list.h class.h mem.h /usr/pkg/include/gc.h bltin.h function.h \ ++ mdrf1.h mdc.h complex.h mdcf1.h mdr_mdc.h mdsf1.h mdr_mds.h msr.h \ ++ msrf1.h msrf2.h msc.h mscf1.h mscf2.h + diss.o: diss.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ + code.h list.h symbol.h bltin.h print.h util.h + mdc.o: mdc.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h mdc.h complex.h mdcf2.h mdcf1.h mdr_mdc.h util.h list.h \ +- bltin1.h bltin.h bl.h fi.h ++ mem.h /usr/pkg/include/gc.h mdc.h complex.h mdcf2.h mdcf1.h mdr_mdc.h \ ++ util.h list.h bltin1.h bltin.h bl.h fi.h + mdr_mdc.o: mdr_mdc.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h mem.h gc/gc.h mdrf1.h mdrf2.h mdc.h complex.h mdcf1.h \ +- mdcf2.h util.h list.h ++ listnode.h mem.h /usr/pkg/include/gc.h mdrf1.h mdrf2.h mdc.h \ ++ complex.h mdcf1.h mdcf2.h util.h list.h + mds.o: mds.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h util.h list.h bltin1.h bltin.h ++ mem.h /usr/pkg/include/gc.h util.h list.h bltin1.h bltin.h + mdr_mds.o: mdr_mds.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h mem.h gc/gc.h util.h list.h ++ listnode.h mem.h /usr/pkg/include/gc.h util.h list.h + rfile.o: rfile.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- symbol.h list.h mem.h gc/gc.h util.h ++ symbol.h list.h mem.h /usr/pkg/include/gc.h util.h rfile.h + bltin.o: bltin.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- symbol.h list.h mem.h gc/gc.h bltin.h util.h mathl.h complex.h \ +- class.h rfileio.h mdc.h ++ symbol.h list.h mem.h /usr/pkg/include/gc.h bltin.h util.h mathl.h \ ++ complex.h class.h rfileio.h mdc.h + bltin1.o: bltin1.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h mem.h gc/gc.h bltin.h list.h util.h class.h rfileio.h \ +- mdc.h complex.h mathl.h btreef1.h function.h mdrf1.h mdcf1.h \ +- mdr_mdc.h mdsf1.h mdr_mds.h msr.h msrf1.h msc.h mscf1.h ++ listnode.h mem.h /usr/pkg/include/gc.h bltin.h list.h util.h class.h \ ++ rfileio.h mdc.h complex.h mathl.h btreef1.h function.h mdrf1.h \ ++ mdcf1.h mdr_mdc.h mdsf1.h mdr_mds.h msr.h msrf1.h msc.h mscf1.h + mdrf1.o: mdrf1.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h mdc.h complex.h util.h list.h mdrf1.h mathl.h symbol.h \ +- sort.h ++ mem.h /usr/pkg/include/gc.h mdc.h complex.h util.h list.h mdrf1.h \ ++ mathl.h symbol.h sort.h + print.o: print.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- symbol.h list.h bltin.h mem.h gc/gc.h util.h rfileio.h mdc.h \ +- complex.h class.h scan.h ++ symbol.h list.h bltin.h mem.h /usr/pkg/include/gc.h util.h rfileio.h \ ++ mdc.h complex.h class.h scan.h + getline.o: getline.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h symbol.h list.h mem.h gc/gc.h bltin.h util.h scan.h \ +- print.h class.h rfileio.h mdc.h complex.h ++ listnode.h symbol.h list.h mem.h /usr/pkg/include/gc.h bltin.h util.h \ ++ scan.h print.h class.h rfileio.h mdc.h complex.h + random.o: random.c rlab.h config.h ent.h mds.h mdr.h btree.h \ + listnode.h bltin.h list.h util.h class.h symbol.h random.h fi.h \ + mdrf1.h + mdcf1.o: mdcf1.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h mdc.h complex.h util.h list.h symbol.h mathl.h sort.h ++ mem.h /usr/pkg/include/gc.h mdc.h complex.h util.h list.h symbol.h \ ++ mathl.h sort.h + mdsf1.o: mdsf1.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h util.h list.h symbol.h mathl.h complex.h sort.h ++ mem.h /usr/pkg/include/gc.h util.h list.h symbol.h mathl.h complex.h \ ++ sort.h + bltin2.o: bltin2.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h mem.h gc/gc.h bltin.h list.h util.h class.h rfileio.h \ +- mdc.h complex.h mathl.h function.h mdrf1.h mdrf2.h mdcf1.h mdcf2.h \ +- mdr_mdc.h mdsf1.h mdr_mds.h msr.h msrf1.h msrf2.h msc.h mscf1.h \ +- mscf2.h ++ listnode.h mem.h /usr/pkg/include/gc.h bltin.h list.h util.h class.h \ ++ rfileio.h mdc.h complex.h mathl.h function.h mdrf1.h mdrf2.h mdcf1.h \ ++ mdcf2.h mdr_mdc.h mdsf1.h mdr_mds.h msr.h msrf1.h msrf2.h msc.h \ ++ mscf1.h mscf2.h + mdrf2.o: mdrf2.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h symbol.h list.h mdrf1.h mdc.h complex.h util.h mathl.h \ +- fi.h lp.h bl.h ++ mem.h /usr/pkg/include/gc.h symbol.h list.h mdrf1.h mdc.h complex.h \ ++ util.h mathl.h fi.h lp.h bl.h + mdcf2.o: mdcf2.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h symbol.h list.h mdc.h complex.h mdcf1.h util.h mathl.h \ +- fi.h lp.h bl.h ++ mem.h /usr/pkg/include/gc.h symbol.h list.h mdc.h complex.h mdcf1.h \ ++ util.h mathl.h fi.h lp.h bl.h + rfft.o: rfft.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h symbol.h list.h bltin.h mdc.h complex.h util.h class.h \ +- rfileio.h function.h mdrf1.h mdrf2.h mdcf1.h mdcf2.h mdr_mdc.h \ +- mdsf1.h mdr_mds.h msr.h msrf1.h msc.h mscf1.h fftp.h fi.h ++ mem.h /usr/pkg/include/gc.h symbol.h list.h bltin.h mdc.h complex.h \ ++ util.h class.h rfileio.h function.h mdrf1.h mdrf2.h mdcf1.h mdcf2.h \ ++ mdr_mdc.h mdsf1.h mdr_mds.h msr.h msrf1.h msc.h mscf1.h fftp.h fi.h + sort.o: sort.c + r_plot.o: r_plot.c config.h + rstring.o: rstring.c + rdl.o: rdl.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- symbol.h list.h bltin.h class.h util.h mem.h gc/gc.h ++ symbol.h list.h bltin.h class.h util.h mem.h /usr/pkg/include/gc.h + odei.o: odei.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- class.h symbol.h list.h mem.h gc/gc.h mdrf1.h bltin.h util.h mathl.h \ +- complex.h function.h lp.h fi.h odei.h ++ class.h symbol.h list.h mem.h /usr/pkg/include/gc.h mdrf1.h bltin.h \ ++ util.h mathl.h complex.h function.h lp.h fi.h odei.h + btreef1.o: btreef1.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h class.h symbol.h list.h function.h util.h mem.h gc/gc.h ++ listnode.h class.h symbol.h list.h function.h util.h mem.h \ ++ /usr/pkg/include/gc.h + msr.o: msr.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h msr.h util.h list.h bltin1.h bltin.h mathl.h complex.h \ +- fi.h sparse.h ++ mem.h /usr/pkg/include/gc.h msr.h util.h list.h bltin1.h bltin.h \ ++ mathl.h complex.h fi.h sparse.h + msrf1.o: msrf1.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h msr.h msc.h mdc.h complex.h mscf1.h mdrf1.h util.h \ +- list.h symbol.h sort.h mathl.h fi.h sparse.h ++ mem.h /usr/pkg/include/gc.h msr.h msc.h mdc.h complex.h mscf1.h \ ++ mdrf1.h util.h list.h symbol.h sort.h mathl.h fi.h sparse.h + bltin3.o: bltin3.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h mem.h gc/gc.h bltin.h list.h util.h class.h rfileio.h \ +- mdc.h complex.h function.h mdrf1.h mdrf2.h mdcf1.h mdcf2.h mdr_mdc.h \ +- mdsf1.h mdr_mds.h msr.h msrf1.h msrf2.h msc.h mscf1.h mscf2.h ++ listnode.h mem.h /usr/pkg/include/gc.h bltin.h list.h util.h class.h \ ++ rfileio.h mdc.h complex.h function.h mdrf1.h mdrf2.h mdcf1.h mdcf2.h \ ++ mdr_mdc.h mdsf1.h mdr_mds.h msr.h msrf1.h msrf2.h msc.h mscf1.h \ ++ mscf2.h + msc.o: msc.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h msr.h msrf1.h mdc.h complex.h msc.h mdr_mdc.h util.h \ +- list.h bltin1.h bltin.h mathl.h fi.h sparse.h ++ mem.h /usr/pkg/include/gc.h msr.h msrf1.h mdc.h complex.h msc.h \ ++ mdr_mdc.h util.h list.h bltin1.h bltin.h mathl.h fi.h sparse.h + mscf1.o: mscf1.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h msr.h msrf1.h mdc.h complex.h msc.h mdr_mdc.h util.h \ +- list.h symbol.h sort.h mathl.h fi.h sparse.h ++ mem.h /usr/pkg/include/gc.h msr.h msrf1.h mdc.h complex.h msc.h \ ++ mdr_mdc.h util.h list.h symbol.h sort.h mathl.h fi.h sparse.h + msrf2.o: msrf2.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h msr.h msrf1.h mdc.h complex.h msc.h mscf1.h mscf2.h \ +- mdrf1.h util.h list.h symbol.h sort.h mathl.h class.h fi.h sparse.h \ +- mdrf2.h ++ mem.h /usr/pkg/include/gc.h msr.h msrf1.h mdc.h complex.h msc.h \ ++ mscf1.h mscf2.h mdrf1.h util.h list.h symbol.h sort.h mathl.h class.h \ ++ fi.h sparse.h mdrf2.h + mscf2.o: mscf2.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- class.h mem.h gc/gc.h msr.h msc.h mdc.h complex.h mscf1.h mdr_mdc.h \ +- mdcf1.h util.h list.h symbol.h sort.h fi.h sparse.h mdcf2.h ++ class.h mem.h /usr/pkg/include/gc.h msr.h msc.h mdc.h complex.h \ ++ mscf1.h mdr_mdc.h mdcf1.h util.h list.h symbol.h sort.h fi.h sparse.h \ ++ mdcf2.h + r_pgplot.o: r_pgplot.c config.h +-getopt.o: getopt.c ++getopt.o: getopt.c getopt.h + getopt1.o: getopt1.c getopt.h + alloca.o: alloca.c diff --git a/math/rlab/patches/patch-ac b/math/rlab/patches/patch-ac new file mode 100644 index 00000000000..c1a0e8478e7 --- /dev/null +++ b/math/rlab/patches/patch-ac @@ -0,0 +1,13 @@ +$NetBSD: patch-ac,v 1.1.1.1 2001/01/31 07:30:32 jtb Exp $ + +Kludge to prevent RlaB linking with an incompatible LAPACK (eg. version 3.0). +RlaB needs LAPACK 2.0. + +--- flibs/lapack/Makefile.in.orig Tue Dec 29 05:33:28 1998 ++++ flibs/lapack/Makefile.in +@@ -1,4 +1,4 @@ +-LIBRARY = liblapack.a ++LIBRARY = liblapackrlab.a + + SHELL = @MSHELL@ + F77 = @F77@ diff --git a/math/rlab/patches/patch-ad b/math/rlab/patches/patch-ad new file mode 100644 index 00000000000..4fd0df60f4b --- /dev/null +++ b/math/rlab/patches/patch-ad @@ -0,0 +1,10 @@ +$NetBSD: patch-ad,v 1.1.1.1 2001/01/31 07:30:38 jtb Exp $ + +--- flibs/fftpack/Makefile.in.orig Sat Jan 20 04:40:22 2001 ++++ flibs/fftpack/Makefile.in +@@ -1,4 +1,4 @@ +-LIBRARY = libfftpack.a ++LIBRARY = libfftpackrlab.a + + SHELL = @MSHELL@ + F77 = @F77@ diff --git a/math/rlab/patches/patch-ae b/math/rlab/patches/patch-ae new file mode 100644 index 00000000000..6796ca10d58 --- /dev/null +++ b/math/rlab/patches/patch-ae @@ -0,0 +1,10 @@ +$NetBSD: patch-ae,v 1.1.1.1 2001/01/31 07:30:38 jtb Exp $ + +--- flibs/blas/Makefile.in.orig Tue Jan 30 02:25:50 2001 ++++ flibs/blas/Makefile.in +@@ -1,4 +1,4 @@ +-LIBRARY = libblas.a ++LIBRARY = libblasrlab.a + + SHELL = @MSHELL@ + F77 = @F77@ diff --git a/math/rlab/patches/patch-af b/math/rlab/patches/patch-af new file mode 100644 index 00000000000..f7f9410b2d0 --- /dev/null +++ b/math/rlab/patches/patch-af @@ -0,0 +1,216 @@ +$NetBSD: patch-af,v 1.1.1.1 2001/01/31 07:30:40 jtb Exp $ + +--- gc/gc_hdrs.h.orig Sun Sep 6 00:58:05 1998 ++++ gc/gc_hdrs.h +@@ -24,6 +24,17 @@ + * The 2 level tree data structure that is used to find block headers. + * If there are more than 32 bits in a pointer, the top level is a hash + * table. ++ * ++ * This defines HDR, GET_HDR, and SET_HDR, the main macros used to ++ * retrieve and set object headers. We also define some variants to ++ * retrieve 2 unrelated headers in interleaved fashion. This ++ * slightly improves scheduling. ++ * ++ * Since 5.0 alpha 5, we can also take advantage of a header lookup ++ * cache. This is a locally declared direct mapped cache, used inside ++ * the marker. The HC_GET_HDR and HC_GET_HDR2 macros use and maintain this ++ * cache. Assuming we get reasonable hit rates, this shaves a few ++ * memory references from each pointer validation. + */ + + # if CPP_WORDSZ > 32 +@@ -45,18 +56,141 @@ + # define TOP_SZ (1 << LOG_TOP_SZ) + # define BOTTOM_SZ (1 << LOG_BOTTOM_SZ) + ++#ifndef SMALL_CONFIG ++# define USE_HDR_CACHE ++#endif ++ ++/* #define COUNT_HDR_CACHE_HITS */ ++ ++extern hdr * GC_invalid_header; /* header for an imaginary block */ ++ /* containing no objects. */ ++ ++ ++/* Check whether p and corresponding hhdr point to long or invalid */ ++/* object. If so, advance them to */ ++/* beginning of block, or set hhdr to GC_invalid_header. */ ++#define ADVANCE(p, hhdr, source) \ ++ if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) { \ ++ p = GC_FIND_START(p, hhdr, (word)source); \ ++ if (p == 0) { \ ++ hhdr = GC_invalid_header; \ ++ } else { \ ++ hhdr = GC_find_header(p); \ ++ } \ ++ } ++ ++#ifdef USE_HDR_CACHE ++ ++# ifdef COUNT_HDR_CACHE_HITS ++ extern word GC_hdr_cache_hits; ++ extern word GC_hdr_cache_misses; ++# define HC_HIT() ++GC_hdr_cache_hits ++# define HC_MISS() ++GC_hdr_cache_misses ++# else ++# define HC_HIT() ++# define HC_MISS() ++# endif ++ ++ typedef struct hce { ++ word block_addr; /* right shifted by LOG_HBLKSIZE */ ++ hdr * hce_hdr; ++ } hdr_cache_entry; ++ ++# define HDR_CACHE_SIZE 8 /* power of 2 */ ++ ++# define DECLARE_HDR_CACHE \ ++ hdr_cache_entry hdr_cache[HDR_CACHE_SIZE] ++ ++# define INIT_HDR_CACHE BZERO(hdr_cache, sizeof(hdr_cache)); ++ ++# define HCE(h) hdr_cache + (((word)(h) >> LOG_HBLKSIZE) & (HDR_CACHE_SIZE-1)) ++ ++# define HCE_VALID_FOR(hce,h) ((hce) -> block_addr == \ ++ ((word)(h) >> LOG_HBLKSIZE)) ++ ++# define HCE_HDR(h) ((hce) -> hce_hdr) ++ ++ ++/* Analogous to GET_HDR, except that in the case of large objects, it */ ++/* Returns the header for the object beginning, and updates p. */ ++/* Returns &GC_bad_header instead of 0. All of this saves a branch */ ++/* in the fast path. */ ++# define HC_GET_HDR(p, hhdr, source) \ ++ { \ ++ hdr_cache_entry * hce = HCE(p); \ ++ if (HCE_VALID_FOR(hce, p)) { \ ++ HC_HIT(); \ ++ hhdr = hce -> hce_hdr; \ ++ } else { \ ++ HC_MISS(); \ ++ GET_HDR(p, hhdr); \ ++ ADVANCE(p, hhdr, source); \ ++ hce -> block_addr = (word)(p) >> LOG_HBLKSIZE; \ ++ hce -> hce_hdr = hhdr; \ ++ } \ ++ } ++ ++# define HC_GET_HDR2(p1, hhdr1, source1, p2, hhdr2, source2) \ ++ { \ ++ hdr_cache_entry * hce1 = HCE(p1); \ ++ hdr_cache_entry * hce2 = HCE(p2); \ ++ if (HCE_VALID_FOR(hce1, p1)) { \ ++ HC_HIT(); \ ++ hhdr1 = hce1 -> hce_hdr; \ ++ } else { \ ++ HC_MISS(); \ ++ GET_HDR(p1, hhdr1); \ ++ ADVANCE(p1, hhdr1, source1); \ ++ hce1 -> block_addr = (word)(p1) >> LOG_HBLKSIZE; \ ++ hce1 -> hce_hdr = hhdr1; \ ++ } \ ++ if (HCE_VALID_FOR(hce2, p2)) { \ ++ HC_HIT(); \ ++ hhdr2 = hce2 -> hce_hdr; \ ++ } else { \ ++ HC_MISS(); \ ++ GET_HDR(p2, hhdr2); \ ++ ADVANCE(p2, hhdr2, source2); \ ++ hce2 -> block_addr = (word)(p2) >> LOG_HBLKSIZE; \ ++ hce2 -> hce_hdr = hhdr2; \ ++ } \ ++ } ++ ++#else /* !USE_HDR_CACHE */ ++ ++# define DECLARE_HDR_CACHE ++ ++# define INIT_HDR_CACHE ++ ++# define HC_GET_HDR(p, hhdr, source) \ ++ { \ ++ GET_HDR(p, hhdr); \ ++ ADVANCE(p, hhdr, source); \ ++ } ++ ++# define HC_GET_HDR2(p1, hhdr1, source1, p2, hhdr2, source2) \ ++ { \ ++ GET_HDR2(p1, hhdr1, p2, hhdr2); \ ++ ADVANCE(p1, hhdr1, source1); \ ++ ADVANCE(p2, hhdr2, source2); \ ++ } ++ ++#endif ++ + typedef struct bi { + hdr * index[BOTTOM_SZ]; + /* + * The bottom level index contains one of three kinds of values: +- * 0 means we're not responsible for this block. ++ * 0 means we're not responsible for this block, ++ * or this is a block other than the first one in a free block. + * 1 < (long)X <= MAX_JUMP means the block starts at least + * X * HBLKSIZE bytes before the current address. + * A valid pointer points to a hdr structure. (The above can't be + * valid pointers due to the GET_MEM return convention.) + */ + struct bi * asc_link; /* All indices are linked in */ +- /* ascending order. */ ++ /* ascending order... */ ++ struct bi * desc_link; /* ... and in descending order. */ + word key; /* high order address bits. */ + # ifdef HASH_TL + struct bi * hash_link; /* Hash chain link. */ +@@ -95,6 +229,8 @@ + # define GET_HDR(p, hhdr) (hhdr) = HDR(p) + # define SET_HDR(p, hhdr) HDR_INNER(p) = (hhdr) + # define GET_HDR_ADDR(p, ha) (ha) = &(HDR_INNER(p)) ++# define GET_HDR2(p1, hhdr1, p2, hhdr2) \ ++ { GET_HDR(p1, hhdr1); GET_HDR(p2, hhdr2); } + # else /* hash */ + /* Hash function for tree top level */ + # define TL_HASH(hi) ((hi) & (TOP_SZ - 1)) +@@ -121,6 +257,40 @@ + # define SET_HDR(p, hhdr) { register hdr ** _ha; GET_HDR_ADDR(p, _ha); \ + *_ha = (hhdr); } + # define HDR(p) GC_find_header((ptr_t)(p)) ++ /* And some interleaved versions for two pointers at once. */ ++ /* This hopefully helps scheduling on processors like IA64. */ ++# define GET_BI2(p1, bottom_indx1, p2, bottom_indx2) \ ++ { \ ++ register word hi1 = \ ++ (word)(p1) >> (LOG_BOTTOM_SZ + LOG_HBLKSIZE); \ ++ register word hi2 = \ ++ (word)(p2) >> (LOG_BOTTOM_SZ + LOG_HBLKSIZE); \ ++ register bottom_index * _bi1 = GC_top_index[TL_HASH(hi1)]; \ ++ register bottom_index * _bi2 = GC_top_index[TL_HASH(hi2)]; \ ++ \ ++ while (_bi1 -> key != hi1 && _bi1 != GC_all_nils) \ ++ _bi1 = _bi1 -> hash_link; \ ++ while (_bi2 -> key != hi2 && _bi2 != GC_all_nils) \ ++ _bi2 = _bi2 -> hash_link; \ ++ (bottom_indx1) = _bi1; \ ++ (bottom_indx2) = _bi2; \ ++ } ++# define GET_HDR_ADDR2(p1, ha1, p2, ha2) \ ++ { \ ++ register bottom_index * bi1; \ ++ register bottom_index * bi2; \ ++ \ ++ GET_BI2(p1, bi1, p2, bi2); \ ++ (ha1) = &(HDR_FROM_BI(bi1, p1)); \ ++ (ha2) = &(HDR_FROM_BI(bi2, p2)); \ ++ } ++# define GET_HDR2(p1, hhdr1, p2, hhdr2) \ ++ { register hdr ** _ha1; \ ++ register hdr ** _ha2; \ ++ GET_HDR_ADDR2(p1, _ha1, p2, _ha2); \ ++ (hhdr1) = *_ha1; \ ++ (hhdr2) = *_ha2; \ ++ } + # endif + + /* Is the result a forwarding address to someplace closer to the */ diff --git a/math/rlab/patches/patch-ag b/math/rlab/patches/patch-ag new file mode 100644 index 00000000000..dae375ad90e --- /dev/null +++ b/math/rlab/patches/patch-ag @@ -0,0 +1,572 @@ +$NetBSD: patch-ag,v 1.1.1.1 2001/01/31 07:30:47 jtb Exp $ + +--- gc/gc_priv.h.orig Sun May 9 13:16:49 1999 ++++ gc/gc_priv.h +@@ -1,6 +1,9 @@ + /* + * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers + * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved. ++ * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. ++ * Copyright (c) 1999 by Hewlett-Packard Company. All rights reserved. ++ * + * + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. +@@ -41,7 +44,7 @@ + typedef GC_word word; + typedef GC_signed_word signed_word; + +-# ifndef CONFIG_H ++# ifndef GCCONFIG_H + # include "gcconfig.h" + # endif + +@@ -64,21 +67,22 @@ + # include <stddef.h> + # endif + # define VOLATILE volatile +-# define CONST const + #else + # ifdef MSWIN32 + # include <stdlib.h> + # endif + # define VOLATILE +-# define CONST + #endif + +-#ifdef AMIGA ++#define CONST GC_CONST ++ ++#if 0 /* was once defined for AMIGA */ + # define GC_FAR __far + #else + # define GC_FAR + #endif + ++ + /*********************************/ + /* */ + /* Definitions for conservative */ +@@ -170,15 +174,6 @@ + /* May save significant amounts of space for obj_map */ + /* entries. */ + +-#ifndef OLD_BLOCK_ALLOC +- /* Macros controlling large block allocation strategy. */ +-# define EXACT_FIRST /* Make a complete pass through the large object */ +- /* free list before splitting a block */ +-# define PRESERVE_LAST /* Do not divide last allocated heap segment */ +- /* unless we would otherwise need to expand the */ +- /* heap. */ +-#endif +- + /* ALIGN_DOUBLE requires MERGE_SIZES at present. */ + # if defined(ALIGN_DOUBLE) && !defined(MERGE_SIZES) + # define MERGE_SIZES +@@ -278,6 +273,13 @@ + # define MS_TIME_DIFF(a,b) ((double) (a.tv_sec - b.tv_sec) * 1000.0 \ + + (double) (a.tv_usec - b.tv_usec) / 1000.0) + #else /* !BSD_TIME */ ++# ifdef MSWIN32 ++# include <windows.h> ++# include <winbase.h> ++# define CLOCK_TYPE DWORD ++# define GET_TIME(x) x = GetTickCount() ++# define MS_TIME_DIFF(a,b) ((long)((a)-(b))) ++# else /* !MSWIN32, !BSD_TIME */ + # include <time.h> + # if !defined(__STDC__) && defined(SPARC) && defined(SUNOS4) + clock_t clock(); /* Not in time.h, where it belongs */ +@@ -303,6 +305,7 @@ + # define GET_TIME(x) x = clock() + # define MS_TIME_DIFF(a,b) ((unsigned long) \ + (1000.0*(double)((a)-(b))/(double)CLOCKS_PER_SEC)) ++# endif /* !MSWIN32 */ + #endif /* !BSD_TIME */ + + /* We use bzero and bcopy internally. They may not be available. */ +@@ -350,7 +353,7 @@ + + GC_page_size) \ + + GC_page_size-1) + # else +-# if defined(AMIGA) || defined(NEXT) || defined(DOS4GW) ++# if defined(AMIGA) || defined(NEXT) || defined(MACOSX) || defined(DOS4GW) + # define GET_MEM(bytes) HBLKPTR((size_t) \ + calloc(1, (size_t)bytes + GC_page_size) \ + + GC_page_size-1) +@@ -434,9 +437,12 @@ + # define LOCK() mutex_lock(&GC_allocate_ml); + # define UNLOCK() mutex_unlock(&GC_allocate_ml); + # endif +-# ifdef LINUX_THREADS ++# if defined(LINUX_THREADS) ++# if defined(I386)|| defined(POWERPC) || defined(ALPHA) || defined(IA64) \ ++ || defined(M68K) + # include <pthread.h> +-# ifdef __i386__ ++# define USE_SPIN_LOCK ++# if defined(I386) + inline static int GC_test_and_set(volatile unsigned int *addr) { + int oldval; + /* Note: the "xchg" instruction does not need a "lock" prefix */ +@@ -445,15 +451,107 @@ + : "0"(1), "m"(*(addr))); + return oldval; + } +-# else +- -- > Need implementation of GC_test_and_set() + # endif +-# define GC_clear(addr) (*(addr) = 0) ++# if defined(IA64) ++ inline static int GC_test_and_set(volatile unsigned int *addr) { ++ int oldval; ++ __asm__ __volatile__("xchg4 %0=%1,%2" ++ : "=r"(oldval), "=m"(*addr) ++ : "r"(1), "1"(*addr)); ++ return oldval; ++ } ++ inline static void GC_clear(volatile unsigned int *addr) { ++ __asm__ __volatile__("st4.rel %0=r0" : "=m" (*addr)); ++ } ++# define GC_CLEAR_DEFINED ++# endif ++# ifdef M68K ++ /* Contributed by Tony Mantler. I'm not sure how well it was */ ++ /* tested. */ ++ inline static int GC_test_and_set(volatile unsigned int *addr) { ++ char oldval; /* this must be no longer than 8 bits */ ++ ++ /* The return value is semi-phony. */ ++ /* 'tas' sets bit 7 while the return */ ++ /* value pretends bit 0 was set */ ++ __asm__ __volatile__( ++ "tas %1@; sne %0; negb %0" ++ : "=d" (oldval) ++ : "a" (addr)); ++ return oldval; ++ } ++# endif ++# if defined(POWERPC) ++ inline static int GC_test_and_set(volatile unsigned int *addr) { ++ int oldval; ++ int temp = 1; // locked value ++ ++ __asm__ __volatile__( ++ "1:\tlwarx %0,0,%3\n" // load and reserve ++ "\tcmpwi %0, 0\n" // if load is ++ "\tbne 2f\n" // non-zero, return already set ++ "\tstwcx. %2,0,%1\n" // else store conditional ++ "\tbne- 1b\n" // retry if lost reservation ++ "2:\t\n" // oldval is zero if we set ++ : "=&r"(oldval), "=p"(addr) ++ : "r"(temp), "1"(addr) ++ : "memory"); ++ return (int)oldval; ++ } ++ inline static void GC_clear(volatile unsigned int *addr) { ++ __asm__ __volatile__("eieio"); ++ *(addr) = 0; ++ } ++# define GC_CLEAR_DEFINED ++# endif ++# ifdef ALPHA ++ inline static int GC_test_and_set(volatile unsigned int * addr) ++ { ++ unsigned long oldvalue; ++ unsigned long temp; ++ ++ __asm__ __volatile__( ++ "1: ldl_l %0,%1\n" ++ " and %0,%3,%2\n" ++ " bne %2,2f\n" ++ " xor %0,%3,%0\n" ++ " stl_c %0,%1\n" ++ " beq %0,3f\n" ++ " mb\n" ++ "2:\n" ++ ".section .text2,\"ax\"\n" ++ "3: br 1b\n" ++ ".previous" ++ :"=&r" (temp), "=m" (*addr), "=&r" (oldvalue) ++ :"Ir" (1), "m" (*addr)); ++ ++ return oldvalue; ++ } ++ /* Should probably also define GC_clear, since it needs */ ++ /* a memory barrier ?? */ ++# endif /* ALPHA */ ++# ifdef ARM32 ++ inline static int GC_test_and_set(volatile unsigned int *addr) { ++ int oldval; ++ /* SWP on ARM is very similar to XCHG on x86. Doesn't lock the ++ * bus because there are no SMP ARM machines. If/when there are, ++ * this code will likely need to be updated. */ ++ /* See linuxthreads/sysdeps/arm/pt-machine.h in glibc-2.1 */ ++ __asm__ __volatile__("swp %0, %1, [%2]" ++ : "=r"(oldval) ++ : "r"(1), "r"(addr)); ++ return oldval; ++ } ++# endif ++# ifndef GC_CLEAR_DEFINED ++ inline static void GC_clear(volatile unsigned int *addr) { ++ /* Try to discourage gcc from moving anything past this. */ ++ __asm__ __volatile__(" "); ++ *(addr) = 0; ++ } ++# endif + + extern volatile unsigned int GC_allocate_lock; +- /* This is not a mutex because mutexes that obey the (optional) */ +- /* POSIX scheduling rules are subject to convoys in high contention */ +- /* applications. This is basically a spin lock. */ + extern pthread_t GC_lock_holder; + extern void GC_lock(void); + /* Allocation lock holder. Only set if acquired by client through */ +@@ -462,31 +560,48 @@ + # define NO_THREAD (pthread_t)(-1) + # define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD + # define I_HOLD_LOCK() (pthread_equal(GC_lock_holder, pthread_self())) +-# ifdef UNDEFINED +-# define LOCK() pthread_mutex_lock(&GC_allocate_ml) +-# define UNLOCK() pthread_mutex_unlock(&GC_allocate_ml) +-# else +-# define LOCK() \ ++# define LOCK() \ + { if (GC_test_and_set(&GC_allocate_lock)) GC_lock(); } +-# define UNLOCK() \ ++# define UNLOCK() \ + GC_clear(&GC_allocate_lock) +-# endif +- extern GC_bool GC_collecting; ++ extern VOLATILE GC_bool GC_collecting; + # define ENTER_GC() \ + { \ + GC_collecting = 1; \ + } + # define EXIT_GC() GC_collecting = 0; ++# else /* LINUX_THREADS on hardware for which we don't know how */ ++ /* to do test and set. */ ++# include <pthread.h> ++ extern pthread_mutex_t GC_allocate_ml; ++# define LOCK() pthread_mutex_lock(&GC_allocate_ml) ++# define UNLOCK() pthread_mutex_unlock(&GC_allocate_ml) ++# endif + # endif /* LINUX_THREADS */ +-# if defined(IRIX_THREADS) || defined(IRIX_JDK_THREADS) ++# if defined(HPUX_THREADS) ++# include <pthread.h> ++ extern pthread_mutex_t GC_allocate_ml; ++# define LOCK() pthread_mutex_lock(&GC_allocate_ml) ++# define UNLOCK() pthread_mutex_unlock(&GC_allocate_ml) ++# endif ++# if defined(IRIX_THREADS) || defined(IRIX_JDK_THREADS) ++ /* This may also eventually be appropriate for HPUX_THREADS */ + # include <pthread.h> +-# include <mutex.h> ++# ifndef HPUX_THREADS ++ /* This probably should never be included, but I can't test */ ++ /* on Irix anymore. */ ++# include <mutex.h> ++# endif + +-# if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) \ ++# ifndef HPUX_THREADS ++# if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) \ + || !defined(_COMPILER_VERSION) || _COMPILER_VERSION < 700 + # define GC_test_and_set(addr, v) test_and_set(addr,v) +-# else ++# else + # define GC_test_and_set(addr, v) __test_and_set(addr,v) ++# endif ++# else ++ /* I couldn't find a way to do this inline on HP/UX */ + # endif + extern unsigned long GC_allocate_lock; + /* This is not a mutex because mutexes that obey the (optional) */ +@@ -500,15 +615,17 @@ + # define NO_THREAD (pthread_t)(-1) + # define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD + # define I_HOLD_LOCK() (pthread_equal(GC_lock_holder, pthread_self())) +-# ifdef UNDEFINED +-# define LOCK() pthread_mutex_lock(&GC_allocate_ml) +-# define UNLOCK() pthread_mutex_unlock(&GC_allocate_ml) ++# ifdef HPUX_THREADS ++# define LOCK() { if (!GC_test_and_clear(&GC_allocate_lock)) GC_lock(); } ++ /* The following is INCORRECT, since the memory model is too weak. */ ++# define UNLOCK() { GC_noop1(&GC_allocate_lock); \ ++ *(volatile unsigned long *)(&GC_allocate_lock) = 1; } + # else +-# define LOCK() { if (GC_test_and_set(&GC_allocate_lock, 1)) GC_lock(); } +-# if __mips >= 3 && (defined (_ABIN32) || defined(_ABI64)) \ ++# define LOCK() { if (GC_test_and_set(&GC_allocate_lock, 1)) GC_lock(); } ++# if __mips >= 3 && (defined (_ABIN32) || defined(_ABI64)) \ + && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 700 + # define UNLOCK() __lock_release(&GC_allocate_lock) +-# else ++# else + /* The function call in the following should prevent the */ + /* compiler from moving assignments to below the UNLOCK. */ + /* This is probably not necessary for ucode or gcc 2.8. */ +@@ -516,9 +633,9 @@ + /* versions. */ + # define UNLOCK() { GC_noop1(&GC_allocate_lock); \ + *(volatile unsigned long *)(&GC_allocate_lock) = 0; } +-# endif ++# endif + # endif +- extern GC_bool GC_collecting; ++ extern VOLATILE GC_bool GC_collecting; + # define ENTER_GC() \ + { \ + GC_collecting = 1; \ +@@ -607,7 +724,7 @@ + # else + # if defined(SOLARIS_THREADS) || defined(WIN32_THREADS) \ + || defined(IRIX_THREADS) || defined(LINUX_THREADS) \ +- || defined(IRIX_JDK_THREADS) ++ || defined(IRIX_JDK_THREADS) || defined(HPUX_THREADS) + void GC_stop_world(); + void GC_start_world(); + # define STOP_WORLD() GC_stop_world() +@@ -823,6 +940,7 @@ + struct hblk * hb_next; /* Link field for hblk free list */ + /* and for lists of chunks waiting to be */ + /* reclaimed. */ ++ struct hblk * hb_prev; /* Backwards link for free list. */ + word hb_descr; /* object descriptor for marking. See */ + /* mark.h. */ + char* hb_map; /* A pointer to a pointer validity map of the block. */ +@@ -837,14 +955,28 @@ + # define IGNORE_OFF_PAGE 1 /* Ignore pointers that do not */ + /* point to the first page of */ + /* this object. */ ++# define WAS_UNMAPPED 2 /* This is a free block, which has */ ++ /* been unmapped from the address */ ++ /* space. */ ++ /* GC_remap must be invoked on it */ ++ /* before it can be reallocated. */ ++ /* Only set with USE_MUNMAP. */ + unsigned short hb_last_reclaimed; + /* Value of GC_gc_no when block was */ + /* last allocated or swept. May wrap. */ ++ /* For a free block, this is maintained */ ++ /* unly for USE_MUNMAP, and indicates */ ++ /* when the header was allocated, or */ ++ /* when the size of the block last */ ++ /* changed. */ + word hb_marks[MARK_BITS_SZ]; + /* Bit i in the array refers to the */ + /* object starting at the ith word (header */ + /* INCLUDED) in the heap block. */ + /* The lsb of word 0 is numbered 0. */ ++ /* Unused bits are invalid, and are */ ++ /* occasionally set, e.g for uncollectable */ ++ /* objects. */ + }; + + /* heap block body */ +@@ -879,8 +1011,10 @@ + /* The type of mark procedures. This really belongs in gc_mark.h. */ + /* But we put it here, so that we can avoid scanning the mark proc */ + /* table. */ +-typedef struct ms_entry * (*mark_proc)(/* word * addr, mark_stack_ptr, +- mark_stack_limit, env */); ++typedef struct ms_entry * (*mark_proc)(/* word * addr, ++ struct ms_entry *mark_stack_ptr, ++ struct ms_entry *mark_stack_limit, ++ word env */); + # define LOG_MAX_MARK_PROCS 6 + # define MAX_MARK_PROCS (1 << LOG_MAX_MARK_PROCS) + +@@ -957,8 +1091,12 @@ + struct _GC_arrays { + word _heapsize; + word _max_heapsize; ++ word _requested_heapsize; /* Heap size due to explicit expansion */ + ptr_t _last_heap_addr; + ptr_t _prev_heap_addr; ++ word _large_free_bytes; ++ /* Total bytes contained in blocks on large object free */ ++ /* list. */ + word _words_allocd_before_gc; + /* Number of words allocated before this */ + /* collection cycle. */ +@@ -978,6 +1116,10 @@ + word _mem_freed; + /* Number of explicitly deallocated words of memory */ + /* since last collection. */ ++ ptr_t _scratch_end_ptr; ++ ptr_t _scratch_last_end_ptr; ++ /* Used by headers.c, and can easily appear to point to */ ++ /* heap. */ + mark_proc _mark_procs[MAX_MARK_PROCS]; + /* Table of user-defined mark procedures. There is */ + /* a small number of these, which can be referenced */ +@@ -1005,6 +1147,9 @@ + /* Number of words in accessible atomic */ + /* objects. */ + # endif ++# ifdef USE_MUNMAP ++ word _unmapped_bytes; ++# endif + # ifdef MERGE_SIZES + unsigned _size_map[WORDS_TO_BYTES(MAXOBJSZ+1)]; + /* Number of words to allocate for a given allocation request in */ +@@ -1022,7 +1167,7 @@ + /* to an object at */ + /* block_start+i&~3 - WORDS_TO_BYTES(j). */ + /* (If ALL_INTERIOR_POINTERS is defined, then */ +- /* instead ((short *)(hbh_map[sz])[i] is j if */ ++ /* instead ((short *)(hb_map[sz])[i] is j if */ + /* block_start+WORDS_TO_BYTES(i) is in the */ + /* interior of an object starting at */ + /* block_start+WORDS_TO_BYTES(i-j)). */ +@@ -1135,15 +1280,22 @@ + # define GC_prev_heap_addr GC_arrays._prev_heap_addr + # define GC_words_allocd GC_arrays._words_allocd + # define GC_words_wasted GC_arrays._words_wasted ++# define GC_large_free_bytes GC_arrays._large_free_bytes + # define GC_words_finalized GC_arrays._words_finalized + # define GC_non_gc_bytes_at_gc GC_arrays._non_gc_bytes_at_gc + # define GC_mem_freed GC_arrays._mem_freed ++# define GC_scratch_end_ptr GC_arrays._scratch_end_ptr ++# define GC_scratch_last_end_ptr GC_arrays._scratch_last_end_ptr + # define GC_mark_procs GC_arrays._mark_procs + # define GC_heapsize GC_arrays._heapsize + # define GC_max_heapsize GC_arrays._max_heapsize ++# define GC_requested_heapsize GC_arrays._requested_heapsize + # define GC_words_allocd_before_gc GC_arrays._words_allocd_before_gc + # define GC_heap_sects GC_arrays._heap_sects + # define GC_last_stack GC_arrays._last_stack ++# ifdef USE_MUNMAP ++# define GC_unmapped_bytes GC_arrays._unmapped_bytes ++# endif + # ifdef MSWIN32 + # define GC_heap_bases GC_arrays._heap_bases + # endif +@@ -1172,6 +1324,8 @@ + # define beginGC_arrays ((ptr_t)(&GC_arrays)) + # define endGC_arrays (((ptr_t)(&GC_arrays)) + (sizeof GC_arrays)) + ++#define USED_HEAP_SIZE (GC_heapsize - GC_large_free_bytes) ++ + /* Object kinds: */ + # define MAXOBJKINDS 16 + +@@ -1236,7 +1390,7 @@ + /* Pointer to the nowhere valid hblk map */ + /* Blocks pointing to this map are free. */ + +-extern struct hblk * GC_hblkfreelist; ++extern struct hblk * GC_hblkfreelist[]; + /* List of completely empty heap blocks */ + /* Linked through hb_next field of */ + /* header structure associated with */ +@@ -1251,7 +1405,7 @@ + extern GC_bool GC_incremental; + /* Using incremental/generational collection. */ + #else +-# define GC_incremental TRUE ++# define GC_incremental FALSE + /* Hopefully allow optimizer to remove some code. */ + #endif + +@@ -1304,14 +1458,16 @@ + ptr_t GC_approx_sp(); + + GC_bool GC_should_collect(); +-#ifdef PRESERVE_LAST +- GC_bool GC_in_last_heap_sect(/* ptr_t */); +- /* In last added heap section? If so, avoid breaking up. */ +-#endif ++ + void GC_apply_to_all_blocks(/*fn, client_data*/); + /* Invoke fn(hbp, client_data) for each */ + /* allocated heap block. */ +-struct hblk * GC_next_block(/* struct hblk * h */); ++struct hblk * GC_next_used_block(/* struct hblk * h */); ++ /* Return first in-use block >= h */ ++struct hblk * GC_prev_block(/* struct hblk * h */); ++ /* Return last block <= h. Returned block */ ++ /* is managed by GC, but may or may not be in */ ++ /* use. */ + void GC_mark_init(); + void GC_clear_marks(); /* Clear mark bits for all heap objects. */ + void GC_invalidate_mark_state(); /* Tell the marker that marked */ +@@ -1384,8 +1540,14 @@ + /* lock held. */ + /* 0 by default. */ + void GC_push_regs(); /* Push register contents onto mark stack. */ ++ /* If NURSERY is defined, the default push */ ++ /* action can be overridden with GC_push_proc */ + void GC_remark(); /* Mark from all marked objects. Used */ + /* only if we had to drop something. */ ++ ++# ifdef NURSERY ++ extern void (*GC_push_proc)(ptr_t); ++# endif + # if defined(MSWIN32) + void __cdecl GC_push_one(); + # else +@@ -1573,9 +1735,10 @@ + /* head. */ + + void GC_init_headers(); +-GC_bool GC_install_header(/*h*/); ++struct hblkhdr * GC_install_header(/*h*/); + /* Install a header for block h. */ +- /* Return FALSE on failure. */ ++ /* Return 0 on failure, or the header */ ++ /* otherwise. */ + GC_bool GC_install_counts(/*h, sz*/); + /* Set up forwarding counts for block */ + /* h of size sz. */ +@@ -1608,6 +1771,15 @@ + /* detailed description of the object */ + /* referred to by p. */ + ++/* Memory unmapping: */ ++#ifdef USE_MUNMAP ++ void GC_unmap_old(void); ++ void GC_merge_unmapped(void); ++ void GC_unmap(ptr_t start, word bytes); ++ void GC_remap(ptr_t start, word bytes); ++ void GC_unmap_gap(ptr_t start1, word bytes1, ptr_t start2, word bytes2); ++#endif ++ + /* Virtual dirty bit implementation: */ + /* Each implementation exports the following: */ + void GC_read_dirty(); /* Retrieve dirty bits. */ +@@ -1640,6 +1812,16 @@ + void GC_print_static_roots(); + void GC_dump(); + ++#ifdef KEEP_BACK_PTRS ++ void GC_store_back_pointer(ptr_t source, ptr_t dest); ++ void GC_marked_for_finalization(ptr_t dest); ++# define GC_STORE_BACK_PTR(source, dest) GC_store_back_pointer(source, dest) ++# define GC_MARKED_FOR_FINALIZATION(dest) GC_marked_for_finalization(dest) ++#else ++# define GC_STORE_BACK_PTR(source, dest) ++# define GC_MARKED_FOR_FINALIZATION(dest) ++#endif ++ + /* Make arguments appear live to compiler */ + # ifdef __WATCOMC__ + void GC_noop(void*, ...); +@@ -1689,5 +1871,14 @@ + /* Write s to stderr, don't buffer, don't add */ + /* newlines, don't ... */ + ++ ++# ifdef GC_ASSERTIONS ++# define GC_ASSERT(expr) if(!(expr)) {\ ++ GC_err_printf2("Assertion failure: %s:%ld\n", \ ++ __FILE__, (unsigned long)__LINE__); \ ++ ABORT("assertion failure"); } ++# else ++# define GC_ASSERT(expr) ++# endif + + # endif /* GC_PRIVATE_H */ diff --git a/math/rlab/patches/patch-ah b/math/rlab/patches/patch-ah new file mode 100644 index 00000000000..bc19de7cd85 --- /dev/null +++ b/math/rlab/patches/patch-ah @@ -0,0 +1,737 @@ +$NetBSD: patch-ah,v 1.1.1.1 2001/01/31 07:30:52 jtb Exp $ + +--- gc/gcconfig.h.orig Sun May 9 13:16:49 1999 ++++ gc/gcconfig.h +@@ -13,9 +13,9 @@ + * modified is included with the above copyright notice. + */ + +-#ifndef CONFIG_H ++#ifndef GCCONFIG_H + +-# define CONFIG_H ++# define GCCONFIG_H + + /* Machine dependent parameters. Some tuning parameters can be found */ + /* near the top of gc_private.h. */ +@@ -27,6 +27,13 @@ + # define LINUX + # endif + ++# if defined(__NetBSD__) ++# define NETBSD ++# ifndef unix ++# define unix /* symbol unix is no longer defined in NetBSD */ ++# endif ++# endif ++ + /* Determine the machine type: */ + # if defined(sun) && defined(mc68000) + # define M68K +@@ -43,8 +50,21 @@ + # define OPENBSD + # define mach_type_known + # endif ++# if defined(__OpenBSD__) && defined(__sparc__) ++# define SPARC ++# define OPENBSD ++# define mach_type_known ++# endif + # if defined(__NetBSD__) && defined(m68k) + # define M68K ++# define mach_type_known ++# endif ++# if defined(__NetBSD__) && defined(__powerpc__) ++# define POWERPC ++# define mach_type_known ++# endif ++# if defined(__NetBSD__) && defined(__arm32__) ++# define ARM32 + # define NETBSD + # define mach_type_known + # endif +@@ -59,14 +79,20 @@ + # endif + # if defined(mips) || defined(__mips) + # define MIPS +-# if defined(ultrix) || defined(__ultrix) || defined(__NetBSD__) +-# define ULTRIX +-# else +-# if defined(_SYSTYPE_SVR4) || defined(SYSTYPE_SVR4) || defined(__SYSTYPE_SVR4__) +-# define IRIX5 /* or IRIX 6.X */ +-# else +-# define RISCOS /* or IRIX 4.X */ +-# endif ++# if !defined(LINUX) ++# if defined(ultrix) || defined(__ultrix) || defined(__NetBSD__) ++# define ULTRIX ++# else ++# if defined(_SYSTYPE_SVR4) || defined(SYSTYPE_SVR4) \ ++ || defined(__SYSTYPE_SVR4__) ++# define IRIX5 /* or IRIX 6.X */ ++# else ++# define RISCOS /* or IRIX 4.X */ ++# endif ++# endif ++# endif /* !LINUX */ ++# if defined(__NetBSD__) && defined(__MIPSEL__) ++# undef ULTRIX + # endif + # define mach_type_known + # endif +@@ -100,7 +126,8 @@ + # endif + # define mach_type_known + # endif +-# if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) ++# if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) \ ++ && !defined(__OpenBSD__) && !(__NetBSD__) + # define SPARC + # define DRSNX + # define mach_type_known +@@ -109,6 +136,10 @@ + # define RS6000 + # define mach_type_known + # endif ++# if defined(__NetBSD__) && defined(__sparc__) ++# define SPARC ++# define mach_type_known ++# endif + # if defined(_M_XENIX) && defined(_M_SYSV) && defined(_M_I386) + /* The above test may need refinement */ + # define I386 +@@ -124,15 +155,22 @@ + # define SYSV + # define mach_type_known + # endif +-# if defined(_PA_RISC1_0) || defined(_PA_RISC1_1) \ ++# if defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \ + || defined(hppa) || defined(__hppa__) + # define HP_PA ++# ifndef LINUX ++# define HPUX ++# endif + # define mach_type_known + # endif +-# if defined(LINUX) && defined(i386) ++# if defined(LINUX) && (defined(i386) || defined(__i386__)) + # define I386 + # define mach_type_known + # endif ++# if defined(LINUX) && (defined(__ia64__) || defined(__ia64)) ++# define IA64 ++# define mach_type_known ++# endif + # if defined(LINUX) && defined(powerpc) + # define POWERPC + # define mach_type_known +@@ -141,21 +179,26 @@ + # define M68K + # define mach_type_known + # endif +-# if defined(linux) && defined(sparc) ++# if defined(LINUX) && (defined(sparc) || defined(__sparc__)) + # define SPARC +-# define LINUX ++# define mach_type_known ++# endif ++# if defined(LINUX) && defined(arm) ++# define ARM32 + # define mach_type_known + # endif + # if defined(__alpha) || defined(__alpha__) + # define ALPHA +-# if !defined(LINUX) ++# if !defined(LINUX) && !defined(NETBSD) + # define OSF1 /* a.k.a Digital Unix */ + # endif + # define mach_type_known + # endif +-# if defined(_AMIGA) +-# define M68K ++# if defined(_AMIGA) && !defined(AMIGA) + # define AMIGA ++# endif ++# ifdef AMIGA ++# define M68K + # define mach_type_known + # endif + # if defined(THINK_C) || defined(__MWERKS__) && !defined(__powerc) +@@ -168,6 +211,11 @@ + # define MACOS + # define mach_type_known + # endif ++# if defined(macosx) ++# define MACOSX ++# define POWERPC ++# define mach_type_known ++# endif + # if defined(NeXT) && defined(mc68000) + # define M68K + # define NEXT +@@ -190,7 +238,6 @@ + # endif + # if defined(__NetBSD__) && defined(i386) + # define I386 +-# define NETBSD + # define mach_type_known + # endif + # if defined(bsdi) && defined(i386) +@@ -231,6 +278,11 @@ + # define CYGWIN32 + # define mach_type_known + # endif ++# if defined(__MINGW32__) ++# define I386 ++# define MSWIN32 ++# define mach_type_known ++# endif + # if defined(__BORLANDC__) + # define I386 + # define MSWIN32 +@@ -241,6 +293,10 @@ + # define UTS4 + # define mach_type_known + # endif ++# if defined(__pj__) ++# define PJ ++# define mach_type_known ++# endif + /* Ivan Demakov */ + # if defined(__WATCOMC__) && defined(__386__) + # define I386 +@@ -295,6 +351,9 @@ + /* (CX_UX and DGUX) */ + /* S370 ==> 370-like machine */ + /* running Amdahl UTS4 */ ++ /* ARM32 ==> Intel StrongARM */ ++ /* IA64 ==> Intel IA64 */ ++ /* (e.g. Itanium) */ + + + /* +@@ -343,6 +402,11 @@ + * to the nearest plausible page boundary, and use that instead + * of STACKBOTTOM. + * ++ * Gustavo Rodriguez-Rivera points out that on most (all?) Unix machines, ++ * the value of environ is a pointer that can serve as STACKBOTTOM. ++ * I expect that HEURISTIC2 can be replaced by this approach, which ++ * interferes far less with debugging. ++ * + * If no expression for STACKBOTTOM can be found, and neither of the above + * heuristics are usable, the collector can still be used with all of the above + * undefined, provided one of the following is done: +@@ -380,6 +444,15 @@ + * + * An architecture may define DYNAMIC_LOADING if dynamic_load.c + * defined GC_register_dynamic_libraries() for the architecture. ++ * ++ * An architecture may define PREFETCH(x) to preload the cache with *x. ++ * This defaults to a no-op. ++ * ++ * PREFETCH_FOR_WRITE(x) is used if *x is about to be written. ++ * ++ * An architecture may also define CLEAR_DOUBLE(x) to be a fast way to ++ * clear the two words at GC_malloc-aligned address x. By default, ++ * word stores of 0 are used instead. + */ + + +@@ -486,8 +559,8 @@ + + # ifdef POWERPC + # define MACH_TYPE "POWERPC" +-# define ALIGNMENT 2 + # ifdef MACOS ++# define ALIGNMENT 2 /* Still necessary? Could it be 4? */ + # ifndef __LOWMEM__ + # include <LowMem.h> + # endif +@@ -497,14 +570,33 @@ + # define DATAEND /* not needed */ + # endif + # ifdef LINUX ++# define ALIGNMENT 4 /* Guess. Can someone verify? */ ++ /* This was 2, but that didn't sound right. */ + # define OS_TYPE "LINUX" + # define HEURISTIC1 ++# define DYNAMIC_LOADING + # undef STACK_GRAN + # define STACK_GRAN 0x10000000 +-# define DATASTART GC_data_start ++ /* Stack usually starts at 0x80000000 */ ++# define LINUX_DATA_START + extern int _end; + # define DATAEND (&_end) + # endif ++# ifdef MACOSX ++# define ALIGNMENT 4 ++# define OS_TYPE "MACOSX" ++# define DATASTART ((ptr_t) get_etext()) ++# define STACKBOTTOM ((ptr_t) 0xc0000000) ++# define DATAEND /* not needed */ ++# endif ++# ifdef NETBSD ++# define ALIGNMENT 4 ++# define OS_TYPE "NETBSD" ++# define HEURISTIC2 ++ extern char etext; ++# define DATASTART GC_data_start ++# define DYNAMIC_LOADING ++# endif + # endif + + # ifdef VAX +@@ -534,7 +626,6 @@ + # define MACH_TYPE "SPARC" + # define ALIGNMENT 4 /* Required by hardware */ + # define ALIGN_DOUBLE +- extern int etext; + # ifdef SUNOS5 + # define OS_TYPE "SUNOS5" + extern int _etext; +@@ -593,8 +684,8 @@ + # ifdef LINUX + # define OS_TYPE "LINUX" + # ifdef __ELF__ +-# define DATASTART GC_data_start +-# define DYNAMIC_LOADING ++# define LINUX_DATA_START ++# define DYNAMIC_LOADING + # else + Linux Sparc non elf ? + # endif +@@ -603,6 +694,23 @@ + # define SVR4 + # define STACKBOTTOM ((ptr_t) 0xf0000000) + # endif ++# ifdef OPENBSD ++# define OS_TYPE "OPENBSD" ++# define STACKBOTTOM ((ptr_t) 0xf8000000) ++ extern int etext; ++# define DATASTART ((ptr_t)(&etext)) ++# endif ++# ifdef NETBSD ++# define OS_TYPE "NETBSD" ++# define HEURISTIC2 ++# ifdef __ELF__ ++# define DATASTART GC_data_start ++# define DYNAMIC_LOADING ++# else ++ extern char etext; ++# define DATASTART ((ptr_t)(&etext)) ++# endif ++# endif + # endif + + # ifdef I386 +@@ -657,10 +765,16 @@ + # endif + # ifdef LINUX + # define OS_TYPE "LINUX" +-# define STACKBOTTOM ((ptr_t)0xc0000000) +- /* Appears to be 0xe0000000 for at least one 2.1.91 kernel. */ +- /* Probably needs to be more flexible, but I don't yet */ +- /* fully understand how flexible. */ ++# define LINUX_STACKBOTTOM ++# if 0 ++# define HEURISTIC1 ++# undef STACK_GRAN ++# define STACK_GRAN 0x10000000 ++ /* STACKBOTTOM is usually 0xc0000000, but this changes with */ ++ /* different kernel configurations. In particular, systems */ ++ /* with 2GB physical memory will usually move the user */ ++ /* address space limit, and hence initial SP to 0x80000000. */ ++# endif + # if !defined(LINUX_THREADS) || !defined(REDIRECT_MALLOC) + # define MPROTECT_VDB + # else +@@ -676,8 +790,7 @@ + # endif + # include <features.h> + # if defined(__GLIBC__) && __GLIBC__ >= 2 +- extern int __data_start; +-# define DATASTART ((ptr_t)(&__data_start)) ++# define LINUX_DATA_START + # else + extern char **__environ; + # define DATASTART ((ptr_t)(&__environ)) +@@ -696,6 +809,26 @@ + extern int etext; + # define DATASTART ((ptr_t)((((word) (&etext)) + 0xfff) & ~0xfff)) + # endif ++# ifdef USE_I686_PREFETCH ++# define PREFETCH(x) \ ++ __asm__ __volatile__ (" prefetchnta %0": : "m"(*(char *)(x))) ++ /* Empirically prefetcht0 is much more effective at reducing */ ++ /* cache miss stalls for the targetted load instructions. But it */ ++ /* seems to interfere enough with other cache traffic that the net */ ++ /* result is worse than prefetchnta. */ ++# if 0 ++ /* Using prefetches for write seems to have a slight negative */ ++ /* impact on performance, at least for a PIII/500. */ ++# define PREFETCH_FOR_WRITE(x) \ ++ __asm__ __volatile__ (" prefetcht0 %0": : "m"(*(char *)(x))) ++# endif ++# endif ++# ifdef USE_3DNOW_PREFETCH ++# define PREFETCH(x) \ ++ __asm__ __volatile__ (" prefetch %0": : "m"(*(char *)(x))) ++# define PREFETCH_FOR_WRITE(x) ++ __asm__ __volatile__ (" prefetchw %0": : "m"(*(char *)(x))) ++# endif + # endif + # ifdef CYGWIN32 + # define OS_TYPE "CYGWIN32" +@@ -806,35 +939,48 @@ + + # ifdef MIPS + # define MACH_TYPE "MIPS" +-# ifndef IRIX5 +-# define DATASTART (ptr_t)0x10000000 +- /* Could probably be slightly higher since */ +- /* startup code allocates lots of stuff. */ +-# else +- extern int _fdata; +-# define DATASTART ((ptr_t)(&_fdata)) +-# ifdef USE_MMAP +-# define HEAP_START (ptr_t)0x30000000 +-# else +-# define HEAP_START DATASTART +-# endif +- /* Lowest plausible heap address. */ +- /* In the MMAP case, we map there. */ +- /* In either case it is used to identify */ +- /* heap sections so they're not */ +- /* considered as roots. */ +-# endif /* IRIX5 */ +-# define HEURISTIC2 + /* # define STACKBOTTOM ((ptr_t)0x7fff8000) sometimes also works. */ ++# ifdef LINUX ++ /* This was developed for a linuxce style platform. Probably */ ++ /* needs to be tweaked for workstation class machines. */ ++# define OS_TYPE "LINUX" ++ extern int __data_start; ++# define DATASTART ((ptr_t)(&__data_start)) ++# define ALIGNMENT 4 ++# define USE_GENERIC_PUSH_REGS 1 ++# define STACKBOTTOM 0x80000000 ++ /* In many cases, this should probably use LINUX_STACKBOTTOM */ ++ /* instead. But some kernel versions seem to give the wrong */ ++ /* value from /proc. */ ++# endif /* Linux */ + # ifdef ULTRIX ++# define HEURISTIC2 ++# define DATASTART (ptr_t)0x10000000 ++ /* Could probably be slightly higher since */ ++ /* startup code allocates lots of stuff. */ + # define OS_TYPE "ULTRIX" + # define ALIGNMENT 4 + # endif + # ifdef RISCOS ++# define HEURISTIC2 ++# define DATASTART (ptr_t)0x10000000 + # define OS_TYPE "RISCOS" + # define ALIGNMENT 4 /* Required by hardware */ + # endif + # ifdef IRIX5 ++# define HEURISTIC2 ++ extern int _fdata; ++# define DATASTART ((ptr_t)(&_fdata)) ++# ifdef USE_MMAP ++# define HEAP_START (ptr_t)0x30000000 ++# else ++# define HEAP_START DATASTART ++# endif ++ /* Lowest plausible heap address. */ ++ /* In the MMAP case, we map there. */ ++ /* In either case it is used to identify */ ++ /* heap sections so they're not */ ++ /* considered as roots. */ + # define OS_TYPE "IRIX5" + # define MPROTECT_VDB + # ifdef _MIPS_SZPTR +@@ -849,6 +995,21 @@ + # endif + # define DYNAMIC_LOADING + # endif ++# if defined(NETBSD) && defined(__MIPSEL__) ++# define ALIGNMENT 4 ++# define OS_TYPE "NETBSD" ++# define HEURISTIC2 ++# define USE_GENERIC_PUSH_REGS 1 ++# ifdef __ELF__ ++ extern int etext; ++# define DATASTART GC_data_start ++# define NEED_FIND_LIMIT ++# define DYNAMIC_LOADING ++# else ++# define DATASTART ((ptr_t) 0x10000000) ++# define STACKBOTTOM ((ptr_t) 0x7ffff000) ++# endif /* _ELF_ */ ++# endif + # endif + + # ifdef RS6000 +@@ -862,9 +1023,17 @@ + # endif + + # ifdef HP_PA ++ /* OS is assumed to be HP/UX */ + # define MACH_TYPE "HP_PA" +-# define ALIGNMENT 4 +-# define ALIGN_DOUBLE ++# define OS_TYPE "HPUX" ++# ifdef __LP64__ ++# define CPP_WORDSZ 64 ++# define ALIGNMENT 8 ++# else ++# define CPP_WORDSZ 32 ++# define ALIGNMENT 4 ++# define ALIGN_DOUBLE ++# endif + extern int __data_start; + # define DATASTART ((ptr_t)(&__data_start)) + # if 0 +@@ -877,18 +1046,39 @@ + /* this.) */ + # define STACKBOTTOM ((ptr_t) 0x7b033000) /* from /etc/conf/h/param.h */ + # else +-# define HEURISTIC2 ++ /* Gustavo Rodriguez-Rivera suggested changing HEURISTIC2 */ ++ /* to this. We'll probably do this on other platforms, too. */ ++ /* For now I'll use it where I can test it. */ ++ extern char ** environ; ++# define STACKBOTTOM ((ptr_t)environ) + # endif + # define STACK_GROWS_UP + # define DYNAMIC_LOADING ++# ifndef HPUX_THREADS ++# define MPROTECT_VDB ++# endif + # include <unistd.h> + # define GETPAGESIZE() sysconf(_SC_PAGE_SIZE) +- /* They misspelled the Posix macro? */ + # endif + + # ifdef ALPHA + # define MACH_TYPE "ALPHA" + # define ALIGNMENT 8 ++# define USE_GENERIC_PUSH_REGS ++ /* Gcc and probably the DEC/Compaq compiler spill pointers to preserved */ ++ /* fp registers in some cases when the target is a 21264. The assembly */ ++ /* code doesn't handle that yet, and version dependencies make that a */ ++ /* bit tricky. Do the easy thing for now. */ ++# ifdef NETBSD ++# define OS_TYPE "NETBSD" ++# define HEURISTIC2 ++# define DATASTART GC_data_start ++# define ELFCLASS32 32 ++# define ELFCLASS64 64 ++# define ELF_CLASS ELFCLASS64 ++# define CPP_WORDSZ 64 ++# define DYNAMIC_LOADING ++# endif + # ifdef OSF1 + # define OS_TYPE "OSF1" + # define DATASTART ((ptr_t) 0x140000000) +@@ -909,9 +1099,9 @@ + # define CPP_WORDSZ 64 + # define STACKBOTTOM ((ptr_t) 0x120000000) + # ifdef __ELF__ +- extern int __data_start; +-# define DATASTART &__data_start +-# define DYNAMIC_LOADING ++# define LINUX_DATA_START ++# define DYNAMIC_LOADING ++ /* This doesn't work if the collector is in a dynamic library. */ + # else + # define DATASTART ((ptr_t) 0x140000000) + # endif +@@ -923,6 +1113,48 @@ + # endif + # endif + ++# ifdef IA64 ++# define MACH_TYPE "IA64" ++# define ALIGN_DOUBLE ++ /* Requires 16 byte alignment for malloc */ ++# define ALIGNMENT 8 ++# define USE_GENERIC_PUSH_REGS ++ /* We need to get preserved registers in addition to register windows. */ ++ /* That's easiest to do with setjmp. */ ++# ifdef HPUX ++ --> needs work ++# endif ++# ifdef LINUX ++# define OS_TYPE "LINUX" ++# define CPP_WORDSZ 64 ++ /* This should really be done through /proc, but that */ ++ /* requires we run on an IA64 kernel. */ ++# define STACKBOTTOM ((ptr_t) 0xa000000000000000l) ++ /* We also need the base address of the register stack */ ++ /* backing store. There is probably a better way to */ ++ /* get that, too ... */ ++# define BACKING_STORE_BASE ((ptr_t) 0x9fffffff80000000l) ++# if 1 ++# define SEARCH_FOR_DATA_START ++# define DATASTART GC_data_start ++# else ++ extern int data_start; ++# define DATASTART ((ptr_t)(&data_start)) ++# endif ++# define DYNAMIC_LOADING ++# define MPROTECT_VDB ++ /* Requires Linux 2.3.47 or later. */ ++ extern int _end; ++# define DATAEND (&_end) ++# define PREFETCH(x) \ ++ __asm__ (" lfetch [%0]": : "r"((void *)(x))) ++# define PREFETCH_FOR_WRITE(x) \ ++ __asm__ (" lfetch.excl [%0]": : "r"((void *)(x))) ++# define CLEAR_DOUBLE(x) \ ++ __asm__ (" stf.spill [%0]=f0": : "r"((void *)(x))) ++# endif ++# endif ++ + # ifdef M88K + # define MACH_TYPE "M88K" + # define ALIGNMENT 4 +@@ -953,6 +1185,69 @@ + # define HEURISTIC2 + # endif + ++# if defined(PJ) ++# define ALIGNMENT 4 ++ extern int _etext; ++# define DATASTART ((ptr_t)(&_etext)) ++# define HEURISTIC1 ++# endif ++ ++# ifdef ARM32 ++# define CPP_WORDSZ 32 ++# define MACH_TYPE "ARM32" ++# define ALIGNMENT 4 ++# ifdef NETBSD ++# define OS_TYPE "NETBSD" ++# define HEURISTIC2 ++ extern char etext; ++# define DATASTART ((ptr_t)(&etext)) ++# define USE_GENERIC_PUSH_REGS ++# endif ++# ifdef LINUX ++# define OS_TYPE "LINUX" ++# define HEURISTIC1 ++# undef STACK_GRAN ++# define STACK_GRAN 0x10000000 ++# define USE_GENERIC_PUSH_REGS ++# ifdef __ELF__ ++# define DYNAMIC_LOADING ++# include <features.h> ++# if defined(__GLIBC__) && __GLIBC__ >= 2 ++# define LINUX_DATA_START ++# else ++ extern char **__environ; ++# define DATASTART ((ptr_t)(&__environ)) ++ /* hideous kludge: __environ is the first */ ++ /* word in crt0.o, and delimits the start */ ++ /* of the data segment, no matter which */ ++ /* ld options were passed through. */ ++ /* We could use _etext instead, but that */ ++ /* would include .rodata, which may */ ++ /* contain large read-only data tables */ ++ /* that we'd rather not scan. */ ++# endif ++ extern int _end; ++# define DATAEND (&_end) ++# else ++ extern int etext; ++# define DATASTART ((ptr_t)((((word) (&etext)) + 0xfff) & ~0xfff)) ++# endif ++# endif ++#endif ++ ++#ifdef LINUX_DATA_START ++ /* Some Linux distributions arrange to define __data_start. Some */ ++ /* define data_start as a weak symbol. The latter is technically */ ++ /* broken, since the user program may define data_start, in which */ ++ /* case we lose. Nonetheless, we try both, prefering __data_start. */ ++ /* We assume gcc. */ ++# pragma weak __data_start ++ extern int __data_start; ++# pragma weak data_start ++ extern int data_start; ++# define DATASTART ((ptr_t)(&__data_start != 0? &__data_start : &data_start)) ++#endif ++ + # ifndef STACK_GROWS_UP + # define STACK_GROWS_DOWN + # endif +@@ -995,6 +1290,10 @@ + # define SUNOS5SIGS + # endif + ++# if defined(HPUX) ++# define SUNOS5SIGS ++# endif ++ + # if CPP_WORDSZ != 32 && CPP_WORDSZ != 64 + -> bad word size + # endif +@@ -1021,10 +1320,34 @@ + # undef MPROTECT_VDB + # endif + ++# ifdef USE_MUNMAP ++# undef MPROTECT_VDB /* Can't deal with address space holes. */ ++# endif ++ + # if !defined(PCR_VDB) && !defined(PROC_VDB) && !defined(MPROTECT_VDB) + # define DEFAULT_VDB + # endif + ++# ifndef PREFETCH ++# define PREFETCH(x) ++# define NO_PREFETCH ++# endif ++ ++# ifndef PREFETCH_FOR_WRITE ++# define PREFETCH_FOR_WRITE(x) ++# define NO_PREFETCH_FOR_WRITE ++# endif ++ ++# ifndef CACHE_LINE_SIZE ++# define CACHE_LINE_SIZE 32 /* Wild guess */ ++# endif ++ ++# ifndef CLEAR_DOUBLE ++# define CLEAR_DOUBLE(x) \ ++ ((word*)x)[0] = 0; \ ++ ((word*)x)[1] = 0; ++# endif /* CLEAR_DOUBLE */ ++ + # if defined(_SOLARIS_PTHREADS) && !defined(SOLARIS_THREADS) + # define SOLARIS_THREADS + # endif +@@ -1040,10 +1363,13 @@ + # if defined(SOLARIS_THREADS) && !defined(SUNOS5) + --> inconsistent configuration + # endif ++# if defined(HPUX_THREADS) && !defined(HPUX) ++--> inconsistent configuration ++# endif + # if defined(PCR) || defined(SRC_M3) || \ + defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || \ + defined(IRIX_THREADS) || defined(LINUX_THREADS) || \ +- defined(IRIX_JDK_THREADS) ++ defined(IRIX_JDK_THREADS) || defined(HPUX_THREADS) + # define THREADS + # endif + +@@ -1058,4 +1384,4 @@ + /* include assembly code to do it well. */ + # endif + +-# endif ++# endif /* GCCONFIG_H */ diff --git a/math/rlab/patches/patch-ai b/math/rlab/patches/patch-ai new file mode 100644 index 00000000000..62ddb455551 --- /dev/null +++ b/math/rlab/patches/patch-ai @@ -0,0 +1,181 @@ +$NetBSD: patch-ai,v 1.1.1.1 2001/01/31 07:30:54 jtb Exp $ + +--- make_depends.orig Wed Jan 31 02:04:43 2001 ++++ make_depends +@@ -1,20 +1,20 @@ + main.o: main.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h code.h list.h symbol.h util.h rfile.h rfileio.h mdc.h \ ++ mem.h code.h list.h symbol.h util.h rfile.h rfileio.h mdc.h \ + complex.h bltin.h version.h getopt.h class.h bltin1.h bltin2.h \ +- bltin3.h msr.h rfft.h gc/gc_private.h gc/gc_priv.h gc/config.h \ ++ bltin3.h msr.h rfft.h gc/gc_private.h gc/gc_priv.h \ + gc/gc_hdrs.h fpe.h mathl.h + init.o: init.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ + symbol.h list.h util.h print.h bltin.h bltin1.h bltin2.h bltin3.h \ + msr.h rfft.h rfileio.h mdc.h complex.h rdl.h msrf2.h + code.o: code.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- code.h list.h symbol.h class.h mem.h gc/gc.h y.tab.h bltin.h \ ++ code.h list.h symbol.h class.h mem.h y.tab.h bltin.h \ + function.h util.h rfile.h mdc.h complex.h + symbol.o: symbol.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h symbol.h list.h mem.h gc/gc.h function.h util.h ++ listnode.h symbol.h list.h mem.h function.h util.h + list.o: list.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- util.h list.h mem.h gc/gc.h ++ util.h list.h mem.h + listnode.o: listnode.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h mem.h gc/gc.h util.h list.h ++ listnode.h mem.h util.h list.h + op.o: op.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h code.h \ + list.h symbol.h class.h util.h + opapp.o: opapp.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +@@ -24,116 +24,116 @@ + complex.o: complex.c complex.h rlab.h config.h ent.h mds.h mdr.h \ + btree.h listnode.h util.h list.h mathl.h + function.o: function.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h code.h list.h symbol.h function.h util.h mem.h gc/gc.h ++ listnode.h code.h list.h symbol.h function.h util.h mem.h + rel.o: rel.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ + code.h list.h symbol.h class.h util.h + util.o: util.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- code.h list.h symbol.h mem.h gc/gc.h bltin.h mdc.h complex.h \ ++ code.h list.h symbol.h mem.h bltin.h mdc.h complex.h \ + function.h sort.h fpe.h + btree.o: btree.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- class.h symbol.h list.h function.h util.h mem.h gc/gc.h ++ class.h symbol.h list.h function.h util.h mem.h + mm.o: mm.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ + complex.h + misc.o: misc.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h + fpe.o: fpe.c config.h + ent.o: ent.c ent.h mds.h rlab.h config.h listnode.h mdr.h btree.h \ +- class.h mem.h gc/gc.h util.h list.h ++ class.h mem.h util.h list.h + mathl.o: mathl.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ + mathl.h complex.h util.h list.h + rfileio.o: rfileio.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h class.h symbol.h list.h bltin.h mem.h gc/gc.h util.h mdc.h \ ++ listnode.h class.h symbol.h list.h bltin.h mem.h util.h mdc.h \ + complex.h msr.h msc.h mathl.h + mdr.o: mdr.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h mdrf2.h mdrf1.h mdc.h complex.h util.h list.h bltin1.h \ ++ mem.h mdrf2.h mdrf1.h mdc.h complex.h util.h list.h bltin1.h \ + bltin.h mathl.h fi.h bl.h + class.o: class.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- util.h list.h class.h mem.h gc/gc.h bltin.h function.h mdrf1.h mdc.h \ ++ util.h list.h class.h mem.h bltin.h function.h mdrf1.h mdc.h \ + complex.h mdcf1.h mdr_mdc.h mdsf1.h mdr_mds.h msr.h msrf1.h msrf2.h \ + msc.h mscf1.h mscf2.h + diss.o: diss.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ + code.h list.h symbol.h bltin.h print.h util.h + mdc.o: mdc.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h mdc.h complex.h mdcf2.h mdcf1.h mdr_mdc.h util.h list.h \ ++ mem.h mdc.h complex.h mdcf2.h mdcf1.h mdr_mdc.h util.h list.h \ + bltin1.h bltin.h bl.h fi.h + mdr_mdc.o: mdr_mdc.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h mem.h gc/gc.h mdrf1.h mdrf2.h mdc.h complex.h mdcf1.h \ ++ listnode.h mem.h mdrf1.h mdrf2.h mdc.h complex.h mdcf1.h \ + mdcf2.h util.h list.h + mds.o: mds.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h util.h list.h bltin1.h bltin.h ++ mem.h util.h list.h bltin1.h bltin.h + mdr_mds.o: mdr_mds.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h mem.h gc/gc.h util.h list.h ++ listnode.h mem.h util.h list.h + rfile.o: rfile.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- symbol.h list.h mem.h gc/gc.h util.h ++ symbol.h list.h mem.h util.h + bltin.o: bltin.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- symbol.h list.h mem.h gc/gc.h bltin.h util.h mathl.h complex.h \ ++ symbol.h list.h mem.h bltin.h util.h mathl.h complex.h \ + class.h rfileio.h mdc.h + bltin1.o: bltin1.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h mem.h gc/gc.h bltin.h list.h util.h class.h rfileio.h \ ++ listnode.h mem.h bltin.h list.h util.h class.h rfileio.h \ + mdc.h complex.h mathl.h btreef1.h function.h mdrf1.h mdcf1.h \ + mdr_mdc.h mdsf1.h mdr_mds.h msr.h msrf1.h msc.h mscf1.h + mdrf1.o: mdrf1.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h mdc.h complex.h util.h list.h mdrf1.h mathl.h symbol.h \ ++ mem.h mdc.h complex.h util.h list.h mdrf1.h mathl.h symbol.h \ + sort.h + print.o: print.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- symbol.h list.h bltin.h mem.h gc/gc.h util.h rfileio.h mdc.h \ ++ symbol.h list.h bltin.h mem.h util.h rfileio.h mdc.h \ + complex.h class.h scan.h + getline.o: getline.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h symbol.h list.h mem.h gc/gc.h bltin.h util.h scan.h \ ++ listnode.h symbol.h list.h mem.h bltin.h util.h scan.h \ + print.h class.h rfileio.h mdc.h complex.h + random.o: random.c rlab.h config.h ent.h mds.h mdr.h btree.h \ + listnode.h bltin.h list.h util.h class.h symbol.h random.h fi.h \ + mdrf1.h + mdcf1.o: mdcf1.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h mdc.h complex.h util.h list.h symbol.h mathl.h sort.h ++ mem.h mdc.h complex.h util.h list.h symbol.h mathl.h sort.h + mdsf1.o: mdsf1.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h util.h list.h symbol.h mathl.h complex.h sort.h ++ mem.h util.h list.h symbol.h mathl.h complex.h sort.h + bltin2.o: bltin2.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h mem.h gc/gc.h bltin.h list.h util.h class.h rfileio.h \ ++ listnode.h mem.h bltin.h list.h util.h class.h rfileio.h \ + mdc.h complex.h mathl.h function.h mdrf1.h mdrf2.h mdcf1.h mdcf2.h \ + mdr_mdc.h mdsf1.h mdr_mds.h msr.h msrf1.h msrf2.h msc.h mscf1.h \ + mscf2.h + mdrf2.o: mdrf2.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h symbol.h list.h mdrf1.h mdc.h complex.h util.h mathl.h \ ++ mem.h symbol.h list.h mdrf1.h mdc.h complex.h util.h mathl.h \ + fi.h lp.h bl.h + mdcf2.o: mdcf2.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h symbol.h list.h mdc.h complex.h mdcf1.h util.h mathl.h \ ++ mem.h symbol.h list.h mdc.h complex.h mdcf1.h util.h mathl.h \ + fi.h lp.h bl.h + rfft.o: rfft.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h symbol.h list.h bltin.h mdc.h complex.h util.h class.h \ ++ mem.h symbol.h list.h bltin.h mdc.h complex.h util.h class.h \ + rfileio.h function.h mdrf1.h mdrf2.h mdcf1.h mdcf2.h mdr_mdc.h \ + mdsf1.h mdr_mds.h msr.h msrf1.h msc.h mscf1.h fftp.h fi.h + sort.o: sort.c + r_plot.o: r_plot.c config.h + rstring.o: rstring.c + rdl.o: rdl.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- symbol.h list.h bltin.h class.h util.h mem.h gc/gc.h ++ symbol.h list.h bltin.h class.h util.h mem.h + odei.o: odei.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- class.h symbol.h list.h mem.h gc/gc.h mdrf1.h bltin.h util.h mathl.h \ ++ class.h symbol.h list.h mem.h mdrf1.h bltin.h util.h mathl.h \ + complex.h function.h lp.h fi.h odei.h + btreef1.o: btreef1.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h class.h symbol.h list.h function.h util.h mem.h gc/gc.h ++ listnode.h class.h symbol.h list.h function.h util.h mem.h + msr.o: msr.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h msr.h util.h list.h bltin1.h bltin.h mathl.h complex.h \ ++ mem.h msr.h util.h list.h bltin1.h bltin.h mathl.h complex.h \ + fi.h sparse.h + msrf1.o: msrf1.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h msr.h msc.h mdc.h complex.h mscf1.h mdrf1.h util.h \ ++ mem.h msr.h msc.h mdc.h complex.h mscf1.h mdrf1.h util.h \ + list.h symbol.h sort.h mathl.h fi.h sparse.h + bltin3.o: bltin3.c rlab.h config.h ent.h mds.h mdr.h btree.h \ +- listnode.h mem.h gc/gc.h bltin.h list.h util.h class.h rfileio.h \ ++ listnode.h mem.h bltin.h list.h util.h class.h rfileio.h \ + mdc.h complex.h function.h mdrf1.h mdrf2.h mdcf1.h mdcf2.h mdr_mdc.h \ + mdsf1.h mdr_mds.h msr.h msrf1.h msrf2.h msc.h mscf1.h mscf2.h + msc.o: msc.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h msr.h msrf1.h mdc.h complex.h msc.h mdr_mdc.h util.h \ ++ mem.h msr.h msrf1.h mdc.h complex.h msc.h mdr_mdc.h util.h \ + list.h bltin1.h bltin.h mathl.h fi.h sparse.h + mscf1.o: mscf1.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h msr.h msrf1.h mdc.h complex.h msc.h mdr_mdc.h util.h \ ++ mem.h msr.h msrf1.h mdc.h complex.h msc.h mdr_mdc.h util.h \ + list.h symbol.h sort.h mathl.h fi.h sparse.h + msrf2.o: msrf2.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- mem.h gc/gc.h msr.h msrf1.h mdc.h complex.h msc.h mscf1.h mscf2.h \ ++ mem.h msr.h msrf1.h mdc.h complex.h msc.h mscf1.h mscf2.h \ + mdrf1.h util.h list.h symbol.h sort.h mathl.h class.h fi.h sparse.h \ + mdrf2.h + mscf2.o: mscf2.c rlab.h config.h ent.h mds.h mdr.h btree.h listnode.h \ +- class.h mem.h gc/gc.h msr.h msc.h mdc.h complex.h mscf1.h mdr_mdc.h \ ++ class.h mem.h msr.h msc.h mdc.h complex.h mscf1.h mdr_mdc.h \ + mdcf1.h util.h list.h symbol.h sort.h fi.h sparse.h mdcf2.h + r_pgplot.o: r_pgplot.c config.h + getopt.o: getopt.c diff --git a/math/rlab/patches/patch-aj b/math/rlab/patches/patch-aj new file mode 100644 index 00000000000..2686ea23eb3 --- /dev/null +++ b/math/rlab/patches/patch-aj @@ -0,0 +1,13 @@ +$NetBSD: patch-aj,v 1.1.1.1 2001/01/31 07:30:54 jtb Exp $ + +--- main.c.orig Wed Jan 31 02:08:34 2001 ++++ main.c +@@ -239,7 +239,7 @@ + * ************************************************************** */ + + #ifdef HAVE_GC +-#include "gc_private.h" ++#include "gc_priv.h" + + int real_main (int argc, char *argv[]); + diff --git a/math/rlab/patches/patch-ak b/math/rlab/patches/patch-ak new file mode 100644 index 00000000000..7c51b397673 --- /dev/null +++ b/math/rlab/patches/patch-ak @@ -0,0 +1,22 @@ +$NetBSD: patch-ak,v 1.1.1.1 2001/01/31 07:30:55 jtb Exp $ + +--- misc/rlab~ Wed Apr 21 14:02:13 1999 ++++ misc/rlab +@@ -21,7 +21,7 @@ + # (unless you are sure of what you are doing). + # + +-RD="$RROOT/lib/rlab2" # The parent rlab library directory. ++RD="$RROOT/share/rlab" # The parent rlab library directory. + RLABEXE="$RROOT/bin/rlab-$RLAB_VER" # The rlab executable. + + # +@@ -50,7 +50,7 @@ + # The RLaB2 help directory + # + +-RLAB2_HELP_DIR="$RD/doc/help" ++RLAB2_HELP_DIR="$RD/help" + + # + # The pager to use. diff --git a/math/rlab/patches/patch-al b/math/rlab/patches/patch-al new file mode 100644 index 00000000000..dc93053f77c --- /dev/null +++ b/math/rlab/patches/patch-al @@ -0,0 +1,28 @@ +$NetBSD: patch-al,v 1.1.1.1 2001/01/31 07:30:55 jtb Exp $ + +--- fpe.c.orig Sat Jan 6 18:22:42 2001 ++++ fpe.c +@@ -184,22 +184,5 @@ + } + + /*****************************************************************************/ +-#else /* HAVE_IEEE_HANDLER */ +- +-void +-setup_fpe_handling () +-{ +- ; /* Do nothing */ +-} +- + #endif +- +-#else /* SETUP_FPE */ +- +-void +-setup_fpe_handling () +-{ +- ; /* Do nothing. */ +-} +- +-#endif /* SETUP_FPE */ ++#endif |