aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan-Christofer Demay <jcdemay@gmail.com>2009-09-08 19:32:25 +0000
committerJonathan-Christofer Demay <jcdemay@gmail.com>2009-09-08 19:32:25 +0000
commit564a239e2c21fe3bc1908cbd1e8f8a23ecbde1d1 (patch)
tree3966c57ba2cd91eb6c84c472d1ee05efb4cd6b7a
parentNew package, ebuild written by me (diff)
downloadsci-564a239e2c21fe3bc1908cbd1e8f8a23ecbde1d1.tar.gz
sci-564a239e2c21fe3bc1908cbd1e8f8a23ecbde1d1.tar.bz2
sci-564a239e2c21fe3bc1908cbd1e8f8a23ecbde1d1.zip
Various updates related to sci-mathematics/frama-c
-rw-r--r--dev-lisp/sbcl/Manifest9
-rw-r--r--dev-lisp/sbcl/sbcl-1.0.28-r1.ebuild191
-rw-r--r--dev-ml/ocamlgraph/Manifest3
-rw-r--r--dev-ml/ocamlgraph/files/ocamlgraph-1.1-makefile.patch152
-rw-r--r--dev-ml/ocamlgraph/ocamlgraph-1.1.ebuild52
-rw-r--r--sci-mathematics/frama-c/Manifest15
-rw-r--r--sci-mathematics/frama-c/files/frama-c-20081201-accessors.patch111
-rw-r--r--sci-mathematics/frama-c/files/frama-c-20090601_beta1-accessors.patch26
-rw-r--r--sci-mathematics/frama-c/files/frama-c-20090601_beta1-configure.patch320
-rw-r--r--sci-mathematics/frama-c/files/frama-c-20090601_beta1-install_files.patch12
-rw-r--r--sci-mathematics/frama-c/files/frama-c-20090601_beta1-ocamlgraph.patch16
-rw-r--r--sci-mathematics/frama-c/files/frama-c-20090601_beta1-printexc.patch290
-rw-r--r--sci-mathematics/frama-c/files/frama-c-20090601_beta1-states_hook.patch (renamed from sci-mathematics/frama-c/files/frama-c-20081201-states_hook.patch)56
-rw-r--r--sci-mathematics/frama-c/files/frama-c-20090601_beta1-stmt_deps.patch (renamed from sci-mathematics/frama-c/files/frama-c-20081201-stmt_deps.patch)56
-rw-r--r--sci-mathematics/frama-c/frama-c-20081201-r1.ebuild90
-rw-r--r--sci-mathematics/frama-c/frama-c-20081201.ebuild76
-rw-r--r--sci-mathematics/frama-c/frama-c-20090601_beta1.ebuild73
-rw-r--r--sci-mathematics/pff/Manifest4
-rw-r--r--sci-mathematics/pff/pff-8.2.1.2.ebuild2
-rw-r--r--sci-mathematics/pvs/Manifest16
-rw-r--r--sci-mathematics/pvs/files/4.2/pvs-4.2-64bit.patch (renamed from sci-mathematics/pvs/files/pvs-4.2-patch-bddp)160
-rw-r--r--sci-mathematics/pvs/files/4.2/pvs-4.2-config.patch2766
-rw-r--r--sci-mathematics/pvs/files/4.2/pvs-4.2-emacs.patch455
-rw-r--r--sci-mathematics/pvs/files/4.2/pvs-4.2-emacs23.patch21
-rw-r--r--sci-mathematics/pvs/files/4.2/pvs-4.2-latex.patch48
-rw-r--r--sci-mathematics/pvs/files/4.2/pvs-4.2-mona.patch29
-rw-r--r--sci-mathematics/pvs/files/4.2/pvs-4.2-sbcl-pic.patch48
-rw-r--r--sci-mathematics/pvs/files/4.2/pvs-4.2-sbcl.patch3335
-rw-r--r--sci-mathematics/pvs/files/4.2/pvs-4.2-typo.patch96
-rw-r--r--sci-mathematics/pvs/files/4.2/pvs-4.2-unused.patch11
-rw-r--r--sci-mathematics/pvs/files/pvs-4.2-patch-make52
-rw-r--r--sci-mathematics/pvs/files/pvs-4.2-patch-sbcl6847
-rw-r--r--sci-mathematics/pvs/pvs-4.2-r1.ebuild83
-rw-r--r--sci-mathematics/pvs/pvs-4.2.ebuild50
-rw-r--r--sci-mathematics/why/Manifest6
-rw-r--r--sci-mathematics/why/files/why-2.19-jessie_lib.patch43
-rw-r--r--sci-mathematics/why/files/why-2.19-sandbox.patch75
-rw-r--r--sci-mathematics/why/why-2.19.ebuild (renamed from sci-mathematics/why/why-2.17.ebuild)28
38 files changed, 8286 insertions, 7437 deletions
diff --git a/dev-lisp/sbcl/Manifest b/dev-lisp/sbcl/Manifest
new file mode 100644
index 000000000..c74aa0a6b
--- /dev/null
+++ b/dev-lisp/sbcl/Manifest
@@ -0,0 +1,9 @@
+DIST sbcl-1.0.23-mips-linux-binary.tar.bz2 7932957 RMD160 5fc1f48beff1b67e101875aae4108fa2aa90d574 SHA1 fd409307855d354469297334588a988c35db386d SHA256 9a4ef25e7119ad12ca4789ad8e333b6550bbb865f8eae06c9fb66fbf9323f960
+DIST sbcl-1.0.28-alpha-linux-binary.tar.bz2 7573824 RMD160 37a77f425b285185171c4d8677f367ebdbb362d8 SHA1 a389ae749721987b9f38d1dd25288b14615054b5 SHA256 0bd8125e1375a75b9dda286439dcbe9861d6df5c6fc8475fd217b8b757edf9cc
+DIST sbcl-1.0.28-mipsel-linux-binary.tar.bz2 8099121 RMD160 e58f02a4e2c68c46440fa58c3e951352c2de591b SHA1 4669ee76d4b477255cbe151459085d49703031f5 SHA256 ddff119b6e868b05704b9d171c7defb626a845f991cc0c1ec90fc1c11e022a13
+DIST sbcl-1.0.28-powerpc-linux-binary.tar.bz2 7621107 RMD160 5fc0a18fd620e54bbaeef7d58f759675f6a72e3f SHA1 70126291ccb488ea45b65da3e97fdd320bd1d75b SHA256 b51fe8cd3a998d178fc1876d10016439cfa4ed3566d761c331cacab364acd591
+DIST sbcl-1.0.28-source.tar.bz2 3307445 RMD160 eb381d546dfdf5bb686d756f241459c651a9f5f2 SHA1 984c48d91a75ffd2cd2efaedff9c5563ae5e98e7 SHA256 04026b3922e90c5560a27070d6c48b30b682378f55512a1d2194de71f837f14b
+DIST sbcl-1.0.28-sparc-linux-binary.tar.bz2 8032042 RMD160 ca965bd20980f9f9b528a1c39be4979ad2941660 SHA1 6dea2a9637c272fd9406cd290cbfdbdbf3b0b8dc SHA256 a2e848ac11b0f16bb91866bd187949d908ad94fabb958a0b56320fc0e8b8923e
+DIST sbcl-1.0.28-x86-64-linux-binary.tar.bz2 8159304 RMD160 641a6848a1436ac3b748b21edb8a51aec48165de SHA1 5a8ad915cbe3bf3ec35a299bdbe48babe793c21f SHA256 cbb729bdf8a3517ead305f6d0f3a2c45d8ce1a2a1e30e881731f505adc30997e
+DIST sbcl-1.0.28-x86-linux-binary.tar.bz2 8370430 RMD160 b77461d82484fdf5e251a929fbd797b3256a1de1 SHA1 b57bd4ab78c98766993711ab16e8493e815cbc99 SHA256 68aed5ed7e1fb6f64b789bfa722efe82b23dbee72853ad60d35503e67792b8e4
+EBUILD sbcl-1.0.28-r1.ebuild 6050 RMD160 7acb83e9cae81b28a298ae6e95543922738353b7 SHA1 b7cadd5e7789a5ea286efbd13a73418804c98cf2 SHA256 5baca064e6641a7c38af81436f24d679f589b165ac329f559fc59da96947ae63
diff --git a/dev-lisp/sbcl/sbcl-1.0.28-r1.ebuild b/dev-lisp/sbcl/sbcl-1.0.28-r1.ebuild
new file mode 100644
index 000000000..37fffa4f3
--- /dev/null
+++ b/dev-lisp/sbcl/sbcl-1.0.28-r1.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lisp/sbcl/sbcl-1.0.28.ebuild,v 1.1 2009/05/04 18:11:08 hkbst Exp $
+
+EAPI=2
+
+inherit common-lisp-common-3 eutils flag-o-matic
+
+#same order as http://www.sbcl.org/platform-table.html
+BV_X86=1.0.28
+BV_AMD64=1.0.28
+BV_PPC=1.0.28
+BV_SPARC=1.0.28
+BV_ALPHA=1.0.28
+BV_MIPS=1.0.23
+BV_MIPSEL=1.0.28
+
+DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp."
+HOMEPAGE="http://sbcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
+ x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
+ amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
+ ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
+ sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
+ alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
+ mips? ( !cobalt? ( mirror://sourceforge/sbcl/${PN}-${BV_MIPS}-mips-linux-binary.tar.bz2 ) )
+ mips? ( cobalt? ( mirror://sourceforge/sbcl/${PN}-${BV_MIPSEL}-mipsel-linux-binary.tar.bz2 ) )"
+
+# SRC_URI is part of the metadata cache; it's evaluated contents must be independent of the system that creates the metadata cache.
+# ILLEGAL: mips? ( mirror://sourceforge/sbcl/${PN}-${BV_MIPS}-$([[$(tc-endian) = big]] && echo mips || echo mipsel)-linux-binary.tar.bz2 )
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~ppc ~sparc ~x86"
+IUSE="ldb source +threads +unicode doc cobalt"
+
+DEPEND="doc? ( sys-apps/texinfo || ( >=media-gfx/graphviz-2.20[png] >=media-gfx/graphviz-2.24.0 ) )"
+RDEPEND="elibc_glibc? ( >=sys-libs/glibc-2.3 || ( <sys-libs/glibc-2.6[nptl] >=sys-libs/glibc-2.6 ) )"
+PDEPEND="dev-lisp/gentoo-init"
+
+PROVIDE="virtual/commonlisp"
+
+# Disable warnings about executable stacks, as this won't be fixed soon by upstream
+QA_EXECSTACK="usr/bin/sbcl usr/lib/sbcl/src/runtime/sbcl usr/lib/sbcl/src/runtime/*.o"
+
+pkg_setup() {
+ if built_with_use sys-devel/gcc hardened && gcc-config -c | grep -qv vanilla; then
+ eerror "So-called \"hardened\" compiler features are incompatible with SBCL. You"
+ eerror "must use gcc-config to select a profile with non-hardened features"
+ eerror "(the \"vanilla\" profile) and \"source /etc/profile\" before continuing."
+ die
+ fi
+}
+
+CONFIG="${S}/customize-target-features.lisp"
+ENVD="${T}/50sbcl"
+
+usep() {
+ use ${1} && echo "true" || echo "false"
+}
+
+sbcl_feature() {
+ echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
+}
+
+sbcl_apply_features() {
+ cat > "${CONFIG}" <<'EOF'
+(lambda (list)
+ (flet ((enable (x) (pushnew x list))
+ (disable (x) (setf list (remove x list))))
+EOF
+ if use x86 || use amd64; then
+ sbcl_feature "$(usep threads)" ":sb-thread"
+ fi
+ sbcl_feature "$(usep ldb)" ":sb-ldb"
+ sbcl_feature "false" ":sb-test"
+ sbcl_feature "$(usep unicode)" ":sb-unicode"
+ cat >> "${CONFIG}" <<'EOF'
+ )
+ list)
+EOF
+ cat "${CONFIG}"
+}
+
+src_unpack() {
+ unpack ${A}
+ mv sbcl-*-linux sbcl-binary
+ cd "${S}"
+}
+
+src_prepare() {
+ use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
+
+ sed "s,/lib,/$(get_libdir),g" -i install.sh
+ sed "s,/usr/local/lib,/usr/$(get_libdir),g" -i src/runtime/runtime.c # #define SBCL_HOME ...
+
+ find . -type f -name .cvsignore -delete
+}
+
+src_configure() {
+ # customizing SBCL version as per
+ # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
+ echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
+
+ # applying customizations
+ sbcl_apply_features
+}
+
+src_compile() {
+ local bindir="${WORKDIR}"/sbcl-binary
+
+ append-ldflags -Wl,--no-as-needed # see Bug #132992
+
+ # clear the environment to get rid of non-ASCII strings, see bug 174702
+ # set HOME for paludis
+ env - HOME="${T}" \
+ PATH="${bindir}/src/runtime:${PATH}" SBCL_HOME="${bindir}/output" GNUMAKE=make ./make.sh \
+ "sbcl --no-sysinit --no-userinit --disable-debugger --core ${bindir}/output/sbcl.core" \
+ || die "make failed"
+
+ # need to set HOME because libpango(used by graphviz) complains about it
+ if use doc; then
+ env - HOME="${T}" make -C doc/manual info html || die "Cannot build manual"
+ env - HOME="${T}" make -C doc/internals html || die "Cannot build internal docs"
+ fi
+}
+
+src_test() {
+# FILES="exhaust.impure.lisp"
+ cd tests
+ sh run-tests.sh
+# sh run-tests.sh ${FILES}
+# sh run-tests.sh --break-on-failure ${FILES}
+}
+
+src_install() {
+ # install system-wide initfile
+ dodir /etc/
+ cat > "${D}"/etc/sbclrc <<EOF
+;;; The following is required if you want source location functions to
+;;; work in SLIME, for example.
+
+(setf (logical-pathname-translations "SYS")
+ '(("SYS:SRC;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/src/**/*.*")
+ ("SYS:CONTRIB;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/**/*.*")))
+
+;;; Setup ASDF
+(load "/etc/gentoo-init.lisp")
+EOF
+
+ # Install documentation
+ dodir /usr/share/man
+ dodir /usr/share/doc/${PF}
+ unset SBCL_HOME
+ INSTALL_ROOT="${D}"/usr DOC_DIR="${D}"/usr/share/doc/${PF} sh install.sh || die "install.sh failed"
+
+ # rm empty directories lest paludis complain about this
+ rmdir "${D}"/usr/$(get_libdir)/sbcl/{site-systems,sb-posix/test-lab,sb-cover/test-output} 2>/dev/null
+
+ doman doc/sbcl-asdf-install.1
+
+ dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README STYLE SUPPORT TLA TODO
+
+ if use doc; then
+ dohtml doc/html/*
+ doinfo doc/manual/*.info*
+ dohtml -r doc/internals/sbcl-internals
+ fi
+
+ # install the SBCL source
+ if use source; then
+ ./clean.sh
+ # for BSD cp compat use -pPR instead of -a (may not be needed anymore)
+ cp -pPR src "${D}"/usr/$(get_libdir)/sbcl/
+ fi
+
+ # necessary for running newly-saved images
+ echo "SBCL_HOME=/usr/$(get_libdir)/${PN}" > "${ENVD}"
+ echo "SBCL_SOURCE_ROOT=/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
+ doenvd "${ENVD}"
+
+ impl-save-timestamp-hack sbcl || die
+}
+
+pkg_postinst() {
+ standard-impl-postinst sbcl
+}
+
+pkg_postrm() {
+ standard-impl-postrm sbcl /usr/bin/sbcl
+}
diff --git a/dev-ml/ocamlgraph/Manifest b/dev-ml/ocamlgraph/Manifest
new file mode 100644
index 000000000..f62c106c2
--- /dev/null
+++ b/dev-ml/ocamlgraph/Manifest
@@ -0,0 +1,3 @@
+AUX ocamlgraph-1.1-makefile.patch 5379 RMD160 e97ef8d3b70bd470f419ea5fd0d18a77c8f1df8a SHA1 f9b1236890d7372b19f17489ced2ccf86c5397d9 SHA256 53efa9874769339eca9adefc09ad40ea0abc28a8fe248d7443df71c50f18d054
+DIST ocamlgraph-1.1.tar.gz 195045 RMD160 f48af8e9c1c681bf6ee42ea22267ce022777db57 SHA1 70152127fd05aa97006434614441425182e87471 SHA256 955e0bfbfda83e055b0cf0527af0b706c8f4a14f680d3a77be1e1e725e1cfb3f
+EBUILD ocamlgraph-1.1.ebuild 1005 RMD160 31ce50aa3fdf5c98986ceae5b2e5684a956df22f SHA1 575d1b50fc6c1f6aed30f4ad2eae1d86fee7ff47 SHA256 e98c0a4509a55bf95cc2fddd0f8549e8197213774745ed10049fe6cfb4d287cf
diff --git a/dev-ml/ocamlgraph/files/ocamlgraph-1.1-makefile.patch b/dev-ml/ocamlgraph/files/ocamlgraph-1.1-makefile.patch
new file mode 100644
index 000000000..91444f1d9
--- /dev/null
+++ b/dev-ml/ocamlgraph/files/ocamlgraph-1.1-makefile.patch
@@ -0,0 +1,152 @@
+diff -Naur ocamlgraph-1.1-orig/Makefile.in ocamlgraph-1.1-ptch/Makefile.in
+--- ocamlgraph-1.1-orig/Makefile.in 2009-06-23 13:05:21.000000000 +0000
++++ ocamlgraph-1.1-ptch/Makefile.in 2009-07-20 17:31:08.000000000 +0000
+@@ -143,10 +143,13 @@
+
+ viewer: $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.$(OCAMLBEST)
+
++ifeq (@LABLGNOMECANVAS@,yes)
+ VIEWER_CMO=viewGraph viewGraph_select viewGraph_utils viewGraph_test
+ VIEWER_CMO:=$(patsubst %,$(VIEWER_DIR)/%.cmo, $(VIEWER_CMO))
++endif
+ VIEWER_CMX=$(VIEWER_CMO:.cmo=.cmx)
+ VIEWER_CMI=$(VIEWER_CMO:.cmo=.cmi)
++VIEWER_O=$(VIEWER_CMO:.cmo=.o)
+
+ VIEWER_INCLUDES= @INCLUDEGTK2@ -I $(VIEWER_DIR) $(INCLUDES) -I .
+
+@@ -240,49 +243,38 @@
+
+ DESTDIR =
+
+-install: install-$(OCAMLBEST) install-byte
+-ifeq (@LABLGNOMECANVAS@,yes)
+-ifeq ($(OCAMLBEST),byte)
+- cp -f $(BINDIR)/graph-editor.byte $(BINDIR)/graph-editor$(EXE)
+- cp -f $(BINDIR)/graph-viewer.byte $(BINDIR)/graph-viewer$(EXE)
++ifdef OCAMLFIND
++install-findlib: META install-bin
++ mkdir -p $(DESTDIR)/$(OCAMLLIB)
++ifeq ($(OCAMLBEST),opt)
++ $(OCAMLFIND) install -destdir $(DESTDIR)/$(OCAMLLIB) ocamlgraph META $(SRCDIR)/*.mli view_graph/*.mli view_graph/viewGraph_test.ml \
++ graph$(LIBEXT) graph.cmx graph.o graph.cmo graph.cmi $(CMA) $(CMXA) \
++ $(VIEWER_CMX) $(VIEWER_CMO) $(VIEWER_CMI) $(VIEWER_O)
+ else
+- cp -f $(BINDIR)/graph-editor.opt $(BINDIR)/graph-editor$(EXE)
+- cp -f $(BINDIR)/graph-viewer.opt $(BINDIR)/graph-viewer$(EXE)
++ $(OCAMLFIND) install -destdir $(DESTDIR)/$(OCAMLLIB) ocamlgraph META $(SRCDIR)/*.mli view_graph/*.mli \
++ graph.cmo graph.cmi $(CMA) view_graph/viewGraph_test.ml \
++ $(VIEWER_CMO) $(VIEWER_CMI)
+ endif
+ endif
+
+-install-byte:
+- cp -f graph.cmo graph.cmi $(CMA) "$(DESTDIR)$(OCAMLLIB)"
+-ifeq (@LABLGNOMECANVAS@,yes)
+- cp -f $(ED_DIR)/editor.byte $(BINDIR)/graph-editor.byte
+- cp -f $(VIEWER_CMO) "$(DESTDIR)$(OCAMLLIB)"
+- cp -f $(VIEWER_DIR)/viewgraph.byte $(BINDIR)/graph-viewer.byte
+-endif
+-
+-install-opt: install-byte
+- cp -f graph$(LIBEXT) graph.cmx $(CMXA) "$(DESTDIR)$(OCAMLLIB)"
+-ifeq (@LABLGNOMECANVAS@,yes)
+- cp -f $(ED_DIR)/editor.opt $(BINDIR)/graph-editor.opt
+- cp -f $(VIEWER_CMX) "$(DESTDIR)$(OCAMLLIB)"
+- cp -f $(VIEWER_DIR)/viewgraph.opt $(BINDIR)/graph-viewer.opt
+-endif
++META: META.in Makefile
++ sed -e s/VERSION/$(VERSION)/ -e s/CMA/$(CMA)/ -e s/CMXA/$(CMXA)/ \
++ $@.in > $@
+
+-install-findlib: META
+-ifdef OCAMLFIND
++install-bin:
+ ifeq (@LABLGNOMECANVAS@,yes)
+- $(OCAMLFIND) install ocamlgraph META $(SRCDIR)/*.mli \
+- graph$(LIBEXT) graph.cmx graph.cmo graph.cmi $(CMA) $(CMXA) \
+- $(VIEWER_CMX) $(VIEWER_CMO)
++ mkdir -p $(DESTDIR)/$(BINDIR)
++ cp -f $(ED_DIR)/editor.byte $(DESTDIR)/$(BINDIR)/ocamlgraph-editor.byte
++ cp -f $(VIEWER_DIR)/viewgraph.byte $(DESTDIR)/$(BINDIR)/ocamlgraph-viewer.byte
++ifeq ($(OCAMLBEST),opt)
++ cp -f $(ED_DIR)/editor.opt $(DESTDIR)/$(BINDIR)/ocamlgraph-editor$(EXE)
++ cp -f $(VIEWER_DIR)/viewgraph.opt $(DESTDIR)/$(BINDIR)/ocamlgraph-viewer$(EXE)
+ else
+- $(OCAMLFIND) install ocamlgraph META $(SRCDIR)/*.mli \
+- graph$(LIBEXT) graph.cmx graph.cmo graph.cmi $(CMA) $(CMXA)
++ mv -f $(DESTDIR)/$(BINDIR)/ocamlgraph-editor.byte $(DESTDIR)/$(BINDIR)/ocamlgraph-editor$(EXE)
++ mv -f $(DESTDIR)/$(BINDIR)/ocamlgraph-viewer.byte $(DESTDIR)/$(BINDIR)/ocamlgraph-viewer$(EXE)
+ endif
+ endif
+
+-META: META.in Makefile
+- sed -e s/VERSION/$(VERSION)/ -e s/CMA/$(CMA)/ -e s/CMXA/$(CMXA)/ \
+- $@.in > $@
+-
+ # documentation
+ ###############
+
+@@ -298,7 +290,7 @@
+ mkdir -p doc
+ rm -f doc/*
+ $(OCAMLDOC) -d doc -html $(INCLUDES) $(DOC_SRC)
+- $(MAKE) -C $(VIEWER_DIR) doc
++ #$(MAKE) -C $(VIEWER_DIR) doc
+
+ # literate programming
+ $(NAME).tex: $(DOC_SRC)
+@@ -336,7 +328,7 @@
+
+ export: source export-doc export-web export-delaunay
+
+-source:
++source: svn-clean
+ mkdir -p export
+ cd export; rm -rf $(EXPORTDIR)
+ mkdir -p export/$(EXPORTDIR)/bin
+@@ -345,10 +337,10 @@
+ cp export/$(TAR).gz $(FTP)
+ cp README FAQ CREDITS COPYING LICENSE CHANGES $(EXAMPLES) $(FTP)
+
+-# Build and install the .tar.gz requiered by Frama-C
++# Build and install the .tar.gz required by Frama-C
+ framac: EXPORTDIR=ocamlgraph
+ framac: FTP=$$HOME/frama-c
+-framac:
++framac: svn-clean
+ mkdir -p export
+ cd export; rm -rf $(EXPORTDIR)
+ mkdir -p export/$(EXPORTDIR)/bin
+@@ -441,20 +433,22 @@
+ #######
+
+ clean:
+- rm -f *~
++ -$(RM) *~
+ for d in $(SRCDIR) $(LIBDIR) $(ED_DIR) $(VIEWER_DIR) tests examples; \
+ do \
+- rm -f $$d/*.cm[iox] $$d/*$(OBJEXT) $$d/*~; \
++ $(RM) $$d/*.cm[iox] $$d/*$(OBJEXT) $$d/*~; \
+ done
+- rm -f $(GENERATED) $(SRCDIR)/dot_parser.output
+- rm -f graph.*a graph.cm* graph.o graph$(LIBEXT)
+- rm -f $(ED_DIR)/editor.byte $(ED_DIR)/editor.opt
+- rm -f $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.opt
+- rm -f *.haux *.aux *.log $(NAME).tex $(NAME).dvi $(DOCFILES)
+- rm -f $(EXAMPLESBIN)
++ -$(RM) $(GENERATED) $(SRCDIR)/dot_parser.output
++ -$(RM) graph.*a graph.cm* graph.o graph$(LIBEXT)
++ -$(RM) $(ED_DIR)/editor.byte $(ED_DIR)/editor.opt
++ -$(RM) $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.opt
++ -$(RM) *.haux *.aux *.log $(NAME).tex $(NAME).dvi $(DOCFILES)
++ -$(RM) $(EXAMPLESBIN)
+
+ dist-clean distclean:: clean
+- rm -f Makefile config.cache config.log config.status *.byte *.opt
++ -$(RM) Makefile config.cache config.log config.status *.byte *.opt
++ -$(RM) src/version.ml
++ -$(RM) .depend
+
+ svnclean svn-clean:: dist-clean
+ rm -f config.* configure configure.lineno
diff --git a/dev-ml/ocamlgraph/ocamlgraph-1.1.ebuild b/dev-ml/ocamlgraph/ocamlgraph-1.1.ebuild
new file mode 100644
index 000000000..c1efe4a48
--- /dev/null
+++ b/dev-ml/ocamlgraph/ocamlgraph-1.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: Exp $
+
+inherit eutils
+
+DESCRIPTION="A graph library for Objective Caml"
+HOMEPAGE="http://ocamlgraph.lri.fr/"
+SRC_URI="http://ocamlgraph.lri.fr/download/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+RDEPEND=">=dev-lang/ocaml-3.10.2"
+
+DEPEND="${RDEPEND}
+ gtk? ( >=dev-ml/lablgtk-2.6 )
+ ocamlopt? ( dev-lang/ocaml[ocamlopt] )"
+
+IUSE="doc examples gtk +ocamlopt"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch "${FILESDIR}/${P}-makefile.patch"
+}
+
+src_compile() {
+ econf || die "econf failed"
+ emake DESTDIR="/" || die "emake failed"
+
+ if use doc; then
+ emake doc || die "emake doc failed"
+ fi
+}
+
+src_install() {
+ emake install-bin install-findlib DESTDIR="${D}" || die "emake install failed"
+ dodoc CHANGES COPYING CREDITS FAQ README
+
+ if use doc; then
+ dohtml doc/*
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
+
diff --git a/sci-mathematics/frama-c/Manifest b/sci-mathematics/frama-c/Manifest
index 4a1733b91..ee2ae8004 100644
--- a/sci-mathematics/frama-c/Manifest
+++ b/sci-mathematics/frama-c/Manifest
@@ -1,6 +1,9 @@
-AUX frama-c-20081201-accessors.patch 4753 RMD160 28d467a8f0ee2485a67a23d325e3057cd2a14809 SHA1 246fe57a94206bd8d05902170835b874a77ed6b0 SHA256 3bf05babc17e30257ae5be12bdce7f3a6e60017401a5cdb60e9bfe9d7393f9f5
-AUX frama-c-20081201-states_hook.patch 3549 RMD160 15c095e75262d1acd70d00d10f9421d91b4f833a SHA1 bd2adb7de2590641da44c861961fd05249b27824 SHA256 a649b99d8fd932de3a681464909ca3cf55dca3d60f547e4a343620f8323b1c3b
-AUX frama-c-20081201-stmt_deps.patch 3929 RMD160 cca1a2851a2c4c7d2de24258d49128dcfa59eff8 SHA1 22c7a14de291125308dcb7e9aaa5cfd3a63c4423 SHA256 2a5b9e249446d176041e6a0c3c24586bc9cd3881700efd61c6d2d135d2a8a3d2
-DIST frama-c-Lithium-20081201.tar.gz 9475352 RMD160 8624cf142b627af8800d6712f2adde6f86527ac0 SHA1 e724cd21d77e44645e9369763c848e59cced110b SHA256 56e504a7a475a79880b5e830362aa6d337bbd9bfe4492a546990118b806120a7
-EBUILD frama-c-20081201-r1.ebuild 2735 RMD160 55fc2e25f318c0180be0b8343bd3bb1125379265 SHA1 9eac71f33aaa07cbf4edfced5d2a2f12566e9228 SHA256 ed350ccc9a47555d3abacce0ec0bfe0f740c6b9496b034f51dcd247159aeaeb3
-EBUILD frama-c-20081201.ebuild 2079 RMD160 fb86b1d13a7f2be039e33e58f6e141fb859be9ec SHA1 70e39c0ebd3c8548fabe0bdfce1a2b2a61fb32fe SHA256 6a74c04eb09982387b8566304310b814f74d3a7540d9ca69c6f70dc47d784da2
+AUX frama-c-20090601_beta1-accessors.patch 1277 RMD160 0158505b80d98477fa39f67c80b12e0414f26b41 SHA1 0a3427db59af94e7ca534cc44bedd0ca9742c7f3 SHA256 ee4a0ebf3702ad6d39ff7522ae53aabc0d907bf51bf177bf71d69ac6a760aa62
+AUX frama-c-20090601_beta1-configure.patch 11290 RMD160 500f61b8fba8288ec6f546d4ab8fd4267002457c SHA1 d95b00b7f5f5ee53450af0c2a14d63e99b14fa4f SHA256 eb4bc27a77db309f95c8030e2b4c93fcd430fca84af31ba2f8a73fb686b4d593
+AUX frama-c-20090601_beta1-install_files.patch 746 RMD160 19e8ff63018342b9e1917bdf80f786d7f8d4fdf7 SHA1 f99bbb80e2d3316a9fa4f204773bff95143159db SHA256 359676758f92ff385c5137f596a342233f09d741a724128ed8127228f58a718c
+AUX frama-c-20090601_beta1-ocamlgraph.patch 571 RMD160 40bb7627c3cca8a1a1a5b8309d12aeca4915067b SHA1 48b618a9ef22606964c873bbaa7817e7c3fd4018 SHA256 1bb63323d8a07e7d43adfe70a618a576d937c098f178790f18e6d404166dc85a
+AUX frama-c-20090601_beta1-printexc.patch 8717 RMD160 af10bb8a9869e5ab6d4b32b9d4a5f379686f6b5a SHA1 c7aabb6373b10b6e45167c1a4d0ea4c3a6213f58 SHA256 680a99a0a73d6b0eb6f2dcd41caae02b5cd5b4846de1af85b34b5092bab4e5cf
+AUX frama-c-20090601_beta1-states_hook.patch 3904 RMD160 8d859be8eb8917b415a3b6f9a7c30a62d1de2215 SHA1 e4e76ec1b83f2409d2b16f84db40f873ff8cb0ce SHA256 274d3b5a68d437b01186a7b6734059033b9750dd3de6c0c7b02a7e88672d6ba1
+AUX frama-c-20090601_beta1-stmt_deps.patch 4076 RMD160 8aca2d28f6c53de8d43455ab8216e43c16ed7dd3 SHA1 8ce7665ec28ca6b3d1021b5e6cc828bb8ecd18bd SHA256 349c897c45d2af21118bc0e1ce90de94a4c8906d38d3c562f8d729745f6f5d33
+DIST frama-c-Beryllium-20090601-beta1.tar.gz 17564297 RMD160 d24e815c850f2bb66816c316d31eaf7f015f2741 SHA1 7d2219f1753f32bfa0e3a950fbd05e059e88538a SHA256 349a984b15ee72381f851b5fe89115656e450f49eb98ce3f3c3969fa2031c42a
+EBUILD frama-c-20090601_beta1.ebuild 1827 RMD160 bfe59cf239e2a40b9a6f5103d0ee831b639fc407 SHA1 ef901f0ba51cd0dfeab9f52b862a837be8a4714f SHA256 d49e14131442f52e03a47a9bbfc729fa104667061a044cb9d70d80b64a4c7de3
diff --git a/sci-mathematics/frama-c/files/frama-c-20081201-accessors.patch b/sci-mathematics/frama-c/files/frama-c-20081201-accessors.patch
deleted file mode 100644
index 55a7d5672..000000000
--- a/sci-mathematics/frama-c/files/frama-c-20081201-accessors.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-diff -Naur frama-c-Lithium-20081201-orig/src/ai/base.ml frama-c-Lithium-20081201-patch/src/ai/base.ml
---- frama-c-Lithium-20081201-orig/src/ai/base.ml 2008-12-16 10:29:48.000000000 +0100
-+++ frama-c-Lithium-20081201-patch/src/ai/base.ml 2009-02-16 14:43:59.000000000 +0100
-@@ -188,6 +188,11 @@
- assert (Int.eq size Int.zero);
- Unknown (Int.zero, Bit_utils.max_bit_address ())
-
-+let get_varinfo t =
-+ match t with
-+ | Var (t,_) | Initialized_Var (t,_) -> t
-+ | _ -> assert false
-+
- let create_varinfo varinfo =
- assert (not varinfo.vlogic);
- Var (varinfo,validity_from_type varinfo)
-diff -Naur frama-c-Lithium-20081201-orig/src/ai/base.mli frama-c-Lithium-20081201-patch/src/ai/base.mli
---- frama-c-Lithium-20081201-orig/src/ai/base.mli 2008-12-16 10:29:48.000000000 +0100
-+++ frama-c-Lithium-20081201-patch/src/ai/base.mli 2009-02-16 14:43:59.000000000 +0100
-@@ -55,6 +55,7 @@
- val is_local: t -> Cil_types.fundec -> bool
- val is_hidden_variable : t -> bool
- val validity_from_type : Cil_types.varinfo -> validity
-+val get_varinfo : t -> Cil_types.varinfo
- val create_varinfo : Cil_types.varinfo -> t
- val create_logic : Cil_types.varinfo -> validity -> t
- val create_initialized : Cil_types.varinfo -> validity -> t
-diff -Naur frama-c-Lithium-20081201-orig/src/memory_state/lmap_bitwise.ml frama-c-Lithium-20081201-patch/src/memory_state/lmap_bitwise.ml
---- frama-c-Lithium-20081201-orig/src/memory_state/lmap_bitwise.ml 2008-12-16 10:29:49.000000000 +0100
-+++ frama-c-Lithium-20081201-patch/src/memory_state/lmap_bitwise.ml 2009-02-16 14:43:57.000000000 +0100
-@@ -67,6 +67,7 @@
- val find_base: t -> Zone.t -> LOffset.t
- exception Cannot_fold
- val fold : (Zone.t -> bool * y -> 'a -> 'a) -> t -> 'a -> 'a
-+ val fold_base : (Base.t -> LOffset.t -> 'a -> 'a) -> t -> 'a -> 'a
- val map2 : ((bool * y) option -> (bool * y) option -> bool * y)
- -> t -> t -> t
- val copy_paste : f:(bool * y -> bool * y) -> location -> location -> t -> t
-@@ -142,6 +143,11 @@
- m
- acc
-
-+ let fold_base f m acc=
-+ match m with
-+ | Top -> raise Cannot_fold
-+ | Map m -> LBase.fold f m acc
-+
- let pretty fmt m =
- match m with
- Top -> Format.fprintf fmt "@[<v>FROMTOP@]"
-diff -Naur frama-c-Lithium-20081201-orig/src/memory_state/lmap_bitwise.mli frama-c-Lithium-20081201-patch/src/memory_state/lmap_bitwise.mli
---- frama-c-Lithium-20081201-orig/src/memory_state/lmap_bitwise.mli 2008-12-16 10:29:49.000000000 +0100
-+++ frama-c-Lithium-20081201-patch/src/memory_state/lmap_bitwise.mli 2009-02-16 14:43:57.000000000 +0100
-@@ -66,7 +66,7 @@
- val map_and_merge : (y -> y) -> t -> t -> t
- (** [map_and_merge f m1 m2] maps [f] on values in [m1] and [add_exact]
- all elements of the mapped [m1] to [m2] *)
--
-+
- val filter_base : (Base.t -> bool) -> t -> t
- val find : t -> Zone.t -> y
- val find_base: t -> Zone.t -> LOffset.t
-@@ -77,6 +77,7 @@
- associates to a zone a boolean representing the possibility that the
- zone was not modified, and a value of type y. May raise
- [Cannot_fold]. *)
-+ val fold_base : (Base.t -> LOffset.t -> 'a -> 'a) -> t -> 'a -> 'a
-
- val map2 : ((bool * y) option -> (bool * y) option -> bool * y)
- -> t -> t -> t
-diff -Naur frama-c-Lithium-20081201-orig/src/memory_state/offsetmap.ml frama-c-Lithium-20081201-patch/src/memory_state/offsetmap.ml
---- frama-c-Lithium-20081201-orig/src/memory_state/offsetmap.ml 2008-12-16 10:29:49.000000000 +0100
-+++ frama-c-Lithium-20081201-patch/src/memory_state/offsetmap.ml 2009-02-16 14:44:02.000000000 +0100
-@@ -122,6 +122,8 @@
-
- val iter_contents : (y -> unit) -> t -> Int.t -> unit
- (** Iter on the contents of offsetmap of given size *)
-+
-+ val fold : (Int.t * Int.t -> Int.t * Int.t * y -> 'a -> 'a) -> t -> 'a -> 'a
- end
-
-
-@@ -1399,6 +1401,8 @@
- Int_Interv.check_coverage itv concerned_intervals;
- with Is_not_included -> f V.top);
- List.iter (fun (_,(_,_,b)) -> f b) concerned_intervals
-+
-+ let fold f m = Int_Interv_Map.fold f m
-
- end
-
-@@ -1674,6 +1678,8 @@
-
- let iter_contents f o size =
- M.iter_contents f o.v size
-+
-+ let fold f v = M.fold f v.v
-
- end
-
-diff -Naur frama-c-Lithium-20081201-orig/src/memory_state/offsetmap.mli frama-c-Lithium-20081201-patch/src/memory_state/offsetmap.mli
---- frama-c-Lithium-20081201-orig/src/memory_state/offsetmap.mli 2008-12-16 10:29:49.000000000 +0100
-+++ frama-c-Lithium-20081201-patch/src/memory_state/offsetmap.mli 2009-02-16 14:44:02.000000000 +0100
-@@ -124,6 +124,8 @@
-
- val iter_contents : (y -> unit) -> t -> Int.t -> unit
- (** Iter on the contents of offsetmap of given size *)
-+
-+ val fold : (Int.t * Int.t -> Int.t * Int.t * y -> 'a -> 'a) -> t -> 'a -> 'a
- end
-
- module Make(V : Lattice_With_Isotropy.S):
diff --git a/sci-mathematics/frama-c/files/frama-c-20090601_beta1-accessors.patch b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-accessors.patch
new file mode 100644
index 000000000..644aef7da
--- /dev/null
+++ b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-accessors.patch
@@ -0,0 +1,26 @@
+diff -Naur frama-c-Beryllium-20090601-beta1-orig/src/ai/base.ml frama-c-Beryllium-20090601-beta1-ptch/src/ai/base.ml
+--- frama-c-Beryllium-20090601-beta1-orig/src/ai/base.ml 2009-05-15 09:10:25.000000000 +0000
++++ frama-c-Beryllium-20090601-beta1-ptch/src/ai/base.ml 2009-07-12 17:10:54.000000000 +0000
+@@ -271,6 +271,11 @@
+ | Var (t,_) | Initialized_Var (t,_) -> t
+ | _ -> assert false
+
++let get_varinfo t =
++ match t with
++ | Var (t,_) | Initialized_Var (t,_) -> t
++ | _ -> assert false
++
+ let create_varinfo varinfo =
+ assert (not varinfo.vlogic);
+ Var (varinfo,validity_from_type varinfo)
+diff -Naur frama-c-Beryllium-20090601-beta1-orig/src/ai/base.mli frama-c-Beryllium-20090601-beta1-ptch/src/ai/base.mli
+--- frama-c-Beryllium-20090601-beta1-orig/src/ai/base.mli 2009-05-05 14:29:35.000000000 +0000
++++ frama-c-Beryllium-20090601-beta1-ptch/src/ai/base.mli 2009-07-12 17:09:54.000000000 +0000
+@@ -61,6 +61,7 @@
+ val is_block_local: t -> Cil_types.block -> bool
+ val is_hidden_variable : t -> bool
+ val validity_from_type : Cil_types.varinfo -> validity
++val get_varinfo : t -> Cil_types.varinfo
+ val create_varinfo : Cil_types.varinfo -> t
+ val create_logic : Cil_types.varinfo -> validity -> t
+ val create_initialized : Cil_types.varinfo -> validity -> t
diff --git a/sci-mathematics/frama-c/files/frama-c-20090601_beta1-configure.patch b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-configure.patch
new file mode 100644
index 000000000..483a6e8db
--- /dev/null
+++ b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-configure.patch
@@ -0,0 +1,320 @@
+diff -Naur config_file config_file
+--- config_file 1970-01-01 00:00:00.000000000 +0000
++++ config_file 2009-07-20 16:22:11.000000000 +0000
+@@ -0,0 +1,22 @@
++##########################################################################
++# #
++# This file is part of Frama-C. #
++# #
++# Copyright (C) 2007-2009 #
++# CEA (Commissariat à l'Énergie Atomique) #
++# #
++# you can redistribute it and/or modify it under the terms of the GNU #
++# Lesser General Public License as published by the Free Software #
++# Foundation, version 2.1. #
++# #
++# It is distributed in the hope that it will be useful, #
++# but WITHOUT ANY WARRANTY; without even the implied warranty of #
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
++# GNU Lesser General Public License for more details. #
++# #
++# See the GNU Lesser General Public License version 2.1 #
++# for more details (enclosed in the file licenses/LGPLv2.1). #
++# #
++##########################################################################
++
++
+diff -Naur share/configure.ac share/configure.ac
+--- share/configure.ac 1970-01-01 00:00:00.000000000 +0000
++++ share/configure.ac 2009-07-20 16:20:40.000000000 +0000
+@@ -0,0 +1,290 @@
++##########################################################################
++# #
++# This file is part of Frama-C. #
++# #
++# Copyright (C) 2007-2009 #
++# CEA (Commissariat l'nergie Atomique) #
++# #
++# you can redistribute it and/or modify it under the terms of the GNU #
++# Lesser General Public License as published by the Free Software #
++# Foundation, version 2.1. #
++# #
++# It is distributed in the hope that it will be useful, #
++# but WITHOUT ANY WARRANTY; without even the implied warranty of #
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
++# GNU Lesser General Public License for more details. #
++# #
++# See the GNU Lesser General Public License version 2.1 #
++# for more details (enclosed in the file licenses/LGPLv2.1). #
++# #
++##########################################################################
++
++m4_ifdef([FRAMAC_MAIN_AUTOCONF],,
++ [m4_ifdef([plugin_file],[AC_INIT(plugin_file)],[AC_INIT(aclocal.m4)])])
++
++upper() {
++ echo "$1" | tr "a-z-" "A-Z_"
++}
++
++lower() {
++ echo "$1" | tr "A-Z_" "a-z-"
++}
++
++m4_define([tovarname],[m4_esyscmd(echo $1 | tr "a-z-" "A-Z_")])
++
++new_section() {
++ banner=`echo "* $1 *" | sed -e 's/./*/g'`
++ title=`echo "* $1 *" | tr "a-z" "A-Z"`
++ AC_MSG_NOTICE($banner)
++ AC_MSG_NOTICE($title)
++ AC_MSG_NOTICE($banner)
++}
++
++define([FRAMAC_M4_MACROS])
++
++# sadly, there's no way to define a new diversion beside the internal ones.
++# hoping for the best here...
++m4_define([frama_c_configure_tool],m4_incr(m4_divnum))
++
++m4_define([PLUGINS_LIST],[])
++
++# to distinguish internal plugins, known by the main configure, from
++# purely external plugins living in src/ and compiled together with the main
++# frama-c
++
++define([KNOWN_SRC_DIRS],[])
++
++define([check_plugin],
++[
++define([PLUGIN_NAME],$1)
++define([PLUGIN_FILE],$2)
++define([PLUGIN_MSG],$3)
++define([PLUGIN_DEFAULT],$4)
++define([PLUGIN_DYNAMIC],$5)
++define([PLUGIN_ADDITIONAL_DIR],$6)
++default=PLUGIN_DEFAULT
++AC_CHECK_FILE(PLUGIN_FILE,plugin_present=yes,plugin_present=no;default=no)
++FORCE=no
++define([PLUGIN_HELP],
++ AC_HELP_STRING([--enable-PLUGIN_NAME],
++ [PLUGIN_MSG (default: PLUGIN_DEFAULT)]))
++AC_ARG_ENABLE(
++ [PLUGIN_NAME],
++ PLUGIN_HELP,
++ ENABLE=$enableval;FORCE=$enableval,
++ ENABLE=$default
++)
++
++define([KNOWN_SRC_DIRS],KNOWN_SRC_DIRS PLUGIN_FILE PLUGIN_ADDITIONAL_DIR)
++
++# Test to change for static plugin, dynamic option
++#default_dyn=no
++#define([PLUGIN_HELP_DYN],
++# AC_HELP_STRING([--enable-PLUGIN_NAME-dynamic],
++# [PLUGIN_MSG (default: static)])
++#define([PLUGIN_NAME_DYN],[PLUGIN_NAME]-dynamic)
++#AC_ARG_ENABLE(
++# [PLUGIN_NAME_DYN],
++# PLUGIN_HELP_DYN,
++# ENABLE=$enableval;
++# FORCE=$enableval
++# ENABLE=$default_dyn
++#)
++#eval ENABLE_DYNAMIC_$up=\$ENABLE
++
++if test "$plugin_present" == "no" -a "$FORCE" == "yes"; then
++ AC_MSG_ERROR([PLUGIN_NAME is not available])
++fi
++up=`upper PLUGIN_NAME`
++eval FORCE_$up=\$FORCE
++PLUGINS_FORCE_LIST=${PLUGINS_FORCE_LIST}" "FORCE_$up
++define([upup],[tovarname(PLUGIN_NAME)])
++define([PLUGINS_LIST],PLUGINS_LIST upup)
++eval ENABLE_$up=\$ENABLE
++eval NAME_$up=PLUGIN_NAME
++
++if test "$default" == "no" -a "$FORCE" == "no"; then
++ # [JS 2009/03/27] don't know why that doesn't work in one single line
++ tmp=" (not available by default)"
++ eval INFO_$up=\$tmp
++fi
++
++# Dynamic plug-ins configuration
++m4_if("PLUGIN_DYNAMIC","yes",
++ [define([STATIC_HELP],
++ AC_HELP_STRING([--with-PLUGIN_NAME-static],
++ [link PLUGIN_NAME statically (default: no)]))
++ AC_ARG_WITH(PLUGIN_NAME[-static],STATIC_HELP,
++ [is_static=$withval],
++ [is_static=$IS_ALL_STATIC])
++ undefine([STATIC_HELP])],
++ [is_static=yes])
++
++if test "$is_static" == "no"; then
++ USE_NATIVE_DYNLINK="${USE_NATIVE_DYNLINK} PLUGIN_NAME"
++ eval DYNAMIC_$up=yes
++else
++ eval DYNAMIC_$up=no
++fi
++
++echo "PLUGIN_NAME... $ENABLE"
++]) # end of check_plugin
++
++# 1st param: uppercase name of the library
++# 2nd param: file which must exist. This parameter can be a list of files.
++# In this case, they will be tried in turn until one of them exists. The
++# name of the file found will be put in the variable SELECTED_$1
++# 3d param: warning to display if problem
++# 4th param: yes iff checking the library must always to be done
++# (even if there is no plug-in using it)
++m4_define([configure_library],
++[
++# No need to check the same thing multiple times.
++ m4_ifdef(SELECTED_$1,,
++ [
++ m4_divert_push(frama_c_configure_tool)
++ m4_define([VAR],[$1])
++ m4_define([SELECTED_VAR],[SELECTED_$1])
++ m4_define([PROG],[$2])
++ m4_define([require],[$REQUIRE_$1])
++ m4_define([use],[$USE_$1])
++ m4_define([msg],[$3])
++ m4_define([has],[HAS_$1])
++ m4_define([file],[FILE_$1])
++# [JS 2009/06/02] sh tests and m4 variables do not mix well together.
++# It works by chance but it is not robust enough.
++# Should be rewritten
++ if test -n "require" -o -n "use" -o "$4" == "yes"; then
++ has=no
++ m4_foreach(file,[PROG],
++ [if test "$has" != "yes"; then
++ AC_CHECK_FILE(file,has=yes,has=no)
++ if test "$has" == "yes"; then SELECTED_VAR=file
++ fi
++ fi]
++ )
++ if test "$has" == "no"; then
++ AC_MSG_WARN(msg)
++ if test "require" != ""; then
++ echo "plug-ins disabled:
++ require"
++ for p in require; do
++ fp=FORCE_`upper "$p"`
++ if eval test "\$$fp" == "yes"; then
++ AC_MSG_ERROR($p requested but PROG missing.)
++ fi
++ ep=ENABLE_`upper "$p"`
++ eval $ep="no\ \(see\ warning\ about\ PROG\)"
++ done
++ fi
++ if test "use" != ""; then
++ echo "plug-ins not fully functional:
++ use"
++ for p in use; do
++ ep=ENABLE_`upper "$p"`
++ eval eep="\$$ep"
++ if test "`echo $eep | sed -e 's/ .*//' `" != "no"; then
++ eval $ep="partial\ \(see\ warning\ about\ PROG\)"
++ fi
++ done
++ fi
++ echo
++ fi
++ fi
++ AC_SUBST(VAR)
++ AC_SUBST(has)
++ undefine([SELECTED_VAR])
++ undefine([VAR])
++ undefine([PROG])
++ undefine([require])
++ undefine([use])
++ undefine([msg])
++ undefine([has])
++ m4_divert_pop(frama_c_configure_tool)
++ ])
++])
++
++# 1st param: uppercase name of the program
++# 2nd param: program which must exist. See comment on configure_library()
++# on how to deal with multiple choices for a given program.
++# 3d param: warning to display if problem
++# 4th param: yes iff checking the tool must always to be done
++# (even if there is no plug-in using it)
++m4_define([configure_tool],
++[
++m4_ifdef(HAS_$1,,
++ [
++ m4_divert_push(frama_c_configure_tool)
++ define([VAR],[$1])
++ define([PROG],[$2])
++ define([require],[$REQUIRE_$1])
++ define([use],[$USE_$1])
++ define([msg],[$3])
++ define([has],[HAS_$1])
++ define([force_check],[$4])
++
++ if test -n "require" -o -n "use" -o "$force_check" == "yes"; then
++ for file in PROG; do
++ has=
++ AC_CHECK_PROG(has,$file,yes,no)
++ if test "$has" == "yes"; then SELECTED_VAR=$file break; fi
++ done
++ if test "$has" == "no"; then
++ AC_MSG_WARN([msg])
++ if test "require" != ""; then
++ echo "plug-ins disabled:
++ require"
++ for p in require; do
++ fp=FORCE_`upper "$p"`
++ if eval test "\$$fp" == "yes"; then
++ AC_MSG_ERROR([$p requested but PROG missing.])
++ fi
++ ep=ENABLE_`upper "$p"`
++ eval $ep="no\ \(see\ warning\ about\ PROG\)"
++ done
++ fi
++ if test "use" != ""; then
++ echo "plug-ins not fully functional:
++ use"
++ for p in use; do
++ ep=ENABLE_`upper "$p"`
++ eval eep="\$$ep"
++ if test "`echo $eep | sed -e 's/ .*//' `" != "no"; then
++ eval $ep="partial\ \(see\ warning\ about\ PROG\)"
++ fi
++ done
++ fi
++ echo
++ else
++ VAR=PROG
++ fi
++ fi
++ AC_SUBST(VAR)
++ AC_SUBST(has)
++ undefine([VAR])
++ undefine([PROG])
++ undefine([require])
++ undefine([use])
++ undefine([msg])
++ undefine([has])
++ m4_divert_pop(frama_c_configure_tool)
++])
++])
++
++EXTERNAL_PLUGINS=
++
++define([check_frama_c_dependencies],[m4_undivert(frama_c_configure_tool)])
++define([check_plugin_dependencies],
++ [m4_ifdef([FRAMAC_INTERNAL_AUTOCONF],,
++ [m4_undivert(frama_c_configure_tool)])])
++define([write_plugin_config],
++ [m4_ifndef([plugin_prefix],[define([plugin_prefix],[.])])
++ m4_define([plugin_files],
++ AC_FOREACH([plugin_file],$1,[plugin_prefix/plugin_file ]))
++ m4_define([files_chmod],
++ AC_FOREACH([plugin_file],plugin_files,[chmod -w plugin_file]))
++ AC_CONFIG_FILES(plugin_files,files_chmod)
++ m4_ifdef([FRAMAC_MAIN_AUTOCONF],
++ EXTERNAL_PLUGINS="${EXTERNAL_PLUGINS} plugin_prefix",
++ [AC_OUTPUT()])
++ ])
diff --git a/sci-mathematics/frama-c/files/frama-c-20090601_beta1-install_files.patch b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-install_files.patch
new file mode 100644
index 000000000..2291a4b36
--- /dev/null
+++ b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-install_files.patch
@@ -0,0 +1,12 @@
+diff -Naur frama-c-Beryllium-20090601-beta1-orig/Makefile.in frama-c-Beryllium-20090601-beta1-ptch/Makefile.in
+--- frama-c-Beryllium-20090601-beta1-orig/Makefile.in 2009-06-23 11:24:39.000000000 +0000
++++ frama-c-Beryllium-20090601-beta1-ptch/Makefile.in 2009-09-04 15:29:11.000000000 +0000
+@@ -1483,7 +1483,7 @@
+ $(MKDIR) $(FRAMAC_LIBDIR)
+ # line below does not work if INCLUDES contains twice the same directory
+ # Do not attempt to copy gui interfaces if gui is disabled
+- $(CP) $(foreach d,$(filter-out $(FILTER_INTERFACE_DIRS),$(INCLUDES:-I%=%)), $(d)/*.cmi) $(FRAMAC_LIBDIR)
++ $(CP) $(wildcard $(foreach d,$(filter-out $(FILTER_INTERFACE_DIRS),$(INCLUDES:-I%=%)), $(d)/*.cmi)) $(FRAMAC_LIBDIR)
+
+ install-gui:
+ $(PRINT_CP) gui API
diff --git a/sci-mathematics/frama-c/files/frama-c-20090601_beta1-ocamlgraph.patch b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-ocamlgraph.patch
new file mode 100644
index 000000000..d89f32d46
--- /dev/null
+++ b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-ocamlgraph.patch
@@ -0,0 +1,16 @@
+diff -Naur frama-c-Beryllium-20090601-beta1-orig/Makefile.in frama-c-Beryllium-20090601-beta1-ptch/Makefile.in
+--- frama-c-Beryllium-20090601-beta1-orig/Makefile.in 2009-06-23 11:24:39.000000000 +0000
++++ frama-c-Beryllium-20090601-beta1-ptch/Makefile.in 2009-09-04 15:32:40.000000000 +0000
+@@ -358,10 +358,12 @@
+ GRAPH_GUICMX= $(GRAPH_GUICMO:.cmo=.cmx)
+ GRAPH_GUIO= $(GRAPH_GUICMO:.cmo=.o)
+ HAS_VIEWGRAPH=yes
++ifneq ("$(OCAMLGRAPH_LOCAL)","")
+ BYTE_GUI_LIBS+= $(GRAPH_GUICMO)
+ OPT_GUI_LIBS+= $(GRAPH_GUICMX)
++endif
+ endif
+ endif
+
+ endif # whether ocamlgraph is local
+
diff --git a/sci-mathematics/frama-c/files/frama-c-20090601_beta1-printexc.patch b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-printexc.patch
new file mode 100644
index 000000000..e7f5e2f32
--- /dev/null
+++ b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-printexc.patch
@@ -0,0 +1,290 @@
+diff -ru frama-c-Beryllium-20090601-beta1/configure frama-c-Beryllium-20090601-beta1.ok/configure
+--- frama-c-Beryllium-20090601-beta1/configure 2009-06-23 16:34:44.000000000 +0200
++++ frama-c-Beryllium-20090601-beta1.ok/configure 2009-06-29 09:51:01.000000000 +0200
+@@ -686,7 +686,6 @@
+ JCCMO
+ WHYDPBIN
+ WHYBIN
+-HAS_LABLGTK_CUSTOM_MODEL
+ HAS_LEGACY_GTKSOURCEVIEW
+ EXTERNAL_PLUGINS
+ LOCAL_MACHDEP
+@@ -823,7 +822,6 @@
+ enable_wp
+ enable_external
+ with_whydir
+-enable_custommodel
+ '
+ ac_precious_vars='build_alias
+ host_alias
+@@ -1482,7 +1480,6 @@
+ --enable-wp support for wp plugin (default: yes)
+ --enable-external=plugin allows to compile directly from Frama-C kernel
+ some external plug-ins.
+- --enable-custommodel use a custom tree model in the GUI. Need to have a recent lablgtk2 version
+
+ Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+@@ -7546,46 +7543,6 @@
+
+
+
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+ #####################################################
+ # Check for tools/libraries requirements of plugins #
+ #####################################################
+@@ -8697,37 +8654,107 @@
+
+ # lablgtk2's custom tree model
+
+-# Check whether --enable-custommodel was given.
+-if test "${enable_custommodel+set}" = set; then
+- enableval=$enable_custommodel; ENABLE_CUSTOM_MODEL=$enableval; FORCE_CUSTOM_MODEL=yes
+-else
+- ENABLE_CUSTOM_MODEL=yes
+-
+-fi
+-
+-
+-HAS_LABLGTK_CUSTOM_MODEL=no
+-if test "$ENABLE_CUSTOM_MODEL" == "yes"; then
+- { $as_echo "$as_me:$LINENO: checking for lablgtk2's custom tree model" >&5
+-$as_echo_n "checking for lablgtk2's custom tree model... " >&6; }
++if test "$HAS_LABLGTK" == "yes"; then
+ if echo "type ('a,'b,'c,'d) t = ('a,'b,'c,'d) GTree.custom_tree_model" > test_custommodel.ml && ocamlc -c -I +lablgtk2 test_custommodel.ml 2> /dev/null; \
+ then
+- HAS_LABLGTK_CUSTOM_MODEL=yes
++ { $as_echo "$as_me:$LINENO: checking for lablgtk2's custom tree model" >&5
++$as_echo_n "checking for lablgtk2's custom tree model... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+ $as_echo "yes" >&6; }
+ else
+- { $as_echo "$as_me:$LINENO: result: no" >&5
+-$as_echo "no" >&6; }
+- if test "$FORCE_CUSTOM_MODEL" == "yes"; then
+- { { $as_echo "$as_me:$LINENO: error: lablgtk2's custom tree model requested but not available." >&5
+-$as_echo "$as_me: error: lablgtk2's custom tree model requested but not available." >&2;}
++ # we don't have a good version of lablgtk2:
++ # configure a dummy library "customtree" in order to
++ # configure plug-ins depending on lablgtk2 in a proper way
++
++# No need to check the same thing multiple times.
++
++
++
++
++
++
++
++
++
++
++
++
++
++# [JS 2009/06/02] sh tests and m4 variables do not mix well together.
++# It works by chance but it is not robust enough.
++# Should be rewritten
++ if test -n "$REQUIRE_LABLGTK" -o -n "$USE_LABLGTK" -o "yes" == "yes"; then
++ HAS_LABLGTK=no
++ if test "$HAS_LABLGTK" != "yes"; then
++ { $as_echo "$as_me:$LINENO: checking for custom-tree-model" >&5
++$as_echo_n "checking for custom-tree-model... " >&6; }
++if test "${ac_cv_file_custom_tree_model+set}" = set; then
++ $as_echo_n "(cached) " >&6
++else
++ test "$cross_compiling" = yes &&
++ { { $as_echo "$as_me:$LINENO: error: cannot check for custom-tree-model existence when cross compiling" >&5
++$as_echo "$as_me: error: cannot check for custom-tree-model existence when cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+- else
+- { { $as_echo "$as_me:$LINENO: error: lablgtk2's custom tree model unavailable. You need at least LablGtk 2.12" >&5
+-$as_echo "$as_me: error: lablgtk2's custom tree model unavailable. You need at least LablGtk 2.12" >&2;}
++if test -r "custom-tree-model"; then
++ ac_cv_file_custom_tree_model=yes
++else
++ ac_cv_file_custom_tree_model=no
++fi
++fi
++{ $as_echo "$as_me:$LINENO: result: $ac_cv_file_custom_tree_model" >&5
++$as_echo "$ac_cv_file_custom_tree_model" >&6; }
++if test "x$ac_cv_file_custom_tree_model" = x""yes; then
++ HAS_LABLGTK=yes
++else
++ HAS_LABLGTK=no
++fi
++
++ if test "$HAS_LABLGTK" == "yes"; then SELECTED_LABLGTK=custom-tree-model
++ fi
++ fi
++
++ if test "$HAS_LABLGTK" == "no"; then
++ { $as_echo "$as_me:$LINENO: WARNING: lablgtk2's custom tree model unavailable. You need at least LablGtk 2.12." >&5
++$as_echo "$as_me: WARNING: lablgtk2's custom tree model unavailable. You need at least LablGtk 2.12." >&2;}
++ if test "$REQUIRE_LABLGTK" != ""; then
++ echo "plug-ins disabled:
++ $REQUIRE_LABLGTK"
++ for p in $REQUIRE_LABLGTK; do
++ fp=FORCE_`upper "$p"`
++ if eval test "\$$fp" == "yes"; then
++ { { $as_echo "$as_me:$LINENO: error: $p requested but custom-tree-model missing." >&5
++$as_echo "$as_me: error: $p requested but custom-tree-model missing." >&2;}
+ { (exit 1); exit 1; }; }
++ fi
++ ep=ENABLE_`upper "$p"`
++ eval $ep="no\ \(see\ warning\ about\ custom-tree-model\)"
++ done
++ fi
++ if test "$USE_LABLGTK" != ""; then
++ echo "plug-ins not fully functional:
++ $USE_LABLGTK"
++ for p in $USE_LABLGTK; do
++ ep=ENABLE_`upper "$p"`
++ eval eep="\$$ep"
++ if test "`echo $eep | sed -e 's/ .*//' `" != "no"; then
++ eval $ep="partial\ \(see\ warning\ about\ custom-tree-model\)"
++ fi
++ done
++ fi
++ echo
+ fi
+ fi
++
++
++
++
++
++
++
++
++
++
++ fi
+ rm -f test_custommodel.*
+ fi
+
+@@ -9142,7 +9169,6 @@
+
+
+
+-
+ # m4_foreach_w is not supported in some old autoconf versions.
+ # Sadly AC_FOREACH is deprecated now...
+
+diff -ru frama-c-Beryllium-20090601-beta1/configure.in frama-c-Beryllium-20090601-beta1.ok/configure.in
+--- frama-c-Beryllium-20090601-beta1/configure.in 2009-06-23 15:50:50.000000000 +0200
++++ frama-c-Beryllium-20090601-beta1.ok/configure.in 2009-06-29 09:50:50.000000000 +0200
+@@ -804,27 +804,21 @@
+
+ # lablgtk2's custom tree model
+
+-AC_ARG_ENABLE(
+- [custommodel],
+-[ --enable-custommodel use a custom tree model in the GUI. Need to have a recent lablgtk2 version],
+- ENABLE_CUSTOM_MODEL=$enableval; FORCE_CUSTOM_MODEL=yes,
+- ENABLE_CUSTOM_MODEL=yes
+-)
+-
+-HAS_LABLGTK_CUSTOM_MODEL=no
+-if test "$ENABLE_CUSTOM_MODEL" == "yes"; then
+- AC_MSG_CHECKING([for lablgtk2's custom tree model])
++if test "$HAS_LABLGTK" == "yes"; then
+ if echo "type ('a,'b,'c,'d) t = ('a,'b,'c,'d) GTree.custom_tree_model" > test_custommodel.ml && ocamlc -c -I +lablgtk2 test_custommodel.ml 2> /dev/null; \
+ then
+- HAS_LABLGTK_CUSTOM_MODEL=yes
++ AC_MSG_CHECKING([for lablgtk2's custom tree model])
+ AC_MSG_RESULT([yes])
+ else
+- AC_MSG_RESULT([no])
+- if test "$FORCE_CUSTOM_MODEL" == "yes"; then
+- AC_MSG_ERROR([lablgtk2's custom tree model requested but not available.])
+- else
+- AC_MSG_ERROR([lablgtk2's custom tree model unavailable. You need at least LablGtk 2.12])
+- fi
++ # we don't have a good version of lablgtk2:
++ # configure a dummy library "customtree" in order to
++ # configure plug-ins depending on lablgtk2 in a proper way
++ configure_library(
++ [LABLGTK],
++ [custom-tree-model],
++ [lablgtk2's custom tree model unavailable. You need at least LablGtk 2.12.],
++ yes)
++ check_frama_c_dependencies()
+ fi
+ rm -f test_custommodel.*
+ fi
+@@ -1137,7 +1131,6 @@
+
+ AC_SUBST(HAS_USABLE_NATIVE_DYNLINK)
+ AC_SUBST(HAS_LEGACY_GTKSOURCEVIEW)
+-AC_SUBST(HAS_LABLGTK_CUSTOM_MODEL)
+ AC_SUBST(WHYBIN)
+ AC_SUBST(WHYDPBIN)
+
+diff -ru frama-c-Beryllium-20090601-beta1/src/gui/design.ml frama-c-Beryllium-20090601-beta1.ok/src/gui/design.ml
+--- frama-c-Beryllium-20090601-beta1/src/gui/design.ml 2009-06-23 10:35:28.000000000 +0200
++++ frama-c-Beryllium-20090601-beta1.ok/src/gui/design.ml 2009-06-29 11:29:52.000000000 +0200
+@@ -917,11 +917,9 @@
+ s
+ | e ->
+ error
+- "unexpected error %s@\n%s@\n\
++ "unexpected error %s@\n\
+ please report as `crash' at http://bts.frama-c.com"
+- (Printexc.to_string e)
+- (if Parameters.Debug.get () > 0 then Printexc.get_backtrace ()
+- else ""));
++ (Printexc.to_string e));
+ self#unlock ()
+ in
+ let run = GButton.button ~label:"Run analysis" ~stock:`EXECUTE ~packing:buttons#pack ()
+diff -ru frama-c-Beryllium-20090601-beta1/src/kernel/boot.ml frama-c-Beryllium-20090601-beta1.ok/src/kernel/boot.ml
+--- frama-c-Beryllium-20090601-beta1/src/kernel/boot.ml 2009-06-23 11:08:08.000000000 +0200
++++ frama-c-Beryllium-20090601-beta1.ok/src/kernel/boot.ml 2009-06-29 08:48:53.000000000 +0200
+@@ -69,7 +69,6 @@
+
+ (* Main: let's go! *)
+ let () =
+- if Parameters.Debug.get () > 0 then Printexc.record_backtrace true;
+ Kind.version := Config.version;
+ boot_cil ();
+ Sys.catch_break true;
diff --git a/sci-mathematics/frama-c/files/frama-c-20081201-states_hook.patch b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-states_hook.patch
index d4b46e38a..ca0630520 100644
--- a/sci-mathematics/frama-c/files/frama-c-20081201-states_hook.patch
+++ b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-states_hook.patch
@@ -1,27 +1,27 @@
-diff -ru frama-c-Lithium-20081201/Makefile.in frama-c-states_hook/Makefile.in
---- frama-c-Lithium-20081201/Makefile.in 2008-12-16 10:29:49.000000000 +0100
-+++ frama-c-states_hook/Makefile.in 2009-01-17 18:44:46.000000000 +0100
-@@ -857,6 +857,7 @@
+diff -Naur frama-c-Beryllium-20090601-beta1-orig/Makefile.in frama-c-Beryllium-20090601-beta1-ptch/Makefile.in
+--- frama-c-Beryllium-20090601-beta1-orig/Makefile.in 2009-06-23 11:24:39.000000000 +0000
++++ frama-c-Beryllium-20090601-beta1-ptch/Makefile.in 2009-07-12 03:45:51.000000000 +0000
+@@ -661,6 +661,7 @@
src/memory_state/memzone_type.cmo \
src/memory_state/widen_type.cmo \
src/memory_state/relations_type.cmo \
+ src/memory_state/state_set.cmo \
- src/logic/why_output.cmo
-
- ACMX = $(ACMO:.cmo=.cmx)
-@@ -1023,7 +1024,7 @@
+ src/kernel/stmts_graph.cmo \
+ src/kernel/visitor.cmo \
+ src/kernel/printer.cmo src/kernel/unroll_loops.cmo \
+@@ -771,7 +772,7 @@
PLUGIN_ENABLE:=@ENABLE_VALUE@
PLUGIN_NAME:=Value
PLUGIN_DIR:=src/value
--PLUGIN_CMO:= state_set kf_state eval kinstr register
-+PLUGIN_CMO:= kf_state eval kinstr register
+-PLUGIN_CMO:= state_set kf_state value_parameters eval kinstr register
++PLUGIN_CMO:= kf_state value_parameters eval kinstr register
PLUGIN_GUI_CMO:=register_gui
PLUGIN_HAS_MLI:=yes
- PLUGIN_GUI_HAS_MLI:=yes
-diff -ru frama-c-Lithium-20081201/src/kernel/db.ml frama-c-states_hook/src/kernel/db.ml
---- frama-c-Lithium-20081201/src/kernel/db.ml 2008-12-16 10:29:48.000000000 +0100
-+++ frama-c-states_hook/src/kernel/db.ml 2009-01-17 18:22:38.000000000 +0100
-@@ -257,6 +257,12 @@
+ PLUGIN_NO_TEST:=yes
+diff -Naur frama-c-Beryllium-20090601-beta1-orig/src/kernel/db.ml frama-c-Beryllium-20090601-beta1-ptch/src/kernel/db.ml
+--- frama-c-Beryllium-20090601-beta1-orig/src/kernel/db.ml 2009-07-12 03:41:32.000000000 +0000
++++ frama-c-Beryllium-20090601-beta1-ptch/src/kernel/db.ml 2009-07-12 03:42:41.000000000 +0000
+@@ -261,6 +261,12 @@
type t = (kernel_function * kinstr) list * state InstrHashtbl.t
end)
@@ -34,24 +34,24 @@ diff -ru frama-c-Lithium-20081201/src/kernel/db.ml frama-c-states_hook/src/kerne
module Call_Value_Callbacks =
Hook.Build
(struct type t = state * (Db_types.kernel_function * kinstr) list end)
-diff -ru frama-c-Lithium-20081201/src/kernel/db.mli frama-c-states_hook/src/kernel/db.mli
---- frama-c-Lithium-20081201/src/kernel/db.mli 2008-12-16 10:29:48.000000000 +0100
-+++ frama-c-states_hook/src/kernel/db.mli 2009-01-17 18:23:57.000000000 +0100
-@@ -248,6 +248,9 @@
+diff -Naur frama-c-Beryllium-20090601-beta1-orig/src/kernel/db.mli frama-c-Beryllium-20090601-beta1-ptch/src/kernel/db.mli
+--- frama-c-Beryllium-20090601-beta1-orig/src/kernel/db.mli 2009-07-12 03:41:32.000000000 +0000
++++ frama-c-Beryllium-20090601-beta1-ptch/src/kernel/db.mli 2009-07-12 03:42:41.000000000 +0000
+@@ -282,6 +282,9 @@
module Record_Value_Callbacks:
- Hook.S with type param = (kernel_function * kinstr) list
+ Hook.S with type param = (kernel_function * kinstr) list
* state Cilutil.InstrHashtbl.t
+ module Record_Value_Superposition_Callbacks:
+ Hook.S with type param = (kernel_function * kinstr) list
+ * State_set.t Cilutil.InstrHashtbl.t
- (** Actions to perform at each treatment of a "call" statement.
+ (** Actions to perform at each treatment of a "call" statement.
@plugin development guide *)
-diff -ru frama-c-Lithium-20081201/src/value/eval.ml frama-c-states_hook/src/value/eval.ml
---- frama-c-Lithium-20081201/src/value/eval.ml 2008-12-16 10:29:49.000000000 +0100
-+++ frama-c-states_hook/src/value/eval.ml 2009-01-17 18:21:06.000000000 +0100
-@@ -2526,8 +2526,26 @@
- (*Format.printf "Done Merging current@.";*)
+diff -Naur frama-c-Beryllium-20090601-beta1-orig/src/value/eval.ml frama-c-Beryllium-20090601-beta1-ptch/src/value/eval.ml
+--- frama-c-Beryllium-20090601-beta1-orig/src/value/eval.ml 2009-06-23 09:08:08.000000000 +0000
++++ frama-c-Beryllium-20090601-beta1-ptch/src/value/eval.ml 2009-07-12 03:42:41.000000000 +0000
+@@ -2773,8 +2773,26 @@
+ (* Format.printf "Done Merging current@."; *)
if not degenerate &&
- not (Db.Value.Record_Value_Callbacks.is_empty ())
@@ -60,7 +60,7 @@ diff -ru frama-c-Lithium-20081201/src/value/eval.ml frama-c-states_hook/src/valu
then begin
+ let stack_for_callbacks = for_callbacks_stack () in
+
-+ if not (Db.Value.Record_Value_Callbacks.is_empty ())
++ if not (Db.Value.Record_Value_Superposition_Callbacks.is_empty ())
+ then begin
+ let current_superpositions = InstrHashtbl.create 17 in
+ InstrHashtbl.iter
@@ -78,7 +78,7 @@ diff -ru frama-c-Lithium-20081201/src/value/eval.ml frama-c-states_hook/src/valu
(* Format.printf "[values] now calling Record_Value callbacks@."; *)
let current_states = InstrHashtbl.create 17 in
-@@ -2537,7 +2555,8 @@
+@@ -2785,7 +2803,8 @@
current_table;
Db.Value.Record_Value_Callbacks.apply
diff --git a/sci-mathematics/frama-c/files/frama-c-20081201-stmt_deps.patch b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-stmt_deps.patch
index 94f2563cb..f79e04922 100644
--- a/sci-mathematics/frama-c/files/frama-c-20081201-stmt_deps.patch
+++ b/sci-mathematics/frama-c/files/frama-c-20090601_beta1-stmt_deps.patch
@@ -1,16 +1,16 @@
-diff -Naur frama-c-Lithium-20081201-orig/src/from/register.ml frama-c-Lithium-20081201-patch/src/from/register.ml
---- frama-c-Lithium-20081201-orig/src/from/register.ml 2008-12-16 10:29:48.000000000 +0100
-+++ frama-c-Lithium-20081201-patch/src/from/register.ml 2009-02-16 14:43:55.000000000 +0100
-@@ -572,7 +572,7 @@
+diff -Naur frama-c-Beryllium-20090601-beta1-orig/src/from/from_register.ml frama-c-Beryllium-20090601-beta1-ptch/src/from/from_register.ml
+--- frama-c-Beryllium-20090601-beta1-orig/src/from/from_register.ml 2009-06-12 09:12:22.000000000 +0000
++++ frama-c-Beryllium-20090601-beta1-ptch/src/from/from_register.ml 2009-07-12 03:33:40.000000000 +0000
+@@ -554,7 +554,7 @@
Db.Value.is_reachable (Values_To_Use.get_state (Kstmt stmt))
(* Remove all local variables and formals from table *)
- let externalize return fundec state =
+ let externalize return fundec state strip =
let deps_return = (match return.skind with
- | Return (Some (Lval v),_) ->
- let deps, looking_for =
-@@ -596,9 +596,10 @@
+ | Return (Some ({enode = Lval v}),_) ->
+ let deps, target =
+@@ -578,9 +578,10 @@
Lmap_bitwise.From_Model.LOffset.empty
| _ -> assert false)
in
@@ -22,8 +22,8 @@ diff -Naur frama-c-Lithium-20081201-orig/src/from/register.ml frama-c-Lithium-20
in
{ deps_return = deps_return;
Function_Froms.deps_table = deps_table }
-@@ -617,7 +618,7 @@
- else Dataflow.GUnreachable
+@@ -611,7 +612,7 @@
+ in { d with deps_table = deps_table }
end
-let compute_using_cfg kf = match kf.fundec with
@@ -31,7 +31,7 @@ diff -Naur frama-c-Lithium-20081201-orig/src/from/register.ml frama-c-Lithium-20
| Declaration _ -> assert false
| Definition (f,_) ->
try
-@@ -656,6 +657,10 @@
+@@ -659,6 +660,10 @@
Format.printf "[from] stack with %s\n@\n" (get_name g))
call_stack;*)
@@ -42,7 +42,7 @@ diff -Naur frama-c-Lithium-20081201-orig/src/from/register.ml frama-c-Lithium-20
let last_from =
try
if Db.Value.is_reachable (Values_To_Use.get_state (Kstmt ret_id))
-@@ -663,7 +668,8 @@
+@@ -666,7 +671,8 @@
Computer.externalize
ret_id
f
@@ -52,7 +52,7 @@ diff -Naur frama-c-Lithium-20081201-orig/src/from/register.ml frama-c-Lithium-20
else
raise Not_found
with Not_found -> begin
-@@ -806,7 +812,7 @@
+@@ -809,7 +815,7 @@
let result = match kf.fundec with
| Definition _ ->
@@ -61,7 +61,7 @@ diff -Naur frama-c-Lithium-20081201-orig/src/from/register.ml frama-c-Lithium-20
| Declaration _ ->
compute_using_prototype kf
in
-@@ -846,7 +852,8 @@
+@@ -849,7 +855,8 @@
let () =
force_compute := From2.compute;
Db.From.compute := (fun kf -> ignore (Functionwise_From_to_use.memo kf));
@@ -71,25 +71,25 @@ diff -Naur frama-c-Lithium-20081201-orig/src/from/register.ml frama-c-Lithium-20
let () = Db.From.pretty :=
(fun fmt v ->
-diff -Naur frama-c-Lithium-20081201-orig/src/kernel/db.ml frama-c-Lithium-20081201-patch/src/kernel/db.ml
---- frama-c-Lithium-20081201-orig/src/kernel/db.ml 2009-02-14 00:10:32.000000000 +0100
-+++ frama-c-Lithium-20081201-patch/src/kernel/db.ml 2009-02-16 14:43:55.000000000 +0100
-@@ -437,6 +437,7 @@
+diff -Naur frama-c-Beryllium-20090601-beta1-orig/src/kernel/db.ml frama-c-Beryllium-20090601-beta1-ptch/src/kernel/db.ml
+--- frama-c-Beryllium-20090601-beta1-orig/src/kernel/db.ml 2009-06-23 09:08:08.000000000 +0000
++++ frama-c-Beryllium-20090601-beta1-ptch/src/kernel/db.ml 2009-07-12 03:33:40.000000000 +0000
+@@ -443,6 +443,7 @@
let is_computed = mk_fun "From.is_computed"
let pretty = mk_fun "From.pretty"
let get = mk_fun "From.get"
+ let compute_using_cfg = mk_fun "From.compute_using_cfg"
let self = ref Project.Computation.dummy
-
let display = mk_fun "From.display"
-diff -Naur frama-c-Lithium-20081201-orig/src/kernel/db.mli frama-c-Lithium-20081201-patch/src/kernel/db.mli
---- frama-c-Lithium-20081201-orig/src/kernel/db.mli 2009-02-14 00:10:32.000000000 +0100
-+++ frama-c-Lithium-20081201-patch/src/kernel/db.mli 2009-02-16 14:43:55.000000000 +0100
-@@ -299,6 +299,7 @@
+ module Callwise = struct
+diff -Naur frama-c-Beryllium-20090601-beta1-orig/src/kernel/db.mli frama-c-Beryllium-20090601-beta1-ptch/src/kernel/db.mli
+--- frama-c-Beryllium-20090601-beta1-orig/src/kernel/db.mli 2009-06-23 13:53:48.000000000 +0000
++++ frama-c-Beryllium-20090601-beta1-ptch/src/kernel/db.mli 2009-07-12 03:35:29.000000000 +0000
+@@ -330,6 +330,7 @@
@return true iff the analysis has been performed *)
-
- val get : (kernel_function -> Function_Froms.t) p_ref
-+ val compute_using_cfg : (kernel_function -> int option -> Function_Froms.t) p_ref
- val access : (Locations.Zone.t -> from_model -> Locations.Zone.t) p_ref
- val find_deps_no_transitivity : (kinstr -> exp -> Locations.Zone.t) p_ref
- val self: Project.Computation.t p_ref
+
+ val get : (kernel_function -> Function_Froms.t) ref
++ val compute_using_cfg : (kernel_function -> int option -> Function_Froms.t) ref
+ val access : (Locations.Zone.t -> from_model -> Locations.Zone.t) ref
+ val find_deps_no_transitivity : (kinstr -> exp -> Locations.Zone.t) ref
+ val self: Project.Computation.t ref
diff --git a/sci-mathematics/frama-c/frama-c-20081201-r1.ebuild b/sci-mathematics/frama-c/frama-c-20081201-r1.ebuild
deleted file mode 100644
index 9fd9fc181..000000000
--- a/sci-mathematics/frama-c/frama-c-20081201-r1.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: Exp $
-
-inherit autotools eutils
-
-DESCRIPTION="Frama-C is a suite of tools dedicated to the analysis of the source code of software written in C."
-HOMEPAGE="http://www.frama-c.cea.fr/"
-SRC_URI="http://www.frama-c.cea.fr/download/${PN/-c/-c-Lithium}-${PV/_/+}.tar.gz"
-
-LICENSE="LGPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-
-IUSE="apron coq doc gappa gtk pff pvs stateshook"
-RESTRICT="strip"
-
-RDEPEND="!sci-mathematics/why
- sci-mathematics/ltl2ba
- apron? ( sci-mathematics/apron )
- coq? ( sci-mathematics/coq )
- gappa? ( sci-mathematics/gappalib-coq )
- pff? ( sci-mathematics/pff )
- pvs? ( sci-mathematics/pvs )"
-
-DEPEND="${RDEPEND}
- >=dev-lang/ocaml-3.09
- gtk? ( >=dev-ml/lablgtk-2.6 )"
-
-S="${WORKDIR}/${PN/-c/-c-Lithium}-${PV/_/+}"
-
-src_unpack(){
- unpack ${A}
- cd "${S}"
-
- if use stateshook; then
- einfo "moving state_set.ml* from value/ to memory_state/ ..."
- mv src/value/state_set.ml* src/memory_state/ || die
- epatch "${FILESDIR}/${P}-states_hook.patch"
- epatch "${FILESDIR}/${P}-stmt_deps.patch"
- epatch "${FILESDIR}/${P}-accessors.patch"
- fi
-
- sed -i why/Makefile.in \
- -e "s/\$(COQLIB)/\$(DESTDIR)\/\$(COQLIB)/g" \
- -e "s/-w \$(DESTDIR)\/\$(COQLIB)/-w \$(COQLIB)/g" \
- -e "s/\$(PVSLIB)\/why/\$(DESTDIR)\/\$(PVSLIB)\/why/g" \
- -e "s/\$(MIZFILES)/\$(DESTDIR)\/\$(MIZFILES)/g" \
- -e "s/@MIZARLIB@/\$(DESTDIR)\/@MIZARLIB@/g"
-
- sed -i configure.in -e "s/--mandir=\$mandir --enable-apron=\$HAS_APRON/ \
- --mandir=\$mandir --host=\$host --build=\$build --enable-apron=\$HAS_APRON/g"
- eautoreconf
-}
-
-src_compile() {
- if use gtk; then
- myconf="--enable-gui"
- else
- myconf="--disable-gui"
- fi
-
- econf ${myconf} || die "econf failed"
-
- #Dependencies can not be processed in parallel,
- #this is the intended behavior.
- emake -j1 depend || die "emake depend failed"
- emake all top DESTDIR="/" || die "emake failed"
-}
-
-src_install(){
- emake install DESTDIR="${D}" || die "emake install failed"
- dodoc Changelog doc/README
- for i in why/CHANGES why/COPYING why/README why/Version;
- do mv $i $i.why; done
- dodoc why/CHANGES.why why/COPYING.why why/README.why why/Version.why
- doman why/doc/why.1
-
- if use doc; then
- mv why/doc/manual.ps why/doc/why-manual.ps
- dodoc doc/manuals/* why/doc/why-manual.ps
- fi
-
- if use stateshook; then
- ewarn "USE flag 'stateshook' is enabled, it is not officially supported so do not report any bug upstream !"
- ewarn "The value analysis does not keep all the several states attached to a statement but just their union."
- ewarn "With this patch you can access all these states through a hook while the analysis is taking place."
- fi
-}
-
diff --git a/sci-mathematics/frama-c/frama-c-20081201.ebuild b/sci-mathematics/frama-c/frama-c-20081201.ebuild
deleted file mode 100644
index d4620196e..000000000
--- a/sci-mathematics/frama-c/frama-c-20081201.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: Exp $
-
-inherit autotools eutils
-
-DESCRIPTION="Frama-C is a suite of tools dedicated to the analysis of the source code of software written in C."
-HOMEPAGE="http://www.frama-c.cea.fr/"
-SRC_URI="http://www.frama-c.cea.fr/download/${PN/-c/-c-Lithium}-${PV/_/+}.tar.gz"
-
-LICENSE="LGPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-
-IUSE="apron coq doc gappa gtk pff pvs"
-RESTRICT="strip"
-
-RDEPEND="!sci-mathematics/why
- sci-mathematics/ltl2ba
- apron? ( sci-mathematics/apron )
- coq? ( sci-mathematics/coq )
- gappa? ( sci-mathematics/gappalib-coq )
- pff? ( sci-mathematics/pff )
- pvs? ( sci-mathematics/pvs )"
-
-DEPEND="${RDEPEND}
- >=dev-lang/ocaml-3.09
- gtk? ( >=dev-ml/lablgtk-2.6 )"
-
-S="${WORKDIR}/${PN/-c/-c-Lithium}-${PV/_/+}"
-
-src_unpack(){
- unpack ${A}
- cd "${S}"
-
- sed -i why/Makefile.in \
- -e "s/\$(COQLIB)/\$(DESTDIR)\/\$(COQLIB)/g" \
- -e "s/-w \$(DESTDIR)\/\$(COQLIB)/-w \$(COQLIB)/g" \
- -e "s/\$(PVSLIB)\/why/\$(DESTDIR)\/\$(PVSLIB)\/why/g" \
- -e "s/\$(MIZFILES)/\$(DESTDIR)\/\$(MIZFILES)/g" \
- -e "s/@MIZARLIB@/\$(DESTDIR)\/@MIZARLIB@/g"
-
- sed -i configure.in -e "s/--mandir=\$mandir --enable-apron=\$HAS_APRON/ \
- --mandir=\$mandir --host=\$host --build=\$build --enable-apron=\$HAS_APRON/g"
- eautoreconf
-}
-
-src_compile() {
- if use gtk; then
- myconf="--enable-gui"
- else
- myconf="--disable-gui"
- fi
-
- econf ${myconf} || die "econf failed"
-
- #Dependencies can not be processed in parallel,
- #this is the intended behavior.
- emake -j1 depend || die "emake depend failed"
- emake all top DESTDIR="/" || die "emake failed"
-}
-
-src_install(){
- emake install DESTDIR="${D}" || die "emake install failed"
- dodoc Changelog doc/README
- for i in why/CHANGES why/COPYING why/README why/Version;
- do mv $i $i.why; done
- dodoc why/CHANGES.why why/COPYING.why why/README.why why/Version.why
- doman why/doc/why.1
-
- if use doc; then
- mv why/doc/manual.ps why/doc/why-manual.ps
- dodoc doc/manuals/* why/doc/why-manual.ps
- fi
-}
-
diff --git a/sci-mathematics/frama-c/frama-c-20090601_beta1.ebuild b/sci-mathematics/frama-c/frama-c-20090601_beta1.ebuild
new file mode 100644
index 000000000..78ac8d7b4
--- /dev/null
+++ b/sci-mathematics/frama-c/frama-c-20090601_beta1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: Exp $
+
+inherit autotools eutils
+
+DESCRIPTION="Frama-C is a suite of tools dedicated to the analysis of the source code of software written in C."
+HOMEPAGE="http://www.frama-c.cea.fr/"
+NAME="Beryllium"
+SRC_URI="http://www.frama-c.cea.fr/download/${PN/-c/-c-$NAME}-${PV/_/-}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+IUSE="apron coq doc gappa gtk pff pvs +why"
+RESTRICT="strip"
+
+RDEPEND="sci-mathematics/ltl2ba
+ apron? ( sci-mathematics/apron )
+ coq? ( sci-mathematics/coq )
+ gappa? ( sci-mathematics/gappalib-coq )
+ pff? ( sci-mathematics/pff )
+ pvs? ( sci-mathematics/pvs )
+ why? ( sci-mathematics/why )"
+
+DEPEND="${RDEPEND}
+ >=dev-lang/ocaml-3.10.2
+ >=dev-ml/ocamlgraph-1.1
+ gtk? ( >=dev-ml/lablgtk-2.12 )"
+
+S="${WORKDIR}/${PN/-c/-c-$NAME}-${PV/_/-}"
+
+src_unpack(){
+ unpack ${A}
+ cd "${S}"
+
+ mv src/value/state_set.ml* src/memory_state/ || die
+ epatch "${FILESDIR}/${P}-states_hook.patch"
+ epatch "${FILESDIR}/${P}-stmt_deps.patch"
+ epatch "${FILESDIR}/${P}-accessors.patch"
+ epatch "${FILESDIR}/${P}-printexc.patch"
+ epatch "${FILESDIR}/${P}-configure.patch"
+ epatch "${FILESDIR}/${P}-ocamlgraph.patch"
+ epatch "${FILESDIR}/${P}-install_files.patch"
+
+ eautoreconf
+}
+
+src_compile() {
+ if use gtk; then
+ myconf="--enable-gui"
+ else
+ myconf="--disable-gui"
+ fi
+
+ econf ${myconf} --with-whydir=no || die "econf failed"
+
+ # dependencies can not be processed in parallel,
+ # this is the intended behavior.
+ emake -j1 depend || die "emake depend failed"
+ emake DESTDIR="/" || die "emake failed"
+}
+
+src_install(){
+ emake install DESTDIR="${D}" || die "emake install failed"
+ dodoc Changelog doc/README
+
+ if use doc; then
+ dodoc doc/manuals/*
+ fi
+}
+
diff --git a/sci-mathematics/pff/Manifest b/sci-mathematics/pff/Manifest
index 53273afb9..e4dfca6fc 100644
--- a/sci-mathematics/pff/Manifest
+++ b/sci-mathematics/pff/Manifest
@@ -1,2 +1,2 @@
-DIST Float1.2-8.2.tgz 322949 RMD160 5ef8a68e4c10d8cffe4cd8d3eb5d5d2c1394fb60 SHA1 ab9b01cf953e32c100ed21e9980adf68553aaed1 SHA256 df61debf5afb2cbf44be6a605622b1645ba07be1912bb154ef79009d7eb235b2
-EBUILD pff-8.2.1.2.ebuild 775 RMD160 0097b3a270cbe10f215f7d26dc1e010eb965f894 SHA1 e03367f4e28c6269f28aa26e295b52a51fb498d6 SHA256 b68e4b83555634e52eee1a0d40c4aa60ffc80729fe8e1b476e1d6bc24d1faae8
+DIST Float8.2-1.2.tgz 322949 RMD160 5ef8a68e4c10d8cffe4cd8d3eb5d5d2c1394fb60 SHA1 ab9b01cf953e32c100ed21e9980adf68553aaed1 SHA256 df61debf5afb2cbf44be6a605622b1645ba07be1912bb154ef79009d7eb235b2
+EBUILD pff-8.2.1.2.ebuild 775 RMD160 d5cd94ff2ab62d4591f4c95fef5ddcedca1a4e66 SHA1 ac4ccb9fd21c7b87e0d3ed239e6cc5406102238f SHA256 511f36dec4e350662ebb7b41ac5d0abf0455477b12b6c47277a5594e00d83a72
diff --git a/sci-mathematics/pff/pff-8.2.1.2.ebuild b/sci-mathematics/pff/pff-8.2.1.2.ebuild
index 33672f0f5..a46596a7b 100644
--- a/sci-mathematics/pff/pff-8.2.1.2.ebuild
+++ b/sci-mathematics/pff/pff-8.2.1.2.ebuild
@@ -4,7 +4,7 @@
DESCRIPTION="Library for reasoning about floating point numbers in coq."
HOMEPAGE="http://lipforge.ens-lyon.fr/www/pff/"
-SRC_URI="http://lipforge.ens-lyon.fr/frs/download.php/147/Float${PV/#????/}-${PV/%????/}.tgz"
+SRC_URI="http://lipforge.ens-lyon.fr/frs/download.php/147/Float${PV/%????/}-${PV/#????/}.tgz"
LICENSE="LGPL-2"
SLOT="0"
diff --git a/sci-mathematics/pvs/Manifest b/sci-mathematics/pvs/Manifest
index c699efe75..22fe434f0 100644
--- a/sci-mathematics/pvs/Manifest
+++ b/sci-mathematics/pvs/Manifest
@@ -1,6 +1,12 @@
-AUX pvs-4.2-patch-bddp 30976 RMD160 775e3abb61e9dbf3eab6c350667f2794951effac SHA1 e7365a472f650537eac450cdf97d09cd6977707b SHA256 362a9607b53db739da0893aea7041591eb9f66ca0632d274396ea67b3d69006c
-AUX pvs-4.2-patch-make 2255 RMD160 12330628838ad7114c4861c0ba6de31bee0ae2d2 SHA1 479ca8b2ba0ce0210af569db8dc8d395ffabc181 SHA256 18f623bd039816edc2e09c17017e5d340e13c891001c275f44d71db223c0d237
-AUX pvs-4.2-patch-sbcl 224495 RMD160 8a4f8efb35c165aedeba2c9718e3c88d7a40935e SHA1 8ad658caca0f4a83dd094ba7324259a9d84db7f2 SHA256 c810463328e759c654a0d7693a22203c35f169748504b25ae4476d2f6ff62151
+AUX 4.2/pvs-4.2-64bit.patch 30530 RMD160 76c15c02c77c1047eaa6a8936aadb0406f9cdb6b SHA1 b98064bddfe5ef828deaa8873fe3475188eb2d78 SHA256 eb4b0d3bfce23ff94814c14af12e35bd4c56b1ec7077235d725b7a0331874385
+AUX 4.2/pvs-4.2-config.patch 76584 RMD160 df7274e5a9a335edbe82ec05ac07ed84b3b63c98 SHA1 86432627211535e75fbcd6c33082cbce2fa0caf0 SHA256 edd4751a90c3b3d2b752016f33c6e4a96520550626c9e2433e6ffbf6983e7cea
+AUX 4.2/pvs-4.2-emacs.patch 18341 RMD160 0f9eb74aa5b89aa3e7c41ef5453a546b9c8cdaaa SHA1 77bb059ffe3fba7e885d0d12b2b8fe3378f5a631 SHA256 e67061ec991292cf71229fe1618d5afc892a6c2bd6bb82554c3de2ed9540b8ef
+AUX 4.2/pvs-4.2-emacs23.patch 485 RMD160 b420d683e183c3e41dc3e9be5a34ed0700edc9ea SHA1 313ea37f93c8bcee869ffb63aaaa7e2251c1e6a5 SHA256 fbbf7cc8c9a466b7b3ec77d0a3410334393cb2f5f471fa124f3622bfd1725f6a
+AUX 4.2/pvs-4.2-latex.patch 2006 RMD160 9157b5fb6d51a27b6adf74e74be010f09511ee90 SHA1 91c41c9b34e082456e56f55a16d24a86ee748ab9 SHA256 f3932c73a74fe19dcacc730bf182797c9b99b03f93d706f293a21f245c67b780
+AUX 4.2/pvs-4.2-mona.patch 1037 RMD160 71eea17c22b5b3a7e9c9f418d923c177c65608e9 SHA1 d0fed295c12e3e309dc85c77f58b8fdf97bf8011 SHA256 89af8f9a5e321d50a37a42e5e534dd0dbcca3a14185d03cf8a5e611c34913eb7
+AUX 4.2/pvs-4.2-sbcl-pic.patch 1621 RMD160 1286dc2b79d5704aa83ff9a4604c00f99128972c SHA1 352868e5ca53c754f6797a80a44380541cc5dc95 SHA256 c472900f74f2f4070609ee23a8a9dc297286bbe99094e652eeb2dc012364a496
+AUX 4.2/pvs-4.2-sbcl.patch 120352 RMD160 fdc64c4bf6c8660dde7f4dcfd88a1eca1d1eafc5 SHA1 d09d1639f836750f264eb759bdae6ccbf18940d3 SHA256 bf05206acc8b74a1ece03d05cfee7f3ab3bf3a18ca6ba08d4e7c2b486e5e2288
+AUX 4.2/pvs-4.2-typo.patch 4344 RMD160 e2a61864ba91a71d38dbd02523060e67c16cfd91 SHA1 0d4d391740e5ea102813e4d7cb8836a0661dea36 SHA256 a5b7faa4ee6c76f441f8a47b76babe6b579c7618e6661571fefd52b537ead2cf
+AUX 4.2/pvs-4.2-unused.patch 539 RMD160 2ca253776ad63a2eca771f76af4a5a8a3cf4db1b SHA1 7e171995188e3dacb3c2c8c13e098697fd9be766 SHA256 3831972c2e496280cb1db7eba9a980eed7e172e3f90ed8fa1cd7bdf9f2893761
DIST pvs-4.2-source.tgz 7951811 RMD160 90551627a059d633024d7a78dc6a72799f186e06 SHA1 5b53780cf449f8957613c6fc225ffecb2b454e25 SHA256 ac29bb19400fff2d794c1c8f7ef5747e8d83c66ddbe4249c8423ed7dca305309
-EBUILD pvs-4.2-r1.ebuild 2282 RMD160 e7e0b430d49d7411f77e59ccd143ca0f79aa2163 SHA1 c5ec6c342c103b919344455ff284af91aa1b7de0 SHA256 c53d6066455a597a99d000cb559994685ef2757639be289ec10f05d9d0719468
-EBUILD pvs-4.2.ebuild 1058 RMD160 aeedf7473a6dde7093a3c4615e7f036850ba1f19 SHA1 161ff414c8bad9e8e17351241bdba932f511e793 SHA256 a9a5c113dfd95f0d1b9246e9e66fb12fd218f9e7a90840c18e11e063dbd56438
+EBUILD pvs-4.2.ebuild 2183 RMD160 89dc7a598012346b2c560a4d79d2c08d8a87af1f SHA1 097915ee400ff621594c3277a8415bc232221935 SHA256 f00667b7ee2127a8f19fa9722ce8804e108b1f8ae7168e1c64397a3079e0f1ee
diff --git a/sci-mathematics/pvs/files/pvs-4.2-patch-bddp b/sci-mathematics/pvs/files/4.2/pvs-4.2-64bit.patch
index 1bc4681af..803c92893 100644
--- a/sci-mathematics/pvs/files/pvs-4.2-patch-bddp
+++ b/sci-mathematics/pvs/files/4.2/pvs-4.2-64bit.patch
@@ -1,6 +1,6 @@
-diff -Naur pvs4.2-orig/BDD/bdd/ex/test.pl pvs4.2-bddp/BDD/bdd/ex/test.pl
---- pvs4.2-orig/BDD/bdd/ex/test.pl 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/ex/test.pl 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/ex/test.pl pvs-sbcl-4.2/BDD/bdd/ex/test.pl
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/ex/test.pl 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/ex/test.pl 2008-08-08 15:23:15.000000000 -0600
@@ -8,11 +8,11 @@
(y implies x) and (y equiv a or not a) -> (x equiv y) .
@@ -16,9 +16,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/ex/test.pl pvs4.2-bddp/BDD/bdd/ex/test.pl
/* Portrait in the casket */
G :-
-diff -Naur pvs4.2-orig/BDD/bdd/src/appl.c pvs4.2-bddp/BDD/bdd/src/appl.c
---- pvs4.2-orig/BDD/bdd/src/appl.c 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/appl.c 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/appl.c pvs-sbcl-4.2/BDD/bdd/src/appl.c
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/appl.c 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/appl.c 2008-08-08 15:23:15.000000000 -0600
@@ -105,7 +105,7 @@
int flag;
@@ -67,9 +67,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/appl.c pvs4.2-bddp/BDD/bdd/src/appl.c
}
BDDPTR make_definition (int id_index, BDDPTR function)
-diff -Naur pvs4.2-orig/BDD/bdd/src/bdd.c pvs4.2-bddp/BDD/bdd/src/bdd.c
---- pvs4.2-orig/BDD/bdd/src/bdd.c 2007-09-05 00:04:00.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/bdd.c 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd.c pvs-sbcl-4.2/BDD/bdd/src/bdd.c
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd.c 2007-09-04 18:04:00.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/bdd.c 2008-08-08 15:23:15.000000000 -0600
@@ -214,13 +214,13 @@
falls apart. This is tested in bdd_alloc().
*/
@@ -147,9 +147,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/bdd.c pvs4.2-bddp/BDD/bdd/src/bdd.c
}
void bdd_print_node (FILE *fp, BDDPTR v)
-diff -Naur pvs4.2-orig/BDD/bdd/src/bdd_fns.c pvs4.2-bddp/BDD/bdd/src/bdd_fns.c
---- pvs4.2-orig/BDD/bdd/src/bdd_fns.c 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/bdd_fns.c 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd_fns.c pvs-sbcl-4.2/BDD/bdd/src/bdd_fns.c
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd_fns.c 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/bdd_fns.c 2008-08-08 15:23:15.000000000 -0600
@@ -833,7 +833,7 @@
static int rank_less_or_equal (void *a, void *b)
@@ -180,9 +180,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/bdd_fns.c pvs4.2-bddp/BDD/bdd/src/bdd_fns.c
/* Looks up BDD f in sop_cache and when a sum-of-cubes list is present
for it returns a full copy of the list (list elements are BDD cubes
-diff -Naur pvs4.2-orig/BDD/bdd/src/bdd.h pvs4.2-bddp/BDD/bdd/src/bdd.h
---- pvs4.2-orig/BDD/bdd/src/bdd.h 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/bdd.h 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd.h pvs-sbcl-4.2/BDD/bdd/src/bdd.h
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd.h 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/bdd.h 2008-08-08 15:23:15.000000000 -0600
@@ -31,7 +31,7 @@
/* IMPORTANT NOTICE!!!
@@ -291,9 +291,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/bdd.h pvs4.2-bddp/BDD/bdd/src/bdd.h
BDDPTR then_link; /* child for variable = 1 */
BDDPTR else_link; /* child for variable = 0 */
BDDPTR next; /* chaining in unique table */
-diff -Naur pvs4.2-orig/BDD/bdd/src/bdd_list.h pvs4.2-bddp/BDD/bdd/src/bdd_list.h
---- pvs4.2-orig/BDD/bdd/src/bdd_list.h 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/bdd_list.h 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd_list.h pvs-sbcl-4.2/BDD/bdd/src/bdd_list.h
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd_list.h 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/bdd_list.h 2008-08-08 15:23:15.000000000 -0600
@@ -27,8 +27,8 @@
#define BDD_LIST_END_FOR_EACH_ELEM END_FOR_EACH_LIST_ELEM
#define BDD_ELEM_CALLOC CALLOC_LIST_ELEM
@@ -305,9 +305,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/bdd_list.h pvs4.2-bddp/BDD/bdd/src/bdd_list.h
#define BDD_LIST_FIRST LIST_FIRST
#define BDD_LIST_NEXT LIST_NEXT
#define BDD_LIST_LAST LIST_LAST
-diff -Naur pvs4.2-orig/BDD/bdd/src/bdd_quant.c pvs4.2-bddp/BDD/bdd/src/bdd_quant.c
---- pvs4.2-orig/BDD/bdd/src/bdd_quant.c 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/bdd_quant.c 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd_quant.c pvs-sbcl-4.2/BDD/bdd/src/bdd_quant.c
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd_quant.c 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/bdd_quant.c 2008-08-08 15:23:15.000000000 -0600
@@ -777,14 +777,15 @@
/* Using muliplicative method in hashing. Constant A according Knuth:
A = (PHI - 1) * 2^32, with PHI = golden ratio = (1 + sqrt(5))/2
@@ -327,9 +327,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/bdd_quant.c pvs4.2-bddp/BDD/bdd/src/bdd_quant
static BDDPTR bdd_lookup_and_smooth_cache (BDDPTR f, BDDPTR g)
{
-diff -Naur pvs4.2-orig/BDD/bdd/src/bdd_vfns.c pvs4.2-bddp/BDD/bdd/src/bdd_vfns.c
---- pvs4.2-orig/BDD/bdd/src/bdd_vfns.c 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/bdd_vfns.c 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd_vfns.c pvs-sbcl-4.2/BDD/bdd/src/bdd_vfns.c
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd_vfns.c 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/bdd_vfns.c 2008-08-08 15:23:15.000000000 -0600
@@ -40,7 +40,7 @@
BDDPTR *F;
@@ -339,9 +339,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/bdd_vfns.c pvs4.2-bddp/BDD/bdd/src/bdd_vfns.c
return F+1;
}
return NULL;
-diff -Naur pvs4.2-orig/BDD/bdd/src/bdd_vfns.h pvs4.2-bddp/BDD/bdd/src/bdd_vfns.h
---- pvs4.2-orig/BDD/bdd/src/bdd_vfns.h 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/bdd_vfns.h 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd_vfns.h pvs-sbcl-4.2/BDD/bdd/src/bdd_vfns.h
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/bdd_vfns.h 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/bdd_vfns.h 2008-08-08 15:23:15.000000000 -0600
@@ -10,7 +10,7 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
@@ -351,9 +351,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/bdd_vfns.h pvs4.2-bddp/BDD/bdd/src/bdd_vfns.h
extern BDDPTR *MakeBDDVec (int size);
extern void FreeBDDVec (BDDPTR *F);
-diff -Naur pvs4.2-orig/BDD/bdd/src/ChangeLog pvs4.2-bddp/BDD/bdd/src/ChangeLog
---- pvs4.2-orig/BDD/bdd/src/ChangeLog 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/ChangeLog 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/ChangeLog pvs-sbcl-4.2/BDD/bdd/src/ChangeLog
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/ChangeLog 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/ChangeLog 2008-08-08 15:23:15.000000000 -0600
@@ -1,3 +1,17 @@
+2008-08-06 Jerry James <loganjerry@gmail.com>
+
@@ -372,9 +372,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/ChangeLog pvs4.2-bddp/BDD/bdd/src/ChangeLog
Thu Apr 16 10:25:56 1998 Geert Janssen <geert@cobra.ics.ele.tue.nl>
* bdd_quant.c (bdd_lookup_and_smooth_cache): also using
-diff -Naur pvs4.2-orig/BDD/bdd/src/main.c pvs4.2-bddp/BDD/bdd/src/main.c
---- pvs4.2-orig/BDD/bdd/src/main.c 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/main.c 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/main.c pvs-sbcl-4.2/BDD/bdd/src/main.c
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/main.c 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/main.c 2008-08-08 15:23:15.000000000 -0600
@@ -309,7 +309,7 @@
var_table = make_hashtab (3);
@@ -384,9 +384,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/main.c pvs4.2-bddp/BDD/bdd/src/main.c
aux_table = make_hashtab (0);
-diff -Naur pvs4.2-orig/BDD/bdd/src/Makefile pvs4.2-bddp/BDD/bdd/src/Makefile
---- pvs4.2-orig/BDD/bdd/src/Makefile 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/Makefile 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/Makefile pvs-sbcl-4.2/BDD/bdd/src/Makefile
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/Makefile 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/Makefile 2008-08-08 15:23:15.000000000 -0600
@@ -11,9 +11,9 @@
# specify appropriate C compiler flags here:
#CFLAGS= -Aa -D_POSIX_SOURCE $(INCLUDES)
@@ -439,9 +439,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/Makefile pvs4.2-bddp/BDD/bdd/src/Makefile
$(CC) -c ${CFLAGS} -w lex.yy.c
clean :
-diff -Naur pvs4.2-orig/BDD/bdd/src/template.c pvs4.2-bddp/BDD/bdd/src/template.c
---- pvs4.2-orig/BDD/bdd/src/template.c 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/template.c 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/template.c pvs-sbcl-4.2/BDD/bdd/src/template.c
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/template.c 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/template.c 2008-08-08 15:23:15.000000000 -0600
@@ -51,7 +51,7 @@
int main (int argc, char *argv[])
{
@@ -457,9 +457,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/template.c pvs4.2-bddp/BDD/bdd/src/template.c
bdd_print_stats (stdout);
+ return EXIT_SUCCESS;
}
-diff -Naur pvs4.2-orig/BDD/bdd/src/yacc.y pvs4.2-bddp/BDD/bdd/src/yacc.y
---- pvs4.2-orig/BDD/bdd/src/yacc.y 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/src/yacc.y 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/src/yacc.y pvs-sbcl-4.2/BDD/bdd/src/yacc.y
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/src/yacc.y 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/src/yacc.y 2008-08-08 15:23:15.000000000 -0600
@@ -99,6 +99,7 @@
extern void action (BDDPTR *F);
extern void parse_complete (void);
@@ -468,9 +468,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/src/yacc.y pvs4.2-bddp/BDD/bdd/src/yacc.y
void yyerror (char *format, ...);
void yywarning (char *format, ...);
-diff -Naur pvs4.2-orig/BDD/bdd/utils/alloc.c pvs4.2-bddp/BDD/bdd/utils/alloc.c
---- pvs4.2-orig/BDD/bdd/utils/alloc.c 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/utils/alloc.c 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/utils/alloc.c pvs-sbcl-4.2/BDD/bdd/utils/alloc.c
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/utils/alloc.c 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/utils/alloc.c 2008-08-08 15:23:15.000000000 -0600
@@ -101,10 +101,7 @@
{
long nr_bytes = nr_elems * bytes_per_elem;
@@ -483,9 +483,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/utils/alloc.c pvs4.2-bddp/BDD/bdd/utils/alloc.c
}
#if COMMENT
-diff -Naur pvs4.2-orig/BDD/bdd/utils/alloc.h pvs4.2-bddp/BDD/bdd/utils/alloc.h
---- pvs4.2-orig/BDD/bdd/utils/alloc.h 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/utils/alloc.h 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/utils/alloc.h pvs-sbcl-4.2/BDD/bdd/utils/alloc.h
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/utils/alloc.h 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/utils/alloc.h 2008-08-08 15:23:15.000000000 -0600
@@ -29,7 +29,7 @@
const char* fn, long ln);
@@ -495,9 +495,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/utils/alloc.h pvs4.2-bddp/BDD/bdd/utils/alloc.h
#endif
/* Allocates n consecutive bytes, returns pointer of type. */
-diff -Naur pvs4.2-orig/BDD/bdd/utils/general.h pvs4.2-bddp/BDD/bdd/utils/general.h
---- pvs4.2-orig/BDD/bdd/utils/general.h 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/utils/general.h 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/utils/general.h pvs-sbcl-4.2/BDD/bdd/utils/general.h
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/utils/general.h 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/utils/general.h 2008-08-08 15:23:15.000000000 -0600
@@ -30,6 +30,13 @@
/* Number of bits in a Nat: */
#define NAT_BIT 32
@@ -528,9 +528,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/utils/general.h pvs4.2-bddp/BDD/bdd/utils/general
typedef unsigned char Byte;
typedef unsigned char TinyNat;
typedef unsigned short int SmallNat;
-diff -Naur pvs4.2-orig/BDD/bdd/utils/hash.c pvs4.2-bddp/BDD/bdd/utils/hash.c
---- pvs4.2-orig/BDD/bdd/utils/hash.c 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/utils/hash.c 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/utils/hash.c pvs-sbcl-4.2/BDD/bdd/utils/hash.c
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/utils/hash.c 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/utils/hash.c 2008-08-08 15:23:15.000000000 -0600
@@ -290,7 +290,7 @@
for (i = 0; i < /*old*/ old_size; i++, entryp++)
if (*entryp) {
@@ -576,9 +576,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/utils/hash.c pvs4.2-bddp/BDD/bdd/utils/hash.c
}
print_hashtab (hashtab);
print_hashtab (hashtab2);
-diff -Naur pvs4.2-orig/BDD/bdd/utils/hash.h pvs4.2-bddp/BDD/bdd/utils/hash.h
---- pvs4.2-orig/BDD/bdd/utils/hash.h 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/utils/hash.h 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/utils/hash.h pvs-sbcl-4.2/BDD/bdd/utils/hash.h
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/utils/hash.h 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/utils/hash.h 2008-08-08 15:23:15.000000000 -0600
@@ -40,7 +40,7 @@
*/
#define ALLOW_REHASH
@@ -601,9 +601,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/utils/hash.h pvs4.2-bddp/BDD/bdd/utils/hash.h
/* Symbols for values returned by do_insert in lookup (). */
#define ALREADY_PRESENT 0
-diff -Naur pvs4.2-orig/BDD/bdd/utils/list.c pvs4.2-bddp/BDD/bdd/utils/list.c
---- pvs4.2-orig/BDD/bdd/utils/list.c 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/utils/list.c 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/utils/list.c pvs-sbcl-4.2/BDD/bdd/utils/list.c
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/utils/list.c 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/utils/list.c 2008-08-08 15:23:15.000000000 -0600
@@ -462,8 +462,15 @@
q = LIST_FIRST(list2);
@@ -622,9 +622,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/utils/list.c pvs4.2-bddp/BDD/bdd/utils/list.c
if (!comp) { /* ==> p = q */
if (remove_duplicates) {
-diff -Naur pvs4.2-orig/BDD/bdd/utils/Makefile pvs4.2-bddp/BDD/bdd/utils/Makefile
---- pvs4.2-orig/BDD/bdd/utils/Makefile 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/bdd/utils/Makefile 2009-03-24 18:49:23.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/bdd/utils/Makefile pvs-sbcl-4.2/BDD/bdd/utils/Makefile
+--- pvs-sbcl-4.2.ORIG/BDD/bdd/utils/Makefile 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd/utils/Makefile 2008-08-08 15:23:15.000000000 -0600
@@ -26,7 +26,7 @@
double.o : double.c double.h
list.o : list.c list.h alloc.h
@@ -634,25 +634,9 @@ diff -Naur pvs4.2-orig/BDD/bdd/utils/Makefile pvs4.2-bddp/BDD/bdd/utils/Makefile
dag.o : dag.c dag.h dag_customize.h general.h
tree.o : tree.c tree.h tree_customize.h general.h
-diff -Naur pvs4.2-orig/BDD/ix86-MacOSX/Makefile pvs4.2-bddp/BDD/ix86-MacOSX/Makefile
---- pvs4.2-orig/BDD/ix86-MacOSX/Makefile 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/ix86-MacOSX/Makefile 2009-03-24 18:49:24.000000000 +0000
-@@ -2,8 +2,11 @@
- MU = ../mu/src
- UTILS = ../bdd/utils
- INCLUDES = -I/usr/include -I$(BDD) -I$(UTILS) -I$(MU)
-+# MACOSX_DEPLOYMENT_TARGET and -weak_library are needed so that dylibs work
-+# for both leopard and tiger
-+MACOSX_DEPLOYMENT_TARGET=10.2
- LD = ld
--LDFLAGS = -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -L./
-+LDFLAGS = -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -L./ -weak_library /usr/lib/libSystem.B.dylib
- CC = cc
- CFLAGS = -dynamic -DNDEBUG $(INCLUDES)
- XCFLAGS = -O
-diff -Naur pvs4.2-orig/BDD/mu/src/lex.l pvs4.2-bddp/BDD/mu/src/lex.l
---- pvs4.2-orig/BDD/mu/src/lex.l 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/mu/src/lex.l 2009-03-24 18:49:24.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/mu/src/lex.l pvs-sbcl-4.2/BDD/mu/src/lex.l
+--- pvs-sbcl-4.2.ORIG/BDD/mu/src/lex.l 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/mu/src/lex.l 2008-08-08 15:23:15.000000000 -0600
@@ -229,7 +229,7 @@
/* unimportant white space or new_line */ }
@@ -662,9 +646,9 @@ diff -Naur pvs4.2-orig/BDD/mu/src/lex.l pvs4.2-bddp/BDD/mu/src/lex.l
%%
-diff -Naur pvs4.2-orig/BDD/mu/src/Makefile pvs4.2-bddp/BDD/mu/src/Makefile
---- pvs4.2-orig/BDD/mu/src/Makefile 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-bddp/BDD/mu/src/Makefile 2009-03-24 18:49:24.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/mu/src/Makefile pvs-sbcl-4.2/BDD/mu/src/Makefile
+--- pvs-sbcl-4.2.ORIG/BDD/mu/src/Makefile 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/mu/src/Makefile 2008-08-08 15:23:15.000000000 -0600
@@ -1,8 +1,8 @@
# Copyright (c) 1992-1995 G. Janssen
@@ -685,9 +669,9 @@ diff -Naur pvs4.2-orig/BDD/mu/src/Makefile pvs4.2-bddp/BDD/mu/src/Makefile
lex.yy.o : lex.yy.c y.tab.h mu.h
$(CC) ${CFLAGS} -w -c lex.yy.c
-diff -Naur pvs4.2-orig/BDD/mu/src/mu.c pvs4.2-bddp/BDD/mu/src/mu.c
---- pvs4.2-orig/BDD/mu/src/mu.c 2007-09-06 18:49:37.000000000 +0000
-+++ pvs4.2-bddp/BDD/mu/src/mu.c 2009-03-24 18:49:24.000000000 +0000
+diff -dur pvs-sbcl-4.2.ORIG/BDD/mu/src/mu.c pvs-sbcl-4.2/BDD/mu/src/mu.c
+--- pvs-sbcl-4.2.ORIG/BDD/mu/src/mu.c 2007-09-06 12:49:37.000000000 -0600
++++ pvs-sbcl-4.2/BDD/mu/src/mu.c 2008-08-08 15:23:15.000000000 -0600
@@ -450,7 +450,7 @@
/* Used in print_list. */
static void print_var (FILE *fp, void *bdd_idx)
diff --git a/sci-mathematics/pvs/files/4.2/pvs-4.2-config.patch b/sci-mathematics/pvs/files/4.2/pvs-4.2-config.patch
new file mode 100644
index 000000000..6d351c95b
--- /dev/null
+++ b/sci-mathematics/pvs/files/4.2/pvs-4.2-config.patch
@@ -0,0 +1,2766 @@
+diff -dur pvs-sbcl-4.2.ORIG/config.guess pvs-sbcl-4.2/config.guess
+--- pvs-sbcl-4.2.ORIG/config.guess 2007-07-02 14:07:43.000000000 -0600
++++ pvs-sbcl-4.2/config.guess 2009-01-23 14:20:55.000000000 -0700
+@@ -1,9 +1,10 @@
+ #! /bin/sh
+ # Attempt to guess a canonical system name.
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
++# Free Software Foundation, Inc.
+
+-timestamp='2003-06-17'
++timestamp='2008-12-19'
+
+ # This file is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by
+@@ -17,13 +18,15 @@
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
++# 02110-1301, USA.
+ #
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+ # configuration script generated by Autoconf, you may include it under
+ # the same distribution terms that you use for the rest of that program.
+
++
+ # Originally written by Per Bothner <per@bothner.com>.
+ # Please send patches to <config-patches@gnu.org>. Submit a context
+ # diff and a properly formatted ChangeLog entry.
+@@ -53,8 +56,8 @@
+ GNU config.guess ($timestamp)
+
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+-Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -66,11 +69,11 @@
+ while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+- echo "$timestamp" ; exit 0 ;;
++ echo "$timestamp" ; exit ;;
+ --version | -v )
+- echo "$version" ; exit 0 ;;
++ echo "$version" ; exit ;;
+ --help | --h* | -h )
+- echo "$usage"; exit 0 ;;
++ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+@@ -104,7 +107,7 @@
+ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+ : ${TMPDIR=/tmp} ;
+- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+@@ -123,7 +126,7 @@
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+-esac ;'
++esac ; set_cc_for_build= ;'
+
+ # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+ # (ghazi@noc.rutgers.edu 1994-08-24)
+@@ -136,13 +139,6 @@
+ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+-## for Red Hat Linux
+-if test -f /etc/redhat-release ; then
+- VENDOR=redhat ;
+-else
+- VENDOR= ;
+-fi
+-
+ # Note: order is significant - the case branches are not exclusive.
+
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+@@ -165,6 +161,7 @@
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
++ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+@@ -203,50 +200,32 @@
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+- exit 0 ;;
+- amiga:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- arc:OpenBSD:*:*)
+- echo mipsel-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- hp300:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- mac68k:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- macppc:OpenBSD:*:*)
+- echo powerpc-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- mvme68k:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- mvme88k:OpenBSD:*:*)
+- echo m88k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- mvmeppc:OpenBSD:*:*)
+- echo powerpc-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- pmax:OpenBSD:*:*)
+- echo mipsel-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- sgi:OpenBSD:*:*)
+- echo mipseb-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- sun3:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- wgrisc:OpenBSD:*:*)
+- echo mipsel-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:OpenBSD:*:*)
+- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
++ exit ;;
++ *:ekkoBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
++ exit ;;
++ *:SolidBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
++ exit ;;
++ macppc:MirBSD:*:*)
++ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
++ exit ;;
++ *:MirBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
++ exit ;;
+ alpha:OSF1:*:*)
+- if test $UNAME_RELEASE = "V4.0"; then
++ case $UNAME_RELEASE in
++ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+- fi
++ ;;
++ *5.*)
++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
++ ;;
++ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+@@ -284,42 +263,49 @@
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
++ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+- exit 0 ;;
+- Alpha*:OpenVMS:*:*)
+- echo alpha-hp-vms
+- exit 0 ;;
++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
++ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+- exit 0 ;;
++ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+- exit 0 ;;
++ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+- exit 0;;
++ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+- exit 0 ;;
++ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+- exit 0 ;;
++ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+- exit 0 ;;
++ exit ;;
++ *:z/VM:*:*)
++ echo s390-ibm-zvmoe
++ exit ;;
++ *:OS400:*:*)
++ echo powerpc-ibm-os400
++ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+- exit 0;;
++ exit ;;
++ arm:riscos:*:*|arm:RISCOS:*:*)
++ echo arm-unknown-riscos
++ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+- exit 0;;
++ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+@@ -327,32 +313,45 @@
+ else
+ echo pyramid-pyramid-bsd
+ fi
+- exit 0 ;;
++ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+- exit 0 ;;
++ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+- exit 0 ;;
+- DRS?6000:UNIX_SV:4.2*:7*)
++ exit ;;
++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+- sparc) echo sparc-icl-nx7 && exit 0 ;;
++ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
++ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
+- i86pc:SunOS:5.*:*)
+- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
++ exit ;;
++ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
++ eval $set_cc_for_build
++ SUN_ARCH="i386"
++ # If there is a compiler, see if it is configured for 64-bit objects.
++ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
++ # This test works for both compilers.
++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++ grep IS_64BIT_ARCH >/dev/null
++ then
++ SUN_ARCH="x86_64"
++ fi
++ fi
++ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
++ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+@@ -361,10 +360,10 @@
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+- exit 0 ;;
++ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+@@ -376,10 +375,10 @@
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+- exit 0 ;;
++ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+@@ -390,37 +389,40 @@
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
++ m68k:machten:*:*)
++ echo m68k-apple-machten${UNAME_RELEASE}
++ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+- exit 0 ;;
++ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+@@ -444,32 +446,33 @@
+ exit (-1);
+ }
+ EOF
+- $CC_FOR_BUILD -o $dummy $dummy.c \
+- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+- && exit 0
++ $CC_FOR_BUILD -o $dummy $dummy.c &&
++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
++ SYSTEM_NAME=`$dummy $dummyarg` &&
++ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+- exit 0 ;;
++ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+- exit 0 ;;
++ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+- exit 0 ;;
++ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+- exit 0 ;;
++ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+- exit 0 ;;
++ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+- exit 0 ;;
++ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+- exit 0 ;;
++ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+@@ -485,29 +488,29 @@
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+- exit 0 ;;
++ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+- exit 0 ;;
++ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+- exit 0 ;;
++ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+- exit 0 ;;
++ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+- exit 0 ;;
++ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+- exit 0 ;;
++ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+- exit 0 ;;
++ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+@@ -515,7 +518,7 @@
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+- exit 0 ;;
++ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+@@ -530,15 +533,19 @@
+ exit(0);
+ }
+ EOF
+- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+- echo rs6000-ibm-aix3.2.5
++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
++ then
++ echo "$SYSTEM_NAME"
++ else
++ echo rs6000-ibm-aix3.2.5
++ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+- exit 0 ;;
+- *:AIX:*:[45])
++ exit ;;
++ *:AIX:*:[456])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+@@ -551,28 +558,28 @@
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+- exit 0 ;;
++ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+- exit 0 ;;
++ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+- exit 0 ;;
++ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+- exit 0 ;; # report: romp-ibm BSD 4.3
++ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+- exit 0 ;;
++ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+- exit 0 ;;
++ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+- exit 0 ;;
++ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+- exit 0 ;;
++ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+@@ -634,9 +641,19 @@
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+- # avoid double evaluation of $set_cc_for_build
+- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
++ eval $set_cc_for_build
++
++ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
++ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
++ # generating 64-bit code. GNU and HP use different nomenclature:
++ #
++ # $ CC_FOR_BUILD=cc ./config.guess
++ # => hppa2.0w-hp-hpux11.23
++ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
++ # => hppa64-hp-hpux11.23
++
++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
++ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+@@ -644,11 +661,11 @@
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+- exit 0 ;;
++ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+- exit 0 ;;
++ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+@@ -676,150 +693,192 @@
+ exit (0);
+ }
+ EOF
+- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
++ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
++ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+- exit 0 ;;
++ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+- exit 0 ;;
++ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+- exit 0 ;;
++ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+- exit 0 ;;
++ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+- exit 0 ;;
++ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+- exit 0 ;;
++ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+- exit 0 ;;
++ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+- exit 0 ;;
++ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+- exit 0 ;;
++ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+- exit 0 ;;
++ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+- exit 0 ;;
++ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+- exit 0 ;;
++ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+- exit 0 ;;
++ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+- exit 0 ;;
++ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+- exit 0 ;;
++ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+- exit 0 ;;
++ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+- exit 0 ;;
++ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+- exit 0 ;;
++ exit ;;
+ *:UNICOS/mp:*:*)
+- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+- exit 0 ;;
++ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+- exit 0 ;;
++ exit ;;
++ 5000:UNIX_System_V:4.*:*)
++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+- exit 0 ;;
+- *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
+- # Determine whether the default compiler uses glibc.
+- eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
+- #include <features.h>
+- #if __GLIBC__ >= 2
+- LIBC=gnu
+- #else
+- LIBC=
+- #endif
+-EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+- exit 0 ;;
++ exit ;;
++ *:FreeBSD:*:*)
++ case ${UNAME_MACHINE} in
++ pc98)
++ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ amd64)
++ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ *)
++ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ esac
++ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+- exit 0 ;;
+- i*:MINGW*:*)
++ exit ;;
++ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+- exit 0 ;;
++ exit ;;
++ i*:windows32*:*)
++ # uname -m includes "-pc" on this system.
++ echo ${UNAME_MACHINE}-mingw32
++ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+- exit 0 ;;
+- x86:Interix*:[34]*)
+- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+- exit 0 ;;
++ exit ;;
++ *:Interix*:[3456]*)
++ case ${UNAME_MACHINE} in
++ x86)
++ echo i586-pc-interix${UNAME_RELEASE}
++ exit ;;
++ EM64T | authenticamd | genuineintel)
++ echo x86_64-unknown-interix${UNAME_RELEASE}
++ exit ;;
++ IA64)
++ echo ia64-unknown-interix${UNAME_RELEASE}
++ exit ;;
++ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+- exit 0 ;;
++ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+- exit 0 ;;
++ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+- exit 0 ;;
++ exit ;;
++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
++ echo x86_64-unknown-cygwin
++ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+- exit 0 ;;
++ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
++ exit ;;
+ *:GNU:*:*)
++ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+- exit 0 ;;
++ exit ;;
++ *:GNU/*:*:*)
++ # other systems with GNU libc and userland
++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
++ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+- exit 0 ;;
++ exit ;;
+ arm*:Linux:*:*)
++ eval $set_cc_for_build
++ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
++ | grep -q __ARM_EABI__
++ then
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ else
++ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++ fi
++ exit ;;
++ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+- exit 0 ;;
++ exit ;;
++ crisv32:Linux:*:*)
++ echo crisv32-axis-linux-gnu
++ exit ;;
++ frv:Linux:*:*)
++ echo frv-unknown-linux-gnu
++ exit ;;
+ ia64:Linux:*:*)
+- echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
+- exit 0 ;;
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ m32r*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+@@ -836,8 +895,12 @@
+ #endif
+ #endif
+ EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
++ /^CPU/{
++ s: ::g
++ p
++ }'`"
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+@@ -855,15 +918,22 @@
+ #endif
+ #endif
+ EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
++ /^CPU/{
++ s: ::g
++ p
++ }'`"
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
++ or32:Linux:*:*)
++ echo or32-unknown-linux-gnu
++ exit ;;
+ ppc:Linux:*:*)
+- echo powerpc-${VENDOR:-unknown}-linux-gnu
+- exit 0 ;;
++ echo powerpc-unknown-linux-gnu
++ exit ;;
+ ppc64:Linux:*:*)
+- echo powerpc64-${VENDOR:-unknown}-linux-gnu
+- exit 0 ;;
++ echo powerpc64-unknown-linux-gnu
++ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+@@ -877,7 +947,10 @@
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+- exit 0 ;;
++ exit ;;
++ padre:Linux:*:*)
++ echo sparc-unknown-linux-gnu
++ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+@@ -885,25 +958,31 @@
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+- exit 0 ;;
++ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+- echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
+- exit 0 ;;
++ echo ${UNAME_MACHINE}-ibm-linux
++ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
++ vax:Linux:*:*)
++ echo ${UNAME_MACHINE}-dec-linux-gnu
++ exit ;;
+ x86_64:Linux:*:*)
+- echo x86_64-${VENDOR:-unknown}-linux-gnu
+- exit 0 ;;
++ echo x86_64-unknown-linux-gnu
++ exit ;;
++ xtensa*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+@@ -921,15 +1000,12 @@
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+- exit 0 ;;
+- coff-i386)
+- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+- exit 0 ;;
++ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+- exit 0 ;;
++ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+@@ -946,23 +1022,33 @@
+ LIBC=gnulibc1
+ # endif
+ #else
+- #ifdef __INTEL_COMPILER
++ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
++ #ifdef __dietlibc__
++ LIBC=dietlibc
++ #endif
+ EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0
+- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
++ /^LIBC/{
++ s: ::g
++ p
++ }'`"
++ test x"${LIBC}" != x && {
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
++ exit
++ }
++ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+- exit 0 ;;
++ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+@@ -970,24 +1056,27 @@
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+- exit 0 ;;
++ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+- exit 0 ;;
++ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+- exit 0 ;;
++ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+- exit 0 ;;
++ exit ;;
++ i*86:syllable:*:*)
++ echo ${UNAME_MACHINE}-pc-syllable
++ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+- exit 0 ;;
++ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+@@ -995,15 +1084,16 @@
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+- exit 0 ;;
+- i*86:*:5:[78]*)
++ exit ;;
++ i*86:*:5:[678]*)
++ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+- exit 0 ;;
++ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+@@ -1021,73 +1111,83 @@
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+- exit 0 ;;
++ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+- exit 0 ;;
++ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+- exit 0 ;;
++ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+- exit 0 ;;
++ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+- exit 0 ;;
++ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+- exit 0 ;;
++ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+- exit 0 ;;
++ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+- exit 0 ;;
+- M68*:*:R3V[567]*:*)
+- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
++ exit ;;
++ M68*:*:R3V[5678]*:*)
++ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
++ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+- && echo i486-ncr-sysv4 && exit 0 ;;
++ && { echo i486-ncr-sysv4; exit; } ;;
++ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
++ OS_REL='.3'
++ test -r /etc/.relid \
++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
++ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+- exit 0 ;;
++ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+- exit 0 ;;
++ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+- exit 0 ;;
++ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+@@ -1095,68 +1195,84 @@
+ else
+ echo ns32k-sni-sysv
+ fi
+- exit 0 ;;
++ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+- exit 0 ;;
++ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+- exit 0 ;;
++ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+- exit 0 ;;
++ exit ;;
++ i*86:VOS:*:*)
++ # From Paul.Green@stratus.com.
++ echo ${UNAME_MACHINE}-stratus-vos
++ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+- exit 0 ;;
++ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+- exit 0 ;;
++ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+- exit 0 ;;
++ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+- exit 0 ;;
++ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+- exit 0 ;;
++ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+- exit 0 ;;
++ exit ;;
++ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
++ echo i586-pc-haiku
++ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
++ SX-7:SUPER-UX:*:*)
++ echo sx7-nec-superux${UNAME_RELEASE}
++ exit ;;
++ SX-8:SUPER-UX:*:*)
++ echo sx8-nec-superux${UNAME_RELEASE}
++ exit ;;
++ SX-8R:SUPER-UX:*:*)
++ echo sx8r-nec-superux${UNAME_RELEASE}
++ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:Darwin:*:*)
+- case `uname -p` in
+- *86) UNAME_PROCESSOR=i686 ;;
+- powerpc) UNAME_PROCESSOR=powerpc ;;
++ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
++ case $UNAME_PROCESSOR in
++ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+@@ -1164,22 +1280,25 @@
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+- exit 0 ;;
+- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
++ exit ;;
++ NSE-?:NONSTOP_KERNEL:*:*)
++ echo nse-tandem-nsk${UNAME_RELEASE}
++ exit ;;
++ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+- exit 0 ;;
++ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+- exit 0 ;;
++ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+@@ -1190,28 +1309,47 @@
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+- exit 0 ;;
++ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+- exit 0 ;;
++ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+- exit 0 ;;
++ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+- exit 0 ;;
++ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+- exit 0 ;;
++ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+- exit 0 ;;
++ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+- exit 0 ;;
++ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
++ *:DragonFly:*:*)
++ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
++ exit ;;
++ *:*VMS:*:*)
++ UNAME_MACHINE=`(uname -p) 2>/dev/null`
++ case "${UNAME_MACHINE}" in
++ A*) echo alpha-dec-vms ; exit ;;
++ I*) echo ia64-dec-vms ; exit ;;
++ V*) echo vax-dec-vms ; exit ;;
++ esac ;;
++ *:XENIX:*:SysV)
++ echo i386-pc-xenix
++ exit ;;
++ i*86:skyos:*:*)
++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
++ exit ;;
++ i*86:rdos:*:*)
++ echo ${UNAME_MACHINE}-pc-rdos
++ exit ;;
+ esac
+
+ #echo '(No uname command or uname output not recognized.)' 1>&2
+@@ -1243,7 +1381,7 @@
+ #endif
+
+ #if defined (__arm) && defined (__acorn) && defined (__unix)
+- printf ("arm-acorn-riscix"); exit (0);
++ printf ("arm-acorn-riscix\n"); exit (0);
+ #endif
+
+ #if defined (hp300) && !defined (hpux)
+@@ -1332,11 +1470,12 @@
+ }
+ EOF
+
+-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
++ { echo "$SYSTEM_NAME"; exit; }
+
+ # Apollos put the system type in the environment.
+
+-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+ # Convex versions that predate uname can use getsysinfo(1)
+
+@@ -1345,22 +1484,22 @@
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+- exit 0 ;;
++ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+- exit 0 ;;
++ exit ;;
+ c34*)
+ echo c34-convex-bsd
+- exit 0 ;;
++ exit ;;
+ c38*)
+ echo c38-convex-bsd
+- exit 0 ;;
++ exit ;;
+ c4*)
+ echo c4-convex-bsd
+- exit 0 ;;
++ exit ;;
+ esac
+ fi
+
+@@ -1371,7 +1510,9 @@
+ the operating system you are using. It is advised that you
+ download the most up to date version of the config scripts from
+
+- ftp://ftp.gnu.org/pub/gnu/config/
++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
++and
++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+ If the version you run ($0) is already up to date, please
+ send the following data and any information you think might be
+diff -dur pvs-sbcl-4.2.ORIG/config.sub pvs-sbcl-4.2/config.sub
+--- pvs-sbcl-4.2.ORIG/config.sub 2007-07-02 14:07:43.000000000 -0600
++++ pvs-sbcl-4.2/config.sub 2009-01-23 14:21:34.000000000 -0700
+@@ -1,9 +1,10 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
++# Free Software Foundation, Inc.
+
+-timestamp='2003-06-18'
++timestamp='2009-01-19'
+
+ # This file is (in principle) common to ALL GNU software.
+ # The presence of a machine in this file suggests that SOME GNU software
+@@ -21,14 +22,15 @@
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330,
+-# Boston, MA 02111-1307, USA.
+-
++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
++# 02110-1301, USA.
++#
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+ # configuration script generated by Autoconf, you may include it under
+ # the same distribution terms that you use for the rest of that program.
+
++
+ # Please send patches to <config-patches@gnu.org>. Submit a context
+ # diff and a properly formatted ChangeLog entry.
+ #
+@@ -70,8 +72,8 @@
+ version="\
+ GNU config.sub ($timestamp)
+
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+-Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -83,11 +85,11 @@
+ while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+- echo "$timestamp" ; exit 0 ;;
++ echo "$timestamp" ; exit ;;
+ --version | -v )
+- echo "$version" ; exit 0 ;;
++ echo "$version" ; exit ;;
+ --help | --h* | -h )
+- echo "$usage"; exit 0 ;;
++ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+@@ -99,7 +101,7 @@
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+- exit 0;;
++ exit ;;
+
+ * )
+ break ;;
+@@ -118,7 +120,10 @@
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
++ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
++ kopensolaris*-gnu* | \
++ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+@@ -144,7 +149,7 @@
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+- -apple | -axis)
++ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+@@ -169,6 +174,10 @@
+ -hiux*)
+ os=-hiuxwe2
+ ;;
++ -sco6)
++ os=-sco5v6
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+@@ -185,6 +194,10 @@
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
++ -sco5v6*)
++ # Don't forget version if it is 3.2v4 or newer.
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+@@ -228,45 +241,56 @@
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
++ | am33_2.0 \
++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
++ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+- | fr30 | frv \
++ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+- | ip2k \
+- | m32r | m68000 | m68k | m88k | mcore \
++ | ip2k | iq2000 \
++ | lm32 \
++ | m32c | m32r | m32rle | m68000 | m68k | m88k \
++ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+- | mips64vr | mips64vrel \
++ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
++ | mips64r5900 | mips64r5900el \
++ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
++ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
++ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
++ | mt \
+ | msp430 \
++ | nios | nios2 \
+ | ns16k | ns32k \
+- | openrisc | or32 \
++ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+- | s390 | s390x \
+- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
++ | score \
++ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+- | strongarm \
++ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
++ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
++ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+- | x86 | xscale | xstormy16 | xtensa \
+- | z8k)
++ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
++ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+@@ -276,6 +300,9 @@
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
++ ms1)
++ basic_machine=mt-unknown
++ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+@@ -295,55 +322,67 @@
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+- | avr-* \
+- | bs2000-* \
++ | avr-* | avr32-* \
++ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+- | clipper-* | cydra-* \
++ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
++ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+- | ip2k-* \
+- | m32r-* \
++ | ip2k-* | iq2000-* \
++ | lm32-* \
++ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+- | m88110-* | m88k-* | mcore-* \
++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+- | mips64vr-* | mips64vrel-* \
++ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
++ | mips64r5900-* | mips64r5900el-* \
++ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
++ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
++ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
++ | mmix-* \
++ | mt-* \
+ | msp430-* \
+- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
++ | nios-* | nios2-* \
++ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+- | s390-* | s390x-* \
+- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
++ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
++ | sparclite-* \
++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+- | xtensa-* \
++ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
++ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+- | z8k-*)
++ | z8k-* | z80-*)
++ ;;
++ # Recognize the basic CPU types without company name, with glob match.
++ xtensa*)
++ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+@@ -361,6 +400,9 @@
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
++ abacus)
++ basic_machine=abacus-unknown
++ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+@@ -378,6 +420,9 @@
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
++ amd64-*)
++ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+@@ -409,10 +454,22 @@
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
++ blackfin)
++ basic_machine=bfin-unknown
++ os=-linux
++ ;;
++ blackfin-*)
++ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
++ os=-linux
++ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
++ cegcc)
++ basic_machine=arm-unknown
++ os=-cegcc
++ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+@@ -437,12 +494,27 @@
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
++ craynv)
++ basic_machine=craynv-cray
++ os=-unicosmp
++ ;;
++ cr16)
++ basic_machine=cr16-unknown
++ os=-elf
++ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
++ crisv32 | crisv32-* | etraxfs*)
++ basic_machine=crisv32-axis
++ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
++ crx)
++ basic_machine=crx-unknown
++ os=-elf
++ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+@@ -465,6 +537,14 @@
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
++ dicos)
++ basic_machine=i686-pc
++ os=-dicos
++ ;;
++ djgpp)
++ basic_machine=i586-pc
++ os=-msdosdjgpp
++ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+@@ -615,6 +695,14 @@
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
++ m68knommu)
++ basic_machine=m68k-unknown
++ os=-linux
++ ;;
++ m68knommu-*)
++ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
++ os=-linux
++ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+@@ -630,6 +718,10 @@
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
++ mingw32ce)
++ basic_machine=arm-unknown
++ os=-mingw32ce
++ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+@@ -643,10 +735,6 @@
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+- mmix*)
+- basic_machine=mmix-knuth
+- os=-mmixware
+- ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+@@ -659,6 +747,9 @@
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
++ ms1-*)
++ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
++ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+@@ -727,10 +818,6 @@
+ np1)
+ basic_machine=np1-gould
+ ;;
+- nv1)
+- basic_machine=nv1-cray
+- os=-unicosmp
+- ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+@@ -738,9 +825,12 @@
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+- or32 | or32-*)
++ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+- os=-coff
++ ;;
++ os400)
++ basic_machine=powerpc-ibm
++ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+@@ -758,6 +848,14 @@
+ basic_machine=i860-intel
+ os=-osf
+ ;;
++ parisc)
++ basic_machine=hppa-unknown
++ os=-linux
++ ;;
++ parisc-*)
++ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
++ os=-linux
++ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+@@ -767,6 +865,12 @@
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
++ pc98)
++ basic_machine=i386-pc
++ ;;
++ pc98-*)
++ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+@@ -823,6 +927,10 @@
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
++ rdos)
++ basic_machine=i386-pc
++ os=-rdos
++ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+@@ -833,6 +941,12 @@
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
++ s390 | s390-*)
++ basic_machine=s390-ibm
++ ;;
++ s390x | s390x-*)
++ basic_machine=s390x-ibm
++ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+@@ -843,6 +957,10 @@
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
++ sde)
++ basic_machine=mipsisa32-sde
++ os=-elf
++ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+@@ -854,6 +972,9 @@
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
++ sh5el)
++ basic_machine=sh5le-unknown
++ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+@@ -943,6 +1064,10 @@
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
++ tile*)
++ basic_machine=tile-unknown
++ os=-linux-gnu
++ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+@@ -956,6 +1081,10 @@
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
++ tpf)
++ basic_machine=s390x-ibm
++ os=-tpf
++ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+@@ -999,6 +1128,10 @@
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
++ xbox)
++ basic_machine=i686-pc
++ os=-mingw32
++ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+@@ -1010,6 +1143,10 @@
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
++ z80-*-coff)
++ basic_machine=z80-unknown
++ os=-sim
++ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+@@ -1029,6 +1166,9 @@
+ romp)
+ basic_machine=romp-ibm
+ ;;
++ mmix)
++ basic_machine=mmix-knuth
++ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+@@ -1045,13 +1185,10 @@
+ we32k)
+ basic_machine=we32k-att
+ ;;
+- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
++ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+- sh64)
+- basic_machine=sh64-unknown
+- ;;
+- sparc | sparcv8 | sparcv9 | sparcv9b)
++ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+@@ -1120,23 +1257,28 @@
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
++ | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
++ | -openbsd* | -solidbsd* \
++ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
++ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+- | -chorusos* | -chorusrdb* \
++ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
++ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
++ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+- | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+@@ -1154,12 +1296,15 @@
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
++ -linux-dietlibc)
++ os=-linux-dietlibc
++ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+@@ -1172,6 +1317,9 @@
+ -opened*)
+ os=-openedition
+ ;;
++ -os400*)
++ os=-os400
++ ;;
+ -wince*)
+ os=-wince
+ ;;
+@@ -1193,6 +1341,9 @@
+ -atheos*)
+ os=-atheos
+ ;;
++ -syllable*)
++ os=-syllable
++ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+@@ -1215,6 +1366,9 @@
+ -sinix*)
+ os=-sysv4
+ ;;
++ -tpf*)
++ os=-tpf
++ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+@@ -1251,6 +1405,12 @@
+ -kaos*)
+ os=-kaos
+ ;;
++ -zvmoe)
++ os=-zvmoe
++ ;;
++ -dicos*)
++ os=-dicos
++ ;;
+ -none)
+ ;;
+ *)
+@@ -1273,6 +1433,12 @@
+ # system, and we'll never get to this point.
+
+ case $basic_machine in
++ score-*)
++ os=-elf
++ ;;
++ spu-*)
++ os=-elf
++ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+@@ -1282,8 +1448,8 @@
+ arm*-semi)
+ os=-aout
+ ;;
+- c4x-* | tic4x-*)
+- os=-coff
++ c4x-* | tic4x-*)
++ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+@@ -1310,6 +1476,9 @@
+ m68*-cisco)
+ os=-aout
+ ;;
++ mep-*)
++ os=-elf
++ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+@@ -1328,9 +1497,15 @@
+ *-be)
+ os=-beos
+ ;;
++ *-haiku)
++ os=-haiku
++ ;;
+ *-ibm)
+ os=-aix
+ ;;
++ *-knuth)
++ os=-mmixware
++ ;;
+ *-wec)
+ os=-proelf
+ ;;
+@@ -1463,9 +1638,15 @@
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
++ -os400*)
++ vendor=ibm
++ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
++ -tpf*)
++ vendor=ibm
++ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+@@ -1490,7 +1671,7 @@
+ esac
+
+ echo $basic_machine$os
+-exit 0
++exit
+
+ # Local variables:
+ # eval: (add-hook 'write-file-hooks 'time-stamp)
+diff -dur pvs-sbcl-4.2.ORIG/install-sh pvs-sbcl-4.2/install-sh
+--- pvs-sbcl-4.2.ORIG/install-sh 2007-07-02 14:07:43.000000000 -0600
++++ pvs-sbcl-4.2/install-sh 2008-02-04 06:53:53.000000000 -0700
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ # install - install a program, script, or datafile
+
+-scriptversion=2005-11-07.23
++scriptversion=2006-12-25.00
+
+ # This originates from X11R5 (mit/util/scripts/install.sh), which was
+ # later released in X11R6 (xc/config/util/install.sh) with the
+@@ -39,52 +39,68 @@
+ # when there is no Makefile.
+ #
+ # This script is compatible with the BSD install script, but was written
+-# from scratch. It can only install one file at a time, a restriction
+-# shared with many OS's install programs.
++# from scratch.
++
++nl='
++'
++IFS=" "" $nl"
+
+ # set DOITPROG to echo to test this script
+
+ # Don't use :- since 4.3BSD and earlier shells don't like it.
+-doit="${DOITPROG-}"
++doit=${DOITPROG-}
++if test -z "$doit"; then
++ doit_exec=exec
++else
++ doit_exec=$doit
++fi
+
+-# put in absolute paths if you don't have them in your path; or use env. vars.
++# Put in absolute file names if you don't have them in your path;
++# or use environment vars.
+
+-mvprog="${MVPROG-mv}"
+-cpprog="${CPPROG-cp}"
+-chmodprog="${CHMODPROG-chmod}"
+-chownprog="${CHOWNPROG-chown}"
+-chgrpprog="${CHGRPPROG-chgrp}"
+-stripprog="${STRIPPROG-strip}"
+-rmprog="${RMPROG-rm}"
+-mkdirprog="${MKDIRPROG-mkdir}"
++chgrpprog=${CHGRPPROG-chgrp}
++chmodprog=${CHMODPROG-chmod}
++chownprog=${CHOWNPROG-chown}
++cmpprog=${CMPPROG-cmp}
++cpprog=${CPPROG-cp}
++mkdirprog=${MKDIRPROG-mkdir}
++mvprog=${MVPROG-mv}
++rmprog=${RMPROG-rm}
++stripprog=${STRIPPROG-strip}
+
+-posix_glob=
+-posix_mkdir=
++posix_glob='?'
++initialize_posix_glob='
++ test "$posix_glob" != "?" || {
++ if (set -f) 2>/dev/null; then
++ posix_glob=
++ else
++ posix_glob=:
++ fi
++ }
++'
+
+-# Symbolic mode for testing mkdir with directories.
+-# It is the same as 755, but also tests that "u+" works.
+-test_mode=u=rwx,g=rx,o=rx,u+wx
++posix_mkdir=
+
+ # Desired mode of installed file.
+ mode=0755
+
+-# Desired mode of newly created intermediate directories.
+-# It is empty if not known yet.
+-intermediate_mode=
+-
++chgrpcmd=
+ chmodcmd=$chmodprog
+ chowncmd=
+-chgrpcmd=
+-stripcmd=
++mvcmd=$mvprog
+ rmcmd="$rmprog -f"
+-mvcmd="$mvprog"
++stripcmd=
++
+ src=
+ dst=
+ dir_arg=
+-dstarg=
++dst_arg=
++
++copy_on_change=false
+ no_target_directory=
+
+-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
++usage="\
++Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+@@ -94,81 +110,86 @@
+ In the 4th, create DIRECTORIES.
+
+ Options:
+--c (ignored)
+--d create directories instead of installing files.
+--g GROUP $chgrpprog installed files to GROUP.
+--m MODE $chmodprog installed files to MODE.
+--o USER $chownprog installed files to USER.
+--s $stripprog installed files.
+--t DIRECTORY install into DIRECTORY.
+--T report an error if DSTFILE is a directory.
+---help display this help and exit.
+---version display version info and exit.
++ --help display this help and exit.
++ --version display version info and exit.
++
++ -c (ignored)
++ -C install only if different (preserve the last data modification time)
++ -d create directories instead of installing files.
++ -g GROUP $chgrpprog installed files to GROUP.
++ -m MODE $chmodprog installed files to MODE.
++ -o USER $chownprog installed files to USER.
++ -s $stripprog installed files.
++ -t DIRECTORY install into DIRECTORY.
++ -T report an error if DSTFILE is a directory.
+
+ Environment variables override the default commands:
+- CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
++ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
++ RMPROG STRIPPROG
+ "
+
+-while test -n "$1"; do
++while test $# -ne 0; do
+ case $1 in
+- -c) shift
+- continue;;
++ -c) ;;
+
+- -d) dir_arg=true
+- shift
+- continue;;
++ -C) copy_on_change=true;;
++
++ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+- shift
+- shift
+- continue;;
++ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+- shift
+- shift
+- continue;;
++ case $mode in
++ *' '* | *' '* | *'
++'* | *'*'* | *'?'* | *'['*)
++ echo "$0: invalid mode: $mode" >&2
++ exit 1;;
++ esac
++ shift;;
+
+ -o) chowncmd="$chownprog $2"
+- shift
+- shift
+- continue;;
++ shift;;
+
+- -s) stripcmd=$stripprog
+- shift
+- continue;;
++ -s) stripcmd=$stripprog;;
+
+- -t) dstarg=$2
+- shift
+- shift
+- continue;;
++ -t) dst_arg=$2
++ shift;;
+
+- -T) no_target_directory=true
+- shift
+- continue;;
++ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+- *) # When -d is used, all remaining arguments are directories to create.
+- # When -t is used, the destination is already specified.
+- test -n "$dir_arg$dstarg" && break
+- # Otherwise, the last argument is the destination. Remove it from $@.
+- for arg
+- do
+- if test -n "$dstarg"; then
+- # $@ is not empty: it contains at least $arg.
+- set fnord "$@" "$dstarg"
+- shift # fnord
+- fi
+- shift # arg
+- dstarg=$arg
+- done
++ --) shift
+ break;;
++
++ -*) echo "$0: invalid option: $1" >&2
++ exit 1;;
++
++ *) break;;
+ esac
++ shift
+ done
+
+-if test -z "$1"; then
++if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
++ # When -d is used, all remaining arguments are directories to create.
++ # When -t is used, the destination is already specified.
++ # Otherwise, the last argument is the destination. Remove it from $@.
++ for arg
++ do
++ if test -n "$dst_arg"; then
++ # $@ is not empty: it contains at least $arg.
++ set fnord "$@" "$dst_arg"
++ shift # fnord
++ fi
++ shift # arg
++ dst_arg=$arg
++ done
++fi
++
++if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+@@ -178,13 +199,38 @@
+ exit 0
+ fi
+
+-test -n "$dir_arg" || trap '(exit $?); exit' 1 2 13 15
++if test -z "$dir_arg"; then
++ trap '(exit $?); exit' 1 2 13 15
++
++ # Set umask so as not to create temps with too-generous modes.
++ # However, 'strip' requires both read and write access to temps.
++ case $mode in
++ # Optimize common cases.
++ *644) cp_umask=133;;
++ *755) cp_umask=22;;
++
++ *[0-7])
++ if test -z "$stripcmd"; then
++ u_plus_rw=
++ else
++ u_plus_rw='% 200'
++ fi
++ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
++ *)
++ if test -z "$stripcmd"; then
++ u_plus_rw=
++ else
++ u_plus_rw=,u+rw
++ fi
++ cp_umask=$mode$u_plus_rw;;
++ esac
++fi
+
+ for src
+ do
+ # Protect names starting with `-'.
+ case $src in
+- -*) src=./$src ;;
++ -*) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+@@ -202,22 +248,22 @@
+ exit 1
+ fi
+
+- if test -z "$dstarg"; then
++ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+- dst=$dstarg
++ dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+- -*) dst=./$dst ;;
++ -*) dst=./$dst;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+- echo "$0: $dstarg: Is a directory" >&2
++ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+@@ -230,14 +276,25 @@
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+- X"$dst" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+@@ -250,83 +307,131 @@
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+- posix_mkdir=false
+- if $mkdirprog -m $test_mode -p -- / >/dev/null 2>&1; then
+- posix_mkdir=true
+- else
+- # Remove any dirs left behind by ancient mkdir implementations.
+- rmdir ./-m "$test_mode" ./-p ./-- 2>/dev/null
+- fi ;;
+- esac
++ # Create intermediate dirs using mode 755 as modified by the umask.
++ # This is like FreeBSD 'install' as of 1997-10-28.
++ umask=`umask`
++ case $stripcmd.$umask in
++ # Optimize common cases.
++ *[2367][2367]) mkdir_umask=$umask;;
++ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+- if
+- $posix_mkdir && {
++ *[0-7])
++ mkdir_umask=`expr $umask + 22 \
++ - $umask % 100 % 40 + $umask % 20 \
++ - $umask % 10 % 4 + $umask % 2
++ `;;
++ *) mkdir_umask=$umask,go-w;;
++ esac
+
+ # With -d, create the new directory with the user-specified mode.
+- # Otherwise, create it using the same intermediate mode that
+- # mkdir -p would use when creating intermediate directories.
+- # POSIX says that this mode is "$(umask -S),u+wx", so use that
+- # if umask -S works.
+-
++ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+- mkdir_mode=$mode
++ mkdir_mode=-m$mode
+ else
+- case $intermediate_mode in
+- '')
+- if umask_S=`(umask -S) 2>/dev/null`; then
+- intermediate_mode=$umask_S,u+wx
+- else
+- intermediate_mode=$test_mode
+- fi ;;
+- esac
+- mkdir_mode=$intermediate_mode
++ mkdir_mode=
+ fi
+
+- $mkdirprog -m "$mkdir_mode" -p -- "$dstdir"
+- }
++ posix_mkdir=false
++ case $umask in
++ *[123567][0-7][0-7])
++ # POSIX mkdir -p sets u+wx bits regardless of umask, which
++ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
++ ;;
++ *)
++ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
++ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
++
++ if (umask $mkdir_umask &&
++ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
++ then
++ if test -z "$dir_arg" || {
++ # Check for POSIX incompatibilities with -m.
++ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
++ # other-writeable bit of parent directory when it shouldn't.
++ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
++ ls_ld_tmpdir=`ls -ld "$tmpdir"`
++ case $ls_ld_tmpdir in
++ d????-?r-*) different_mode=700;;
++ d????-?--*) different_mode=755;;
++ *) false;;
++ esac &&
++ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
++ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
++ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
++ }
++ }
++ then posix_mkdir=:
++ fi
++ rmdir "$tmpdir/d" "$tmpdir"
++ else
++ # Remove any dirs left behind by ancient mkdir implementations.
++ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
++ fi
++ trap '' 0;;
++ esac;;
++ esac
++
++ if
++ $posix_mkdir && (
++ umask $mkdir_umask &&
++ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
++ )
+ then :
+ else
+
+- # mkdir does not conform to POSIX, or it failed possibly due to
+- # a race condition. Create the directory the slow way, step by
+- # step, checking for races as we go.
++ # The umask is ridiculous, or mkdir does not conform to POSIX,
++ # or it failed possibly due to a race condition. Create the
++ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+- /*) pathcomp=/ ;;
+- -*) pathcomp=./ ;;
+- *) pathcomp= ;;
++ /*) prefix='/';;
++ -*) prefix='./';;
++ *) prefix='';;
+ esac
+
+- case $posix_glob in
+- '')
+- if (set -f) 2>/dev/null; then
+- posix_glob=true
+- else
+- posix_glob=false
+- fi ;;
+- esac
++ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+- $posix_glob && set -f
++ $posix_glob set -f
+ set fnord $dstdir
+ shift
+- $posix_glob && set +f
++ $posix_glob set +f
+ IFS=$oIFS
+
++ prefixes=
++
+ for d
+ do
+- test "x$d" = x && continue
++ test -z "$d" && continue
+
+- pathcomp=$pathcomp$d
+- if test ! -d "$pathcomp"; then
+- $mkdirprog "$pathcomp"
+- # Don't fail if two instances are running concurrently.
+- test -d "$pathcomp" || exit 1
++ prefix=$prefix$d
++ if test -d "$prefix"; then
++ prefixes=
++ else
++ if $posix_mkdir; then
++ (umask=$mkdir_umask &&
++ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
++ # Don't fail if two instances are running concurrently.
++ test -d "$prefix" || exit 1
++ else
++ case $prefix in
++ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
++ *) qprefix=$prefix;;
++ esac
++ prefixes="$prefixes '$qprefix'"
++ fi
+ fi
+- pathcomp=$pathcomp/
++ prefix=$prefix/
+ done
+- obsolete_mkdir_used=true
++
++ if test -n "$prefixes"; then
++ # Don't fail if two instances are running concurrently.
++ (umask $mkdir_umask &&
++ eval "\$doit_exec \$mkdirprog $prefixes") ||
++ test -d "$dstdir" || exit 1
++ obsolete_mkdir_used=true
++ fi
+ fi
+ fi
+
+@@ -334,7 +439,7 @@
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+- test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dst"; } || exit 1
++ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+@@ -345,7 +450,7 @@
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+- $doit $cpprog "$src" "$dsttmp" &&
++ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+@@ -353,41 +458,54 @@
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+- && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+- && { test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dsttmp"; } &&
++ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
++ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
++ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
++ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+- # Now rename the file to the real destination.
+- { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
+- || {
+- # The rename failed, perhaps because mv can't rename something else
+- # to itself, or perhaps because mv is so ancient that it does not
+- # support -f.
++ # If -C, don't bother to copy if it wouldn't change the file.
++ if $copy_on_change &&
++ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
++ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+- # Now remove or move aside any old file at destination location.
+- # We try this two ways since rm can't unlink itself on some
+- # systems and the destination file might be busy for other
+- # reasons. In this case, the final cleanup might fail but the new
+- # file should still install successfully.
+- {
+- if test -f "$dst"; then
+- $doit $rmcmd -f "$dst" 2>/dev/null \
+- || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
+- && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
+- || {
+- echo "$0: cannot unlink or rename $dst" >&2
+- (exit 1); exit 1
+- }
+- else
+- :
+- fi
+- } &&
++ eval "$initialize_posix_glob" &&
++ $posix_glob set -f &&
++ set X $old && old=:$2:$4:$5:$6 &&
++ set X $new && new=:$2:$4:$5:$6 &&
++ $posix_glob set +f &&
+
+- # Now rename the file to the real destination.
+- $doit $mvcmd "$dsttmp" "$dst"
+- }
+- } || exit 1
++ test "$old" = "$new" &&
++ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
++ then
++ rm -f "$dsttmp"
++ else
++ # Rename the file to the real destination.
++ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
++
++ # The rename failed, perhaps because mv can't rename something else
++ # to itself, or perhaps because mv is so ancient that it does not
++ # support -f.
++ {
++ # Now remove or move aside any old file at destination location.
++ # We try this two ways since rm can't unlink itself on some
++ # systems and the destination file might be busy for other
++ # reasons. In this case, the final cleanup might fail but the new
++ # file should still install successfully.
++ {
++ test ! -f "$dst" ||
++ $doit $rmcmd -f "$dst" 2>/dev/null ||
++ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
++ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
++ } ||
++ { echo "$0: cannot unlink or rename $dst" >&2
++ (exit 1); exit 1
++ }
++ } &&
++
++ # Now rename the file to the real destination.
++ $doit $mvcmd "$dsttmp" "$dst"
++ }
++ fi || exit 1
+
+ trap '' 0
+ fi
diff --git a/sci-mathematics/pvs/files/4.2/pvs-4.2-emacs.patch b/sci-mathematics/pvs/files/4.2/pvs-4.2-emacs.patch
new file mode 100644
index 000000000..5078519f9
--- /dev/null
+++ b/sci-mathematics/pvs/files/4.2/pvs-4.2-emacs.patch
@@ -0,0 +1,455 @@
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/ilisp/completer.el pvs-sbcl-4.2/emacs/emacs-src/ilisp/completer.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/ilisp/completer.el 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/ilisp/completer.el 2008-10-04 11:09:39.000000000 -0600
+@@ -181,8 +181,8 @@
+ (not (memq +ilisp-emacs-version-id+
+ '(xemacs lucid-19 lucid-19-new)))
+ )
+- (setq quit-flag nil
+- unread-command-char 7))))
++ (setq quit-flag nil)
++ (push 7 unread-command-events))))
+
+ ;;;
+ (defun completer-deleter (regexp choices &optional keep)
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/ilisp/ilisp-acl.el pvs-sbcl-4.2/emacs/emacs-src/ilisp/ilisp-acl.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/ilisp/ilisp-acl.el 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/ilisp/ilisp-acl.el 2008-10-04 11:09:39.000000000 -0600
+@@ -22,10 +22,10 @@
+ (defun allegro-check-prompt (old new)
+ "Compare the break level printed at the beginning of the prompt."
+ (let* ((old-level (if (and old (eq 1 (string-match "[0-9]+" old)))
+- (string-to-int (substring old 1))
++ (string-to-number (substring old 1))
+ 0))
+ (new-level (if (eq 1 (string-match "[0-9]+" new))
+- (string-to-int (substring new 1))
++ (string-to-number (substring new 1))
+ 0)))
+ (<= new-level old-level)))
+
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/ilisp/ilisp-chs.el pvs-sbcl-4.2/emacs/emacs-src/ilisp/ilisp-chs.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/ilisp/ilisp-chs.el 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/ilisp/ilisp-chs.el 2008-10-04 11:09:39.000000000 -0600
+@@ -40,7 +40,7 @@
+ (string-match "Break" old)
+ (string-match "[0-9]+" old)))
+ (old-level (if was-in
+- (string-to-int
++ (string-to-number
+ (substring old (match-beginning 0)
+ (match-end 0)))
+ 0))
+@@ -48,7 +48,7 @@
+ (string-match "Break" new)
+ (string-match "[0-9]+" new)))
+ (new-level (if is-in
+- (string-to-int
++ (string-to-number
+ (substring new (match-beginning 0)
+ (match-end 0)))
+ 0)))
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/ilisp/ilisp-def.el pvs-sbcl-4.2/emacs/emacs-src/ilisp/ilisp-def.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/ilisp/ilisp-def.el 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/ilisp/ilisp-def.el 2008-10-04 11:09:39.000000000 -0600
+@@ -43,8 +43,8 @@
+ ;;;
+ (defmacro deflocal (variable default &optional documentation)
+ "Define an ilisp local variable."
+- (` (progn (lisp-deflocal '(, variable))
+- (defvar (, variable) (, default) (, documentation)))))
++ `(progn (lisp-deflocal ',variable)
++ (defvar ,variable ,default ,documentation)))
+
+ ;;;%%Simple customization
+
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/ilisp/ilisp-dia.el pvs-sbcl-4.2/emacs/emacs-src/ilisp/ilisp-dia.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/ilisp/ilisp-dia.el 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/ilisp/ilisp-dia.el 2008-10-04 11:09:39.000000000 -0600
+@@ -120,27 +120,26 @@
+ (hook (read (format "%s-hook" dialect)))
+ (program (read (format "%s-program" dialect)))
+ (dialects (format "%s" dialect)))
+- (`
+- (progn
+- (defvar (, hook) nil (, (format "*Inferior %s hook." full-name)))
+- (defvar (, program) nil
+- (, (format "*Inferior %s default program." full-name)))
+- (defun (, setup) (buffer)
+- (, (format "Set up for interacting with %s." full-name))
+- (, (read (format "(setup-%s buffer)" parent)))
+- (,@ body)
+- (setq ilisp-program (or (, program) ilisp-program)
+- ilisp-dialect (cons '(, dialect) ilisp-dialect))
+- (run-hooks '(, (read (format "%s-hook" dialect)))))
+- (defun (, dialect) (&optional buffer program)
+- (, (format "Create an inferior %s. With prefix, prompt for buffer and program."
+- full-name))
++ `(progn
++ (defvar ,hook nil ,(format "*Inferior %s hook." full-name))
++ (defvar ,program nil
++ ,(format "*Inferior %s default program." full-name))
++ (defun ,setup (buffer)
++ ,(format "Set up for interacting with %s." full-name)
++ ,(read (format "(setup-%s buffer)" parent))
++ ,@body
++ (setq ilisp-program (or ,program ilisp-program)
++ ilisp-dialect (cons ',dialect ilisp-dialect))
++ (run-hooks ',(read (format "%s-hook" dialect))))
++ (defun ,dialect (&optional buffer program)
++ ,(format "Create an inferior %s. With prefix, prompt for buffer and program."
++ full-name)
+ (interactive (list nil nil))
+- (ilisp-start-dialect (or buffer (, dialects))
+- program
+- '(, setup))
+- (setq (, program) ilisp-program))
+- (lisp-add-dialect (, dialects))))))
++ (ilisp-start-dialect (or buffer ,dialects)
++ program
++ ',setup)
++ (setq ,program ilisp-program))
++ (lisp-add-dialect ,dialects))))
+
+ ;;;%%ilisp
+ (defun setup-ilisp (buffer)
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/ilisp/ilisp-snd.el pvs-sbcl-4.2/emacs/emacs-src/ilisp/ilisp-snd.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/ilisp/ilisp-snd.el 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/ilisp/ilisp-snd.el 2008-10-04 11:09:39.000000000 -0600
+@@ -409,16 +409,16 @@
+ (comint-send
+ (ilisp-process) binary
+ t nil 'binary nil
+- (` (lambda (error wait message output last)
++ `(lambda (error wait message output last)
+ (if (or error
+ (not (string-match "\"[^\"]*\"" output)))
+ (progn
+ (lisp-display-output output)
+ (abort-commands-lisp "No binary"))
+- (setq (, var)
++ (setq ,var
+ (substring output
+ (1+ (match-beginning 0))
+- (1- (match-end 0))))))))))))
++ (1- (match-end 0)))))))))))
+
+ ;;;
+ (defun ilisp-done-init ()
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-cmds.el pvs-sbcl-4.2/emacs/emacs-src/pvs-cmds.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-cmds.el 2008-02-20 03:35:41.000000000 -0700
++++ pvs-sbcl-4.2/emacs/emacs-src/pvs-cmds.el 2008-10-04 11:09:39.000000000 -0600
+@@ -478,7 +478,7 @@
+ (goto-char (point-min))
+ (pop-to-buffer pbuf)
+ (pvs-mode))
+- (error "%s is not in the prelude."))))))
++ (error "%s is not in the prelude." fname))))))
+
+ (defun get-prelude-file-and-region (theoryname)
+ (let ((freg nil)
+@@ -768,7 +768,7 @@
+ "Name of root file (CR for this one): ")
+ (list (y-or-n-p "Include libraries? "))
+ (list (read-from-minibuffer
+- (format "Mail to: " pvs-last-email-address)
++ (format "Mail to: ")
+ pvs-last-email-address))
+ (list (read-string "CC: "))
+ (list (read-string "Subject: "))))
+@@ -787,9 +787,9 @@
+ (let* ((lkeymap (copy-keymap (current-local-map)))
+ (file-string (pvs-dump-files-string pvs-file libraries-p)))
+ (define-key lkeymap "\C-c\C-c"
+- (` (lambda ()
+- (interactive)
+- (pvs-mail-send-and-exit (, to) (, subject) (, file-string)))))
++ `(lambda ()
++ (interactive)
++ (pvs-mail-send-and-exit ,to ,subject ,file-string)))
+ (use-local-map lkeymap)))
+
+ (defun pvs-mail-send-and-exit (to subject file-string)
+@@ -1435,8 +1435,8 @@
+
+ (defun pvs-major-version-number ()
+ (if *pvs-version-information*
+- (string-to-int (car *pvs-version-information*))
+- (string-to-int (pvs-send-and-wait "*pvs-version*" nil nil))))
++ (string-to-number (car *pvs-version-information*))
++ (string-to-number (pvs-send-and-wait "*pvs-version*" nil nil))))
+
+ ;;; Replay
+
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-ilisp.el pvs-sbcl-4.2/emacs/emacs-src/pvs-ilisp.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-ilisp.el 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/pvs-ilisp.el 2008-10-04 11:09:39.000000000 -0600
+@@ -736,7 +736,7 @@
+
+ (defun resize-info-buffer ()
+ (unless (one-window-p t)
+- (let* ((maxsize (/ (screen-height) 2))
++ (let* ((maxsize (/ (frame-height) 2))
+ (cursize (1- (window-height)))
+ (lines (real-number-of-lines))
+ (size (min maxsize lines)))
+@@ -1108,11 +1108,6 @@
+ (show-entry))
+ (t (error "Unknown display type %s" type))))))
+
+-(defun pvs-locate (out)
+- (apply 'display-file-at-location
+- (parse-pvs-message out)))
+-
+-
+ (defun pvs-locate (output)
+ (let* ((message (parse-pvs-message output))
+ (dir (car message))
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-load.el pvs-sbcl-4.2/emacs/emacs-src/pvs-load.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-load.el 2008-07-07 02:03:45.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/pvs-load.el 2008-10-04 11:09:39.000000000 -0600
+@@ -238,7 +238,7 @@
+ (insert "\n\nPlease check our website periodically for news of later versions")
+ (insert "\nat http://pvs.csl.sri.com/")
+ (insert "\n\n" (cadr (cdddr vers)) "\n" (cadr (cddddr vers)))
+- (insert-string "
++ (insert "
+ ----------
+ Bug reports and suggestions for improvement should be sent to
+ pvs-bugs@csl.sri.com
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-prover.el pvs-sbcl-4.2/emacs/emacs-src/pvs-prover.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-prover.el 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/pvs-prover.el 2008-10-04 11:09:39.000000000 -0600
+@@ -1043,7 +1043,7 @@
+ (if (> indent 0)
+ (while (and (>= (point) start)
+ (progn (beginning-of-line)
+- (insert-string indstr)
++ (insert indstr)
+ (= (forward-line -1) 0))))))
+ (when crs (insert "\n\n"))))
+
+@@ -1084,7 +1084,7 @@
+ (pvs-bury-output)
+ (let ((file (current-pvs-file)))
+ (when (buffer-modified-p (get-file-buffer file))
+- (error "~a is not parsed" file))
++ (error "%s is not parsed" file))
+ (when (pvs-send-and-wait (format "(lisp (modify-declaration-at \"%s\" %d))"
+ file (current-line-number))
+ nil nil 'bool)
+@@ -1192,7 +1192,7 @@
+ nil)
+ ((and (stringp depth)
+ (string-match "^[ \t]*[0-9]+[ \t]*$" depth))
+- (string-to-int depth))
++ (string-to-number depth))
+ (t (error "set-rewrite-depth: %s is not a number or nil"
+ depth)))))
+ (pvs-send (format "(setq *rewrite-print-depth* %s)" dep))))
+@@ -1221,7 +1221,7 @@
+ nil)
+ ((and (stringp length)
+ (string-match "^[ \t]*[0-9]+[ \t]*$" length))
+- (string-to-int length))
++ (string-to-number length))
+ (t (error "set-rewrite-length: %s is not an integer or nil"
+ length)))))
+ (pvs-send (format "(setq *rewrite-print-length* %s)" len))))
+@@ -1242,7 +1242,7 @@
+ nil)
+ ((and (stringp depth)
+ (string-match "^[ \t]*[0-9]+[ \t]*$" depth))
+- (string-to-int depth))
++ (string-to-number depth))
+ (t (error "set-print-depth: %s is not an integer" depth)))))
+ (pvs-send (format "(setq *prover-print-depth* %s)"
+ (when (plusp dep) dep)))))
+@@ -1264,7 +1264,7 @@
+ nil)
+ ((and (stringp length)
+ (string-match "^[ \t]*[0-9]+[ \t]*$" length))
+- (string-to-int length))
++ (string-to-number length))
+ (t (error "set-print-length: %s is not an integer"
+ length)))))
+ (pvs-send (format "(setq *prover-print-length* %s)"
+@@ -1285,7 +1285,7 @@
+ nil)
+ ((and (stringp lines)
+ (string-match "^[ \t]*[0-9]+[ \t]*$" lines))
+- (string-to-int lines))
++ (string-to-number lines))
+ (t (error "set-print-lines: %s is not an integer" lines)))))
+ (pvs-send (format "(setq *prover-print-lines* %s)"
+ (when (plusp dep) dep)))))
+@@ -2153,7 +2153,7 @@
+ 1)
+ ((and (stringp num)
+ (string-match "^[ \t]*[0-9]+[ \t]*$" num))
+- (string-to-int num))
++ (string-to-number num))
+ (t (error "set-proof-backup-number: %s is not an integer"
+ num)))))
+ (pvs-send (format "(setq *number-of-proof-backups* %s)" n))))
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-prover-helps.el pvs-sbcl-4.2/emacs/emacs-src/pvs-prover-helps.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-prover-helps.el 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/pvs-prover-helps.el 2008-10-04 11:09:39.000000000 -0600
+@@ -244,7 +244,7 @@
+ (setq ept (point))
+ (setq def2arw (buffer-substring bpt ept)))
+ (setq def2arw (read-from-minibuffer "Auto-rewrite: ")))
+- (end-of-buffer)
++ (goto-char (point-max))
+ (insert "(auto-rewrite " ?\" def2arw ?\" ")")
+ (return-ilisp)))
+
+@@ -372,7 +372,7 @@
+ (setq fnum (buffer-substring bpt ept)))
+ (setq fnum (read-from-minibuffer
+ "in formula [CR for default]# " ""))))
+- (end-of-buffer)
++ (goto-char (point-max))
+ (insert "(expand " ?\" def2expand ?\" " " fnum ")")
+ (return-ilisp)))))
+
+@@ -701,7 +701,7 @@
+ (setq expr (buffer-substring start end))
+ (if (not (y-or-n-p (concat "Typepred for " expr)))
+ (error "typepred aborted.")))
+- (end-of-buffer)
++ (goto-char (point-max))
+ (insert "(typepred " ?\" expr ?\" ")")
+ (return-ilisp)))
+
+@@ -767,7 +767,7 @@
+ (if editprfwin
+ (set-window-point editprfwin (point))))
+ (setq cmd (buffer-substring beg end))))
+- (end-of-buffer)
++ (goto-char (point-max))
+ (insert cmd)
+ (return-ilisp)
+ (hilit-next-prover-command)
+@@ -820,10 +820,10 @@
+ (pvs-prover-goto-prev-step t))
+ (hilit-next-prover-command)
+ (switch-to-buffer pvsbuf)
+- (end-of-buffer)
++ (goto-char (point-max))
+ (switch-to-buffer editprfbuf)
+ (pop-to-buffer pvsbuf)
+- (end-of-buffer))))
++ (goto-char (point-max)))))
+
+
+ ;;; pvs-prover-goto-next-step puts the cursor at the beginning of the next
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-tcl.el pvs-sbcl-4.2/emacs/emacs-src/pvs-tcl.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-tcl.el 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/pvs-tcl.el 2008-10-04 11:09:39.000000000 -0600
+@@ -94,7 +94,7 @@
+ "PVS Error"))
+ (t (comint-display-output
+ (format "PVS was developed and tested for %s versions %s,\nbut you are using version %s.\nThis is unlikely to cause problems, as it is a later release."
+- program-name expected version program-name)
++ program-name expected version)
+ "PVS Warning"))))))
+
+ (defun pvs-parse-version-numbers (vnum)
+diff -dur pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-utils.el pvs-sbcl-4.2/emacs/emacs-src/pvs-utils.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-utils.el 2008-07-17 22:39:20.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/pvs-utils.el 2008-10-04 11:09:39.000000000 -0600
+@@ -238,7 +238,7 @@
+ nil nil 'list)))
+ (when fandp
+ (cond ((not (file-exists-p (car fandp)))
+- (error "Theory ~a was in ~a which no longer exists"
++ (error "Theory %s was in %s which no longer exists"
+ theoryname (car fandp)))
+ ((or (null (cdr fandp))
+ (buffer-modified-p (find-file-noselect (car fandp))))
+@@ -990,13 +990,6 @@
+ (error "Must specify a theory name")
+ (list theory))))))
+
+-(defun remove-duplicates (list)
+- (let ((nlist nil))
+- (dolist (e list)
+- (unless (member-equal e nlist)
+- (push e nlist)))
+- (nreverse nlist)))
+-
+ (defun current-theory ()
+ (let ((file (current-pvs-file t)))
+ (if file
+@@ -1235,13 +1228,6 @@
+ (or (car (get cmd 'abbreviations))
+ cmd))
+
+-(defun remove-if (pred list)
+- (let ((nlist nil))
+- (dolist (e list)
+- (unless (funcall pred e)
+- (push e nlist)))
+- (nreverse nlist)))
+-
+ (defun add-final-newline ()
+ (save-excursion
+ (unless (equal (char-after (1- (point-max))) ?\n)
+@@ -1355,9 +1341,14 @@
+ (setq pvs-reserved-words-regexp
+ "\\bassuming\\b\\|\\baxiom\\b\\|\\baccept\\b\\|\\bchanges\\b\\|\\ball\\b\\|\\band\\b\\|\\barray\\b\\|\\bbegin\\b\\|\\bby\\b\\|\\bcase\\b\\|\\bdeclare\\b\\|\\bdefinition\\b\\|\\belse\\b\\|\\belsif\\b\\|\\bendif\\b\\|\\bendassuming\\b\\|\\bendcase\\b\\|\\bend\\b\\|\\bexists\\b\\|\\bexporting\\b\\|\\bexit\\b\\|\\bforall\\b\\|\\bfunction\\b\\|\\bformula\\b\\|\\bfrom\\b\\|\\bif\\b\\|\\biff\\b\\|\\bimplies\\b\\|\\bimporting\\b\\|\\bin\\b\\|\\bis\\b\\|\\blambda\\b\\|\\blemma\\b\\|\\bloop\\b\\|\\bmapping\\b\\|\\bmeasure\\b\\|\\bmodule\\b\\|\\bnot\\b\\|\\bnothing\\b\\|\\bof\\b\\|\\bonto\\b\\|\\bobligation\\b\\|\\bopspec\\b\\|\\bor\\b\\|\\bproof\\b\\|\\bprove\\b\\|\\brecursive\\b\\|\\bresult\\b\\|\\btheorem\\b\\|\\btheory\\b\\|\\busing\\b\\|\\bvar\\b\\|\\bvariable\\b\\|\\brecord\\b\\|\\bverify\\b\\|\\bwhere\\b\\|\\bthen\\b\\|\\btype\\b\\|\\bwhen\\b\\|\\bwhile\\b\\|\\bwith\\b\\|\\blet\\b\\|\\bsetvariable\\b\\|\\[#\\|#\\]\\|[(]#\\|#[)]")
+
++(defmacro pvs-find-face (name)
++ (if (featurep 'xemacs)
++ `(find-face ,name)
++ `(facep ,name)))
++
+ (defun highlight-pvs ()
+ (interactive)
+- (unless (internal-find-face 'pvs-keyword)
++ (unless (pvs-find-face 'pvs-keyword)
+ (make-face 'pvs-keyword)
+ (set-face-foreground 'pvs-keyword "Blue")
+ (set-face-font 'pvs-keyword "*courier-bold-r-normal--12*"))
+@@ -1575,7 +1566,7 @@
+ (defvar pvs-unexpected-output nil)
+
+ (defmacro pvs-validate (file directory &rest body)
+- (` (let* ((logfile (concat default-directory (, file))))
++ `(let* ((logfile (concat default-directory ,file)))
+ (pvs-backup-logfile logfile)
+ (let ((logbuf (find-file-noselect logfile t)))
+ (unwind-protect
+@@ -1592,9 +1583,9 @@
+ (default-directory default-directory))
+ (pvs-message (pvs-version-string))
+ (let ((pvs-disable-messages nil))
+- (change-context (, directory)))
++ (change-context ,directory))
+ (condition-case err
+- (progn (,@ body))
++ (progn ,@body)
+ (error (pvs-message "ERROR: Emacs: %s %s"
+ (car err) (cdr err)))))
+ (pvs-wait-for-it)
+@@ -1659,7 +1650,7 @@
+ (pvs-message "NO BASELINE - using this run to create baseline.log")
+ (copy-file (buffer-file-name) "baseline.log"))))
+ (fset 'pvs-handler 'pvs-handler-orig)
+- (fset 'ask-user-about-lock 'ask-user-about-lock-orig))))))
++ (fset 'ask-user-about-lock 'ask-user-about-lock-orig)))))
+
+
+ ;;; This function provides the most basic form of test, removing bin
+diff -dur pvs-sbcl-4.2.ORIG/emacs/go-pvs.el pvs-sbcl-4.2/emacs/go-pvs.el
+--- pvs-sbcl-4.2.ORIG/emacs/go-pvs.el 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/emacs/go-pvs.el 2008-10-04 11:10:16.000000000 -0600
+@@ -24,6 +24,7 @@
+ ;; --------------------------------------------------------------------
+
+ (setq debug-on-error t)
++(setq inhibit-startup-screen t)
+
+ (defconst pvs-emacs-system
+ (cond ((or (string-match "XEmacs 21" (emacs-version))
diff --git a/sci-mathematics/pvs/files/4.2/pvs-4.2-emacs23.patch b/sci-mathematics/pvs/files/4.2/pvs-4.2-emacs23.patch
new file mode 100644
index 000000000..b8a7c3d4b
--- /dev/null
+++ b/sci-mathematics/pvs/files/4.2/pvs-4.2-emacs23.patch
@@ -0,0 +1,21 @@
+diff -Naur pvs-4.2-orig/Makefile.in pvs-4.2-ptch/Makefile.in
+--- pvs-4.2-orig/Makefile.in 2008-07-20 08:58:09.000000000 +0000
++++ pvs-4.2-ptch/Makefile.in 2009-09-08 18:38:08.000000000 +0000
+@@ -131,6 +131,9 @@
+ : '[^X]*\(X*Emacs [0-9][0-9]\)')
+
+
++ifeq ($(emacsversion),Emacs 23)
++EMACSSUBDIR = emacs23
++else
+ ifeq ($(emacsversion),Emacs 22)
+ EMACSSUBDIR = emacs22
+ else
+@@ -156,6 +159,7 @@
+ endif
+ endif
+ endif
++endif
+
+ endif # end of buildcmds check
+
diff --git a/sci-mathematics/pvs/files/4.2/pvs-4.2-latex.patch b/sci-mathematics/pvs/files/4.2/pvs-4.2-latex.patch
new file mode 100644
index 000000000..202cf0a66
--- /dev/null
+++ b/sci-mathematics/pvs/files/4.2/pvs-4.2-latex.patch
@@ -0,0 +1,48 @@
+diff -dur pvs-sbcl-4.2.ORIG/doc/language/language.tex pvs-sbcl-4.2/doc/language/language.tex
+--- pvs-sbcl-4.2.ORIG/doc/language/language.tex 2007-07-02 14:07:42.000000000 -0600
++++ pvs-sbcl-4.2/doc/language/language.tex 2009-01-23 16:01:41.000000000 -0700
+@@ -6,7 +6,7 @@
+ \usepackage{makeidx}
+ \usepackage{relsize}
+ \usepackage{boxedminipage}
+-\usepackage{fancyheadings}
++\usepackage{fancyhdr}
+ %\usepackage{../../pvs}
+ \usepackage{url}
+ \usepackage{../makebnf}
+diff -dur pvs-sbcl-4.2.ORIG/doc/prover/prover.tex pvs-sbcl-4.2/doc/prover/prover.tex
+--- pvs-sbcl-4.2.ORIG/doc/prover/prover.tex 2007-07-02 14:07:42.000000000 -0600
++++ pvs-sbcl-4.2/doc/prover/prover.tex 2009-01-23 16:01:41.000000000 -0700
+@@ -1,7 +1,7 @@
+ % Document Type: LaTeX
+ % Master File: prover.tex
+ \documentclass[12pt,twoside]{book}
+-\usepackage{relsize,alltt,makeidx,url,boxedminipage,fancyheadings,tabularx}
++\usepackage{relsize,alltt,makeidx,url,boxedminipage,fancyhdr,tabularx}
+ %\usepackage{../../pvs}
+ \usepackage{../makebnf}
+ \usepackage[chapter]{tocbibind}
+diff -dur pvs-sbcl-4.2.ORIG/doc/user-guide/Makefile.in pvs-sbcl-4.2/doc/user-guide/Makefile.in
+--- pvs-sbcl-4.2.ORIG/doc/user-guide/Makefile.in 2007-07-02 14:07:42.000000000 -0600
++++ pvs-sbcl-4.2/doc/user-guide/Makefile.in 2009-01-23 16:01:50.000000000 -0700
+@@ -24,7 +24,7 @@
+ pdflatex $<
+
+ sum-nosub.tex sum-sub.tex sum-tccs.tex : sum.pvs sum.el
+- @PVSPATH@/pvs -batch -q -l sum.el -f kill-process
++ @PVSPATH@/pvs -batch -q -l sum.el
+
+ .PHONY: clean
+ clean :
+diff -dur pvs-sbcl-4.2.ORIG/doc/user-guide/user-guide.tex pvs-sbcl-4.2/doc/user-guide/user-guide.tex
+--- pvs-sbcl-4.2.ORIG/doc/user-guide/user-guide.tex 2007-07-02 14:07:42.000000000 -0600
++++ pvs-sbcl-4.2/doc/user-guide/user-guide.tex 2009-01-23 16:01:41.000000000 -0700
+@@ -7,7 +7,7 @@
+ %\usepackage{showidx} % use for index debugging
+ \usepackage{relsize}
+ \usepackage{boxedminipage}
+-\usepackage{fancyheadings}
++\usepackage{fancyhdr}
+ \usepackage{graphicx}
+ \usepackage{../../pvs}
+ \usepackage{url}
diff --git a/sci-mathematics/pvs/files/4.2/pvs-4.2-mona.patch b/sci-mathematics/pvs/files/4.2/pvs-4.2-mona.patch
new file mode 100644
index 000000000..a382ecf4d
--- /dev/null
+++ b/sci-mathematics/pvs/files/4.2/pvs-4.2-mona.patch
@@ -0,0 +1,29 @@
+diff -dur pvs-sbcl-4.2.ORIG/src/WS1S/ix86-Linux/Makefile pvs-sbcl-4.2/src/WS1S/ix86-Linux/Makefile
+--- pvs-sbcl-4.2.ORIG/src/WS1S/ix86-Linux/Makefile 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/WS1S/ix86-Linux/Makefile 2008-08-08 16:03:26.000000000 -0600
+@@ -14,15 +14,7 @@
+ SHELL = /bin/sh
+ VPATH = ..:../mona/BDD:../mona/DFA:../mona/Mem
+
+-obj = analyze.o prefix.o product.o \
+- quotient.o basic.o external.o \
+- makebasic.o minimize.o printdfa.o \
+- project.o dfa.o \
+- bdd.o bdd_double.o bdd_external.o \
+- bdd_manager.o hash.o bdd_dump.o \
+- bdd_trace.o bdd_cache.o \
+- dlmalloc.o mem.o \
+- ws1s_extended_interface.o
++obj = ws1s_table.o ws1s_extended_interface.o -lmonadfa
+
+ .SUFFIXES:
+ .SUFFIXES: .c .o
+@@ -34,7 +26,7 @@
+ $(CC) $(XCFLAGS) ${CFLAGS} -c $< -o $@
+
+ ws1s.so : ${obj}
+- $(LD) ../ws1s-ld-table $(LDFLAGS) -o ws1s.so ${obj}
++ $(CC) -shared $(CFLAGS) -o ws1s.so ${obj}
+
+ bdd.o: bdd.c bdd.h bdd_internal.h
+ bdd_double.o: bdd_double.c bdd.h bdd_internal.h
diff --git a/sci-mathematics/pvs/files/4.2/pvs-4.2-sbcl-pic.patch b/sci-mathematics/pvs/files/4.2/pvs-4.2-sbcl-pic.patch
new file mode 100644
index 000000000..6164cbf34
--- /dev/null
+++ b/sci-mathematics/pvs/files/4.2/pvs-4.2-sbcl-pic.patch
@@ -0,0 +1,48 @@
+diff -Naur pvs-4.2-orig/BDD/ix86_64-Linux/Makefile pvs-4.2-ptch/BDD/ix86_64-Linux/Makefile
+--- pvs-4.2-orig/BDD/ix86_64-Linux/Makefile 2009-07-30 06:55:58.000000000 +0000
++++ pvs-4.2-ptch/BDD/ix86_64-Linux/Makefile 2009-07-30 06:58:50.000000000 +0000
+@@ -5,7 +5,7 @@
+ LD = gcc
+ LDFLAGS = -shared -L./
+ CC = gcc
+-CFLAGS = -D_POSIX_SOURCE -DSYSV $(INCLUDES) -DLINUX -DLINUX_REDHAT5 -DSIGNALS_LINUX
++CFLAGS = -D_POSIX_SOURCE -DSYSV $(INCLUDES) -DLINUX -DLINUX_REDHAT5 -DSIGNALS_LINUX -fPIC
+ XCFLAGS = -O
+ SHELL = /bin/sh
+ VPATH = ..:../bdd/utils:../bdd/src:../mu/src
+@@ -17,7 +17,7 @@
+
+ .SUFFIXES:
+ .SUFFIXES: .c .o
+-.c.o : ; $(CC) $(XCFLAGS) ${CFLAGS} -c $< -o $@
++.c.o : ; $(CC) $(XCFLAGS) $(CFLAGS) -c $< -o $@
+
+ all : mu.so
+
+diff -Naur pvs-4.2-orig/src/WS1S/ix86_64-Linux/Makefile pvs-4.2-ptch/src/WS1S/ix86_64-Linux/Makefile
+--- pvs-4.2-orig/src/WS1S/ix86_64-Linux/Makefile 2009-07-30 06:55:58.000000000 +0000
++++ pvs-4.2-ptch/src/WS1S/ix86_64-Linux/Makefile 2009-07-30 06:57:19.000000000 +0000
+@@ -9,7 +9,7 @@
+ LD = gcc
+ LDFLAGS = -shared -L./
+ CC = gcc
+-CFLAGS += -D_POSIX_SOURCE -DSYSV $(INCLUDES)
++CFLAGS += -D_POSIX_SOURCE -DSYSV $(INCLUDES) -fPIC
+ XCFLAGS = -O
+ SHELL = /bin/sh
+ VPATH = ..:../mona/BDD:../mona/DFA:../mona/Mem
+@@ -26,12 +26,12 @@
+
+ .SUFFIXES:
+ .SUFFIXES: .c .o
+-.c.o : ; $(CC) $(XCFLAGS) ${CFLAGS} -c $< -o $@
++.c.o : ; $(CC) $(XCFLAGS) $(CFLAGS) -c $< -o $@
+
+ all : ws1s.so
+
+ ws1s_extended_interface.o : ../ws1s_extended_interface.c
+- $(CC) $(XCFLAGS) ${CFLAGS} -c $< -o $@
++ $(CC) $(XCFLAGS) $(CFLAGS) -c $< -o $@
+
+ ws1s.so : ${obj}
+ $(LD) ../ws1s-ld-table $(LDFLAGS) -o ws1s.so ${obj}
diff --git a/sci-mathematics/pvs/files/4.2/pvs-4.2-sbcl.patch b/sci-mathematics/pvs/files/4.2/pvs-4.2-sbcl.patch
new file mode 100644
index 000000000..7c7d723c0
--- /dev/null
+++ b/sci-mathematics/pvs/files/4.2/pvs-4.2-sbcl.patch
@@ -0,0 +1,3335 @@
+diff -durN pvs-sbcl-4.2.ORIG/BDD/bdd-allegro.lisp pvs-sbcl-4.2/BDD/bdd-allegro.lisp
+--- pvs-sbcl-4.2.ORIG/BDD/bdd-allegro.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd-allegro.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -39,6 +39,13 @@
+
+ ;;; #define NULL_LIST ((LIST) 0)
+
++;;; int null_list_p (LIST x)
++(ff:def-foreign-call (null_list_p "bdd___null_list_p")
++ ((x :unsigned-int integer))
++ #+(version>= 6) :strings-convert #+(version>= 6) nil
++ :arg-checking nil
++ :call-direct t
++ :returning :unsigned-int)
+ ;;; void *elem_contents (LIST_ELEM_PTR x)
+ (ff:def-foreign-call (elem_contents "bdd___elem_contents")
+ ((x :unsigned-int integer))
+diff -durN pvs-sbcl-4.2.ORIG/BDD/bdd-cmu.lisp pvs-sbcl-4.2/BDD/bdd-cmu.lisp
+--- pvs-sbcl-4.2.ORIG/BDD/bdd-cmu.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd-cmu.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -39,6 +39,11 @@
+
+ ;;; #define NULL_LIST ((LIST) 0)
+
++;;; int null_list_p (LIST x)
++(alien:def-alien-routine ("bdd___null_list_p" null_list_p)
++ unsigned-int
++ (x unsigned-int))
++
+ ;;; void *elem_contents (LIST_ELEM_PTR x)
+ (alien:def-alien-routine ("bdd___elem_contents" elem_contents)
+ unsigned-int
+diff -durN pvs-sbcl-4.2.ORIG/BDD/bdd-ld-table pvs-sbcl-4.2/BDD/bdd-ld-table
+--- pvs-sbcl-4.2.ORIG/BDD/bdd-ld-table 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd-ld-table 2008-11-04 20:52:16.000000000 -0700
+@@ -4,6 +4,7 @@
+ bdd___bdd_poslit_p = bdd_poslit_p ;
+ bdd___bdd_neglit_p = bdd_neglit_p ;
+ bdd___bdd_equal_p = bdd_equal_p ;
++bdd___null_list_p = null_list_p ;
+ bdd___elem_contents = elem_contents ;
+ bdd___list_first = list_first ;
+ bdd___list_last = list_last ;
+diff -durN pvs-sbcl-4.2.ORIG/BDD/bdd.lisp pvs-sbcl-4.2/BDD/bdd.lisp
+--- pvs-sbcl-4.2.ORIG/BDD/bdd.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -19,6 +19,7 @@
+
+ (in-package :pvs)
+
++(defmacro null-list? (list) `(= (null_list_p ,list) 1))
+ (defmacro bdd-void? (bdd) `(= (bdd_void_p ,bdd) 1))
+ (defmacro bdd-1? (bdd) `(= (bdd_1_p ,bdd) 1))
+ (defmacro bdd-0? (bdd) `(= (bdd_0_p ,bdd) 1))
+@@ -369,12 +370,12 @@
+ (pushnew (cons op name) (cdr entry) :test #'eql :key #'cdr))))))
+
+ (defun translate-from-bdd-list (bddlist)
+- (let ((bdds (unless (zerop bddlist)
++ (let ((bdds (unless (null-list? bddlist)
+ (translate-from-bdd-list* (list_first bddlist)))))
+ (mapcar #'translate-bdd-cube bdds)))
+
+ (defun translate-from-bdd-list* (bddlist &optional result)
+- (if (zerop bddlist)
++ (if (null-list? bddlist)
+ (nreverse result)
+ (translate-from-bdd-list*
+ (list_next bddlist)
+diff -durN pvs-sbcl-4.2.ORIG/BDD/bdd-sbcl.lisp pvs-sbcl-4.2/BDD/bdd-sbcl.lisp
+--- pvs-sbcl-4.2.ORIG/BDD/bdd-sbcl.lisp 1969-12-31 17:00:00.000000000 -0700
++++ pvs-sbcl-4.2/BDD/bdd-sbcl.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -0,0 +1,555 @@
++;; --------------------------------------------------------------------
++;; PVS
++;; Copyright (C) 2006, SRI International. All Rights Reserved.
++
++;; This program is free software; you can redistribute it and/or
++;; modify it under the terms of the GNU General Public License
++;; as published by the Free Software Foundation; either version 2
++;; of the License, or (at your option) any later version.
++
++;; This program is distributed in the hope that it will be useful,
++;; but WITHOUT ANY WARRANTY; without even the implied warranty of
++;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++;; GNU General Public License for more details.
++
++;; You should have received a copy of the GNU General Public License
++;; along with this program; if not, write to the Free Software
++;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++;; --------------------------------------------------------------------
++
++(in-package :pvs)
++
++;; SO - We load this from pvs-init (in src/pvs.lisp), as it requires mu.so,
++;; but if mu.so is loaded at save-lisp time, it doesn't work (at least I
++;; can't get it to).
++
++;;; List accessors
++;;; Lists in the BDD package involve two structures.
++
++;;; A LIST is a structure with slots for a first element pointer, a last
++;;; element pointer, the size, and user-defined info.
++
++;;; A LIST_ELEM is a structure with slots for the contents and the next
++;;; element.
++
++;;; #define NULL_LIST ((LIST) 0)
++
++;;; int null_list_p (LIST x)
++(sb-alien:define-alien-routine ("bdd___null_list_p" null_list_p)
++ (integer 32)
++ (x (* t)))
++
++;;; void *elem_contents (LIST_ELEM_PTR x)
++(sb-alien:define-alien-routine ("bdd___elem_contents" elem_contents)
++ (* t)
++ (x (* t)))
++
++;;; LIST_ELEM_PTR list_first (LIST x)
++(sb-alien:define-alien-routine ("bdd___list_first" list_first)
++ (* t)
++ (x (* t)))
++
++;;; LIST_ELEM_PTR list_last (LIST x)
++(sb-alien:define-alien-routine ("bdd___list_last" list_last)
++ (* t)
++ (x (* t)))
++
++;;; int list_info (LIST x)
++(sb-alien:define-alien-routine ("bdd___list_info" list_info)
++ (integer 32)
++ (x (* t)))
++
++;;; LIST_ELEM_PTR list_next (LIST_ELEM_PTR x)
++(sb-alien:define-alien-routine ("bdd___list_next" list_next)
++ (* t)
++ (x (* t)))
++
++;;; This pretty much follows the bdd.doc sections.
++
++;;; User settable program parameters
++;;; --------------------------------
++;;; int bdd_do_gc; /* default 1 */
++
++(sb-alien:define-alien-variable "bdd_do_gc" (integer 32))
++
++;;; set_bdd_do_gc (int flag)
++(declaim (inline set_bdd_do_gc))
++(defun set_bdd_do_gc (flag)
++ (setf bdd-do-gc flag))
++
++;;; int bdd_do_dynamic_ordering;/* default 1 */
++(sb-alien:define-alien-variable "bdd_do_dynamic_ordering" (integer 32))
++
++;;; set_bdd_do_dynamic_ordering (int flag)
++(declaim (inline set_bdd_do_dynamic_ordering))
++(defun set_bdd_do_dynamic_ordering (flag)
++ (setf bdd-do-dynamic-ordering flag))
++
++;;; int bdd_verbose; /* default 0 */
++(sb-alien:define-alien-variable "bdd_verbose" (integer 32))
++
++;;; set_bdd_verbose (int flag)
++(declaim (inline set_bdd_verbose))
++(defun set_bdd_verbose (flag)
++ (setf bdd-verbose flag))
++
++;;; int bdd_use_neg_edges; /* default 1*/
++(sb-alien:define-alien-variable "bdd_use_neg_edges" (integer 32))
++
++;;; set_bdd_use_neg_edges (int flag)
++(declaim (inline set_bdd_use_neg_edges))
++(defun set_bdd_use_neg_edges (flag)
++ (setf bdd-use-neg-edges flag))
++
++;;; int bdd_use_inv_edges; /* default 1; 0 when bdd_do_dynamic_ordering = 1 */
++(sb-alien:define-alien-variable "bdd_use_inv_edges" (integer 32))
++
++;;; set_bdd_use_inv_edges (int flag)
++(declaim (inline set_bdd_use_inv_edges))
++(defun set_bdd_use_inv_edges (flag)
++ (setf bdd-use-inv-edges flag))
++
++;;; int bdd_sizeof_user_data; /* default 0 */
++;;; int BDD_COMPUTED_TABLE_SIZE;/* default DEFAULT_BDD_COMPUTED_TABLE_SIZE */
++;;; int BDD_HASHTAB_SIZE; /* default DEFAULT_BDD_HASHTAB_SIZE */
++;;; int BDD_NR_RANKS; /* default DEFAULT_BDD_NR_RANKS */
++;;; int BDD_LOAD_FACTOR; /* default DEFAULT_BDD_LOAD_FACTOR */
++
++
++;;; C preprocessor macros:
++;;; ----------------------
++
++;;; Access to fields of BDD struct:
++
++;;; BDD_VARID (F)
++;;; bdd_varid (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_varid" bdd_varid)
++ (sb-alien:unsigned 32)
++ (f (* t)))
++
++;;; BDD_THEN (F)
++;;; BDD_ELSE (F)
++;;; BDD_REFCOUNT (F)
++;;; BDD_FLAG (F)
++;;; BDD_MARK (F)
++
++
++;;; Test on terminal nodes:
++;;; -----------------------
++
++;;; BDD_VOID_P (f)
++;;; int bdd_void_p (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_void_p" bdd_void_p)
++ (integer 32)
++ (f (* t)))
++
++;;; BDD_1_P (f)
++;;; bdd_1_p (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_1_p" bdd_1_p)
++ (integer 32)
++ (f (* t)))
++
++;;; BDD_0_P (f)
++;;; bdd_0_p (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_0_p" bdd_0_p)
++ (integer 32)
++ (f (* t)))
++
++;;; BDD_X_P (f)
++;;; bdd_x_p (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_x_p" bdd_x_p)
++ (integer 32)
++ (f (* t)))
++
++;;; BDD_CONST_P (f)
++;;; int bdd_const_p (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_const_p" bdd_const_p)
++ (integer 32)
++ (f (* t)))
++
++;;; BDD_TERM_P (f)
++;;; bdd_term_p (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_term_p" bdd_term_p)
++ (integer 32)
++ (f (* t)))
++
++;;; BDD_LIT_P (f)
++;;; bdd_lit_p (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_lit_p" bdd_lit_p)
++ (integer 32)
++ (f (* t)))
++
++;;; BDD_POSLIT_P (f)
++;;; int bdd_poslit_p (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_poslit_p" bdd_poslit_p)
++ (integer 32)
++ (f (* t)))
++
++;;; BDD_NEGLIT_P (f)
++;;; int bdd_neglit_p (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_neglit_p" bdd_neglit_p)
++ (integer 32)
++ (f (* t)))
++
++;;; BDD_COFACTOR_POS (f)
++;;; BDDPTR bdd_cofactor_pos_ (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_cofactor_pos_" bdd_cofactor_pos_)
++ (* t)
++ (f (* t)))
++
++;;; BDD_COFACTOR_NEG (f)
++;;; BDDPTR bdd_cofactor_neg_ (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_cofactor_neg_" bdd_cofactor_neg_)
++ (* t)
++ (f (* t)))
++
++;;; void bdd_reset_marks (BDDPTR f)
++;;; void bdd_traverse_pre (register BDDPTR v, void (*pre_action)(BDDPTR))
++;;; void bdd_traverse_post (register BDDPTR v, void (*post_action)(BDDPTR))
++
++;;; int bdd_size (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_size" bdd_size)
++ (integer 32)
++ (f (* t)))
++
++;;; int bdd_size_vec (BDDPTR *f_vec, int size)
++;;; int bdd_size_ceil (BDDPTR f, int ceiling)
++
++;;; void bdd_init (void)
++(sb-alien:define-alien-routine ("bdd___bdd_init" bdd_init)
++ sb-alien:void)
++
++;;; void bdd_free (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_free" bdd_free)
++ sb-alien:void
++ (f (* t)))
++
++;;; int bdd_gc (void)
++(sb-alien:define-alien-routine ("bdd___bdd_gc" bdd_gc)
++ (integer 32))
++
++;;; BDDPTR bdd_ite (BDDPTR F, BDDPTR G, BDDPTR H)
++(sb-alien:define-alien-routine ("bdd___bdd_ite" bdd_ite)
++ (* t)
++ (f (* t))
++ (g (* t))
++ (h (* t)))
++
++;;; BDDPTR bdd_ite_const (BDDPTR F, BDDPTR G, BDDPTR H)
++(sb-alien:define-alien-routine ("bdd___bdd_ite_const" bdd_ite_const)
++ (* t)
++ (f (* t))
++ (g (* t))
++ (h (* t)))
++
++;;; void bdd_cofactors (BDDPTR f, BDDPTR *vp, BDDPTR *Tp, BDDPTR *Ep)
++;;; BDDPTR bdd_invert_input_top (BDDPTR f)
++(sb-alien:define-alien-routine
++ ("bdd___bdd_invert_input_top" bdd_invert_input_top)
++ (* t)
++ (f (* t)))
++
++;;; BDDPTR bdd_create_var (int v)
++(sb-alien:define-alien-routine ("bdd___bdd_create_var" bdd_create_var)
++ (* t)
++ (v (integer 32)))
++
++;;; BDDPTR bdd_create_var_first (void)
++(sb-alien:define-alien-routine
++ ("bdd___bdd_create_var_first" bdd_create_var_first)
++ (* t))
++
++;;; BDDPTR bdd_create_var_before (BDDPTR v)
++(sb-alien:define-alien-routine
++ ("bdd___bdd_create_var_before" bdd_create_var_before)
++ (* t)
++ (v (* t)))
++
++;;; BDDPTR bdd_create_var_after (BDDPTR v)
++(sb-alien:define-alien-routine
++ ("bdd___bdd_create_var_after" bdd_create_var_after)
++ (* t)
++ (v (* t)))
++
++;;; BDDPTR bdd_create_var_last (void)
++(sb-alien:define-alien-routine
++ ("bdd___bdd_create_var_last" bdd_create_var_last)
++ (* t))
++
++;;; void bdd_print (FILE *fp, BDDPTR f, char *s)
++(sb-alien:define-alien-routine ("bdd___bdd_print" bdd_print)
++ sb-alien:void
++ (fp (* t))
++ (f (* t))
++ (s sb-alien:c-string))
++
++;;; void bdd_print_stats (FILE *fp)
++;;; void bdd_quit (void)
++(sb-alien:define-alien-routine ("bdd___bdd_quit" bdd_quit)
++ sb-alien:void)
++
++;;; int bdd_memsize (void)
++;;; int bdd_memsize_limit (void)
++;;; void bdd_set_memsize_limit_and_handler (int limit, void (*handler) (void))
++;;; int bdd_nodes_alive (void)
++(sb-alien:define-alien-routine ("bdd___bdd_nodes_alive" bdd_nodes_alive)
++ (integer 32))
++
++;;; int bdd_nodes_allocated (void)
++(sb-alien:define-alien-routine
++ ("bdd___bdd_nodes_allocated" bdd_nodes_allocated)
++ (integer 32))
++
++;;; int bdd_nr_occurs_var (int id)
++;;; int bdd_compl_p (BDDPTR f, BDDPTR g)
++;;; int bdd_equal_p (BDDPTR F, BDDPTR G)
++(sb-alien:define-alien-routine ("bdd___bdd_equal_p" bdd_equal_p)
++ (integer 32)
++ (f (* t))
++ (g (* t)))
++
++;;; int bdd_implies_taut (BDDPTR F, BDDPTR G)
++;;; BDDPTR bdd_not (BDDPTR F)
++(sb-alien:define-alien-routine ("bdd___bdd_not" bdd_not)
++ (* t)
++ (f (* t)))
++
++;;; BDDPTR bdd_and (BDDPTR F, BDDPTR G)
++(sb-alien:define-alien-routine ("bdd___bdd_and" bdd_and)
++ (* t)
++ (f (* t))
++ (g (* t)))
++
++;;; BDDPTR bdd_greater (BDDPTR F, BDDPTR G)
++(sb-alien:define-alien-routine ("bdd___bdd_greater" bdd_greater)
++ (* t)
++ (f (* t))
++ (g (* t)))
++
++;;; BDDPTR bdd_less (BDDPTR F, BDDPTR G)
++(sb-alien:define-alien-routine ("bdd___bdd_less" bdd_less)
++ (* t)
++ (f (* t))
++ (g (* t)))
++
++;;; BDDPTR bdd_xor (BDDPTR F, BDDPTR G)
++(sb-alien:define-alien-routine ("bdd___bdd_xor" bdd_xor)
++ (* t)
++ (f (* t))
++ (g (* t)))
++
++;;; BDDPTR bdd_or (BDDPTR F, BDDPTR G)
++(sb-alien:define-alien-routine ("bdd___bdd_or" bdd_or)
++ (* t)
++ (f (* t))
++ (g (* t)))
++
++;;; BDDPTR bdd_nor (BDDPTR F, BDDPTR G)
++(sb-alien:define-alien-routine ("bdd___bdd_nor" bdd_nor)
++ (* t)
++ (f (* t))
++ (g (* t)))
++
++;;; BDDPTR bdd_equiv (BDDPTR F, BDDPTR G)
++(sb-alien:define-alien-routine ("bdd___bdd_equiv" bdd_equiv)
++ (* t)
++ (f (* t))
++ (g (* t)))
++
++;;; BDDPTR bdd_xnor (BDDPTR F, BDDPTR G) /* equivalent to bdd_equiv */
++(sb-alien:define-alien-routine ("bdd___bdd_xnor" bdd_xnor)
++ (* t)
++ (f (* t))
++ (g (* t)))
++
++;;; BDDPTR bdd_implied (BDDPTR F, BDDPTR G)
++(sb-alien:define-alien-routine ("bdd___bdd_implied" bdd_implied)
++ (* t)
++ (f (* t))
++ (g (* t)))
++
++;;; BDDPTR bdd_implies (BDDPTR F, BDDPTR G)
++(sb-alien:define-alien-routine ("bdd___bdd_implies" bdd_implies)
++ (* t)
++ (f (* t))
++ (g (* t)))
++
++;;; BDDPTR bdd_nand (BDDPTR F, BDDPTR G)
++(sb-alien:define-alien-routine ("bdd___bdd_nand" bdd_nand)
++ (* t)
++ (f (* t))
++ (g (* t)))
++
++;;; BDDPTR bdd_0 (void)
++(sb-alien:define-alien-routine ("bdd___bdd_0" bdd_0)
++ (* t))
++
++;;; BDDPTR bdd_1 (void)
++(sb-alien:define-alien-routine ("bdd___bdd_1" bdd_1)
++ (* t))
++
++;;; BDDPTR bdd_X (void)
++(sb-alien:define-alien-routine ("bdd___bdd_X" bdd_X)
++ (* t))
++
++;;; BDDPTR bdd_assign (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_assign" bdd_assign)
++ (* t)
++ (f (* t)))
++
++;;; BDDPTR bdd_top_var (BDDPTR f)
++;;; int bdd_top_var_rank (BDDPTR f)
++;;; BDDPTR bdd_then (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_then" bdd_then)
++ (* t)
++ (f (* t)))
++
++;;; BDDPTR bdd_else (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_else" bdd_else)
++ (* t)
++ (f (* t)))
++
++;;; BDDPTR bdd_apply (BDDPTR (*f)(BDDPTR,BDDPTR),BDDPTR a,BDDPTR b)
++(sb-alien:define-alien-routine ("bdd___bdd_apply" bdd_apply)
++ (* t)
++ (f (* t))
++ (a (* t))
++ (b (* t)))
++
++;;; BDDPTR bdd_constrain (BDDPTR f, BDDPTR c)
++(sb-alien:define-alien-routine ("bdd___bdd_constrain" bdd_constrain)
++ (* t)
++ (f (* t))
++ (c (* t)))
++
++;;; BDDPTR bdd_top_var (BDDPTR f)
++(sb-alien:define-alien-routine ("bdd___bdd_top_var" bdd_top_var)
++ (* t)
++ (f (* t)))
++
++;;; BDD_LIST bdd_sum_of_cubes (BDDPTR f, int irredundant)
++(sb-alien:define-alien-routine ("bdd___bdd_sum_of_cubes" bdd_sum_of_cubes)
++ (* t)
++ (f (* t))
++ (irredundant (integer 32)))
++
++(sb-alien:define-alien-variable ("bdd_interrupted" bdd_interrupted) (integer 32))
++
++;;; The following were obtained by looking through mu.c and collecting
++;;; functions not mentioned above.
++
++;;; int bdd_reorder_var (int var_id, int target_var_id)
++(sb-alien:define-alien-routine ("bdd___bdd_reorder_var" bdd_reorder_var)
++ (integer 32)
++ (var_id (integer 32))
++ (target_var (integer 32)))
++
++;;; BDDPTR bdd_and_smooth (BDDPTR f, BDDPTR g, BDD_LIST vars)
++(sb-alien:define-alien-routine ("bdd___bdd_and_smooth" bdd_and_smooth)
++ (* t)
++ (f (* t))
++ (g (* t))
++ (vars (* t)))
++
++;;; BDD_LIST bdd_rank_order_vars (BDD_LIST vars)
++(sb-alien:define-alien-routine
++ ("bdd___bdd_rank_order_vars" bdd_rank_order_vars)
++ (* t)
++ (vars (* t)))
++
++;;; BDDPTR bdd_quantify (int existential, BDDPTR f, BDD_LIST vars)
++(sb-alien:define-alien-routine ("bdd___bdd_quantify" bdd_quantify)
++ (* t)
++ (existential (integer 32))
++ (f (* t))
++ (vars (* t)))
++
++;;; BDDPTR bdd_subst_par (BDDPTR *f_vec, BDD_LIST vars, BDDPTR g)
++(sb-alien:define-alien-routine ("bdd___bdd_subst_par" bdd_subst_par)
++ (* t)
++ (f_vec (array (* t)))
++ (vars (* t))
++ (g (* t)))
++
++;;; BDDPTR bdd_subst_par_list (BDD_LIST f_list, BDD_LIST vars, BDDPTR g)
++(sb-alien:define-alien-routine ("bdd___bdd_subst_par_list" bdd_subst_par_list)
++ (* t)
++ (f_list (* t))
++ (vars (* t))
++ (g (* t)))
++
++;;; void bdd_free_vec (BDDPTR *f_vec, int size)
++(sb-alien:define-alien-routine ("bdd___bdd_free_vec" bdd_free_vec)
++ sb-alien:void
++ (f_vec (array (* t)))
++ (size (integer 32)))
++
++;;; const char *bdd_get_output_string (int idx)
++(sb-alien:define-alien-routine
++ ("bdd___bdd_get_output_string" bdd_get_output_string)
++ sb-alien:c-string
++ (idx (integer 32)))
++
++;;; void bdd_set_output_string (int idx, const char *str)
++(sb-alien:define-alien-routine
++ ("bdd___bdd_set_output_string" bdd_set_output_string)
++ sb-alien:void
++ (idx (integer 32))
++ (str sb-alien:c-string))
++
++;;; void bdd_print_as_sum_of_cubes (FILE *fp, BDDPTR f, int irredundant)
++(sb-alien:define-alien-routine
++ ("bdd___bdd_print_as_sum_of_cubes" bdd_print_as_sum_of_cubes)
++ sb-alien:void
++ (fp (* t))
++ (f (* t))
++ (irredundant (integer 32)))
++
++;;; BDDPTR bdd_diff (BDDPTR f, BDD_LIST vars)
++(sb-alien:define-alien-routine ("bdd___bdd_diff" bdd_diff)
++ (* t)
++ (f (* t))
++ (vars (* t)))
++
++;;; BDDPTR bdd_one_of_vec (BDDPTR *vec, int size)
++(sb-alien:define-alien-routine ("bdd___bdd_one_of_vec" bdd_one_of_vec)
++ (* t)
++ (vec (array (* t)))
++ (size (integer 32)))
++
++;;; BDDPTR bdd_none_of_vec (BDDPTR *args, int size)
++(sb-alien:define-alien-routine ("bdd___bdd_none_of_vec" bdd_none_of_vec)
++ (* t)
++ (args (array (* t)))
++ (size (integer 32)))
++
++;;; BDDPTR bdd_subst (BDDPTR f, int var, BDDPTR g)
++(sb-alien:define-alien-routine ("bdd___bdd_subst" bdd_subst)
++ (* t)
++ (f (* t))
++ (var (integer 32))
++ (g (* t)))
++
++;;; BDD_LIST bdd_sum_of_cubes_as_list (BDDPTR f)
++(sb-alien:define-alien-routine
++ ("bdd___bdd_sum_of_cubes_as_list" bdd_sum_of_cubes_as_list)
++ (* t)
++ (f (* t)))
++
++;;; int bdd_traverse_cube (BDDPTR cube,
++;;; void (*action) (int index, int neg, int first))
++(sb-alien:define-alien-routine ("bdd___bdd_traverse_cube" bdd_traverse_cube)
++ (integer 32)
++ (cube (* t))
++ (action (* t)))
++
++;;; BDD_LIST bdd_support_as_list_of_vars (BDDPTR f)
++(sb-alien:define-alien-routine
++ ("bdd___bdd_support_as_list_of_vars" bdd_support_as_list_of_vars)
++ (* t)
++ (f (* t)))
++
++(defun bdd-interrupted? ()
++ (not (zerop bdd_interrupted)))
++
++(bdd_init)
+diff -durN pvs-sbcl-4.2.ORIG/BDD/bdd_table.c pvs-sbcl-4.2/BDD/bdd_table.c
+--- pvs-sbcl-4.2.ORIG/BDD/bdd_table.c 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/BDD/bdd_table.c 2008-11-04 20:52:16.000000000 -0700
+@@ -8,6 +8,8 @@
+
+ int bdd___bdd_equal_p (BDDPTR F, BDDPTR G) {return bdd_equal_p (F, G);}
+
++int bdd___null_list_p (LIST x) {return null_list_p (x);}
++
+ void bdd___elem_contents (LIST_ELEM_PTR x) {elem_contents (x);}
+
+ LIST_ELEM_PTR bdd___list_first (LIST x) {
+diff -durN pvs-sbcl-4.2.ORIG/BDD/ix86_64-Linux/Makefile pvs-sbcl-4.2/BDD/ix86_64-Linux/Makefile
+--- pvs-sbcl-4.2.ORIG/BDD/ix86_64-Linux/Makefile 1969-12-31 17:00:00.000000000 -0700
++++ pvs-sbcl-4.2/BDD/ix86_64-Linux/Makefile 2008-11-04 20:52:16.000000000 -0700
+@@ -0,0 +1,48 @@
++BDD = ../bdd/src
++MU = ../mu/src
++UTILS = ../bdd/utils
++INCLUDES = -I/usr/include -I$(BDD) -I$(UTILS) -I$(MU)
++LD = gcc
++LDFLAGS = -shared -L./
++CC = gcc
++CFLAGS = -D_POSIX_SOURCE -DSYSV $(INCLUDES) -DLINUX -DLINUX_REDHAT5 -DSIGNALS_LINUX
++XCFLAGS = -O
++SHELL = /bin/sh
++VPATH = ..:../bdd/utils:../bdd/src:../mu/src
++
++muobj = bdd_interface.o bdd.o bdd_factor.o bdd_quant.o bdd_fns.o bdd_vfns.o \
++ appl.o mu_interface.o mu.o
++
++utilobj = double.o list.o hash.o alloc.o
++
++.SUFFIXES:
++.SUFFIXES: .c .o
++.c.o : ; $(CC) $(XCFLAGS) ${CFLAGS} -c $< -o $@
++
++all : mu.so
++
++mu.so : ${muobj} libutils.a ../bdd-ld-table ../mu-ld-table
++ $(LD) ../bdd-ld-table ../mu-ld-table $(LDFLAGS) -o mu.so ${muobj} -lutils -lm -lbsd
++
++libutils.a : ${utilobj}
++ ar r libutils.a ${utilobj}
++ ranlib libutils.a
++
++bdd_interface.o : bdd_interface.c bdd_fns.h
++bdd_factor.o : bdd_factor.c bdd_factor.h
++bdd.o : bdd.c bdd.h bdd_extern.h
++bdd_fns.o : bdd_fns.c bdd_fns.h bdd.h bdd_extern.h
++bdd_quant.o : bdd_quant.c bdd_fns.h bdd.h bdd_extern.h
++bdd_vfns.o : bdd_vfns.c bdd_vfns.h bdd_fns.h bdd.h bdd_extern.h
++
++mu_interface.o : mu_interface.c mu.h
++mu.o : mu.c mu.h
++
++double.o : double.c double.h
++list.o : list.c list.h alloc.h
++hash.o : hash.c hash.h alloc.h
++alloc.o : alloc.c
++
++clean :
++ rm -f *.o *.a *.so
++
+diff -durN pvs-sbcl-4.2.ORIG/BDD/mu-sbcl.lisp pvs-sbcl-4.2/BDD/mu-sbcl.lisp
+--- pvs-sbcl-4.2.ORIG/BDD/mu-sbcl.lisp 1969-12-31 17:00:00.000000000 -0700
++++ pvs-sbcl-4.2/BDD/mu-sbcl.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -0,0 +1,248 @@
++;; --------------------------------------------------------------------
++;; PVS
++;; Copyright (C) 2006, SRI International. All Rights Reserved.
++
++;; This program is free software; you can redistribute it and/or
++;; modify it under the terms of the GNU General Public License
++;; as published by the Free Software Foundation; either version 2
++;; of the License, or (at your option) any later version.
++
++;; This program is distributed in the hope that it will be useful,
++;; but WITHOUT ANY WARRANTY; without even the implied warranty of
++;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++;; GNU General Public License for more details.
++
++;; You should have received a copy of the GNU General Public License
++;; along with this program; if not, write to the Free Software
++;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++;; --------------------------------------------------------------------
++(in-package :pvs)
++
++
++;;;;;;;;;;;;;;;;;
++;;; Formula ;;;
++;;;;;;;;;;;;;;;;;
++
++;;; Formula mu_mk_false_formula (void)
++(sb-alien:define-alien-routine ("mu___mu_mk_false_formula" mu_mk_false_formula)
++ (* t))
++
++;;; Formula mu_mk_true_formula (void)
++(sb-alien:define-alien-routine ("mu___mu_mk_true_formula" mu_mk_true_formula)
++ (* t))
++
++;;; Formula mu_mk_bool_var (char *name)
++(sb-alien:define-alien-routine ("mu___mu_mk_bool_var" mu_mk_bool_var)
++ (* t)
++ (name sb-alien:c-string))
++
++;;; int mu_check_bool_var (char *name)
++(sb-alien:define-alien-routine ("mu___mu_check_bool_var" mu_check_bool_var)
++ (integer 32)
++ (var sb-alien:c-string))
++
++;;; Formula mu_check_mk_bool_var (char *name)
++(sb-alien:define-alien-routine
++ ("mu___mu_check_mk_bool_var" mu_check_mk_bool_var)
++ (* t)
++ (name sb-alien:c-string))
++
++;;; Formula mu_mk_ite_formula (Formula cond, Formula then_part, Formula else_part)
++(sb-alien:define-alien-routine ("mu___mu_mk_ite_formula" mu_mk_ite_formula)
++ (* t)
++ (cnd (* t))
++ (then_part (* t))
++ (else_part (* t)))
++
++;;; Formula mu_mk_curry_application (Term R, LIST subs)
++(sb-alien:define-alien-routine
++ ("mu___mu_mk_curry_application" mu_mk_curry_application)
++ (* t)
++ (R (* t))
++ (subs (* t)))
++
++;;; Formula mu_mk_application (Term R, LIST subs, int curried)
++(sb-alien:define-alien-routine ("mu___mu_mk_application" mu_mk_application)
++ (* t)
++ (R (* t))
++ (subs (* t))
++ (curried (integer 32)))
++
++;;; Formula mu_mk_forall (LIST listvars, Formula fml)
++(sb-alien:define-alien-routine ("mu___mu_mk_forall" mu_mk_forall)
++ (* t)
++ (listvars (* t))
++ (fml (* t)))
++
++;;; Formula mu_mk_exists (LIST listvars, Formula fml)
++(sb-alien:define-alien-routine ("mu___mu_mk_exists" mu_mk_exists)
++ (* t)
++ (listvars (* t))
++ (fml (* t)))
++
++;;; Formula mu_mk_implies_formula (Formula fml1, Formula fml2)
++(sb-alien:define-alien-routine
++ ("mu___mu_mk_implies_formula" mu_mk_implies_formula)
++ (* t)
++ (fml1 (* t))
++ (fml2 (* t)))
++
++;;; Formula mu_mk_equiv_formula (Formula fml1, Formula fml2)
++(sb-alien:define-alien-routine ("mu___mu_mk_equiv_formula" mu_mk_equiv_formula)
++ (* t)
++ (fml1 (* t))
++ (fml2 (* t)))
++
++;;; Formula mu_mk_or_formula (Formula fml1, Formula fml2)
++(sb-alien:define-alien-routine ("mu___mu_mk_or_formula" mu_mk_or_formula)
++ (* t)
++ (fml1 (* t))
++ (fml2 (* t)))
++
++;;; Formula mu_mk_and_formula (Formula fml1, Formula fml2)
++(sb-alien:define-alien-routine ("mu___mu_mk_and_formula" mu_mk_and_formula)
++ (* t)
++ (fml1 (* t))
++ (fml2 (* t)))
++
++;;; Formula mu_mk_not_formula (Formula fml)
++(sb-alien:define-alien-routine ("mu___mu_mk_not_formula" mu_mk_not_formula)
++ (* t)
++ (fml (* t)))
++
++;;; Formula mu_mk_cofactor (Formula fml1, Formula fml2)
++(sb-alien:define-alien-routine ("mu___mu_mk_cofactor" mu_mk_cofactor)
++ (* t)
++ (fml1 (* t))
++ (fml2 (* t)))
++
++;;;;;;;;;;;;;;;
++;;; Term ;;;
++;;;;;;;;;;;;;;;
++;;; Term mu_mk_abstraction (LIST vars, Formula f1)
++(sb-alien:define-alien-routine ("mu___mu_mk_abstraction" mu_mk_abstraction)
++ (* t)
++ (vars (* t))
++ (f1 (* t)))
++;;; Term mu_mk_l_fixed_point (int relvar, Term fml1)
++(sb-alien:define-alien-routine ("mu___mu_mk_l_fixed_point" mu_mk_l_fixed_point)
++ (* t)
++ (relvar (integer 32))
++ (fml1 (* t)))
++;;; Term mu_mk_g_fixed_point (int relvar, Term fml1)
++(sb-alien:define-alien-routine ("mu___mu_mk_g_fixed_point" mu_mk_g_fixed_point)
++ (* t)
++ (relvar (integer 32))
++ (fml1 (* t)))
++;;; Term mu_mk_reach (Term Next, Term S0, Term Inv)
++(sb-alien:define-alien-routine ("mu___mu_mk_reach" mu_mk_reach)
++ (* t)
++ (Next (* t))
++ (S0 (* t))
++ (Inv (* t)))
++;;; Term mu_mk_rel_var_dcl (char *name)
++(sb-alien:define-alien-routine ("mu___mu_mk_rel_var_dcl" mu_mk_rel_var_dcl)
++ (* t)
++ (name sb-alien:c-string))
++;;; Term mu_mk_rel_var_ (char *name)
++(sb-alien:define-alien-routine ("mu___mu_mk_rel_var_" mu_mk_rel_var_)
++ (* t)
++ (name sb-alien:c-string))
++;;; Term mu_mk_true_term (void)
++(sb-alien:define-alien-routine ("mu___mu_mk_true_term" mu_mk_true_term)
++ (* t))
++;;; Term mu_mk_false_term (void)
++(sb-alien:define-alien-routine ("mu___mu_mk_false_term" mu_mk_false_term)
++ (* t))
++;;; Term mu_mk_not_term (Term fml1)
++(sb-alien:define-alien-routine ("mu___mu_mk_not_term" mu_mk_not_term)
++ (* t)
++ (fml1 (* t)))
++;;; Term mu_mk_and_term (Term fml1, Term fml2)
++(sb-alien:define-alien-routine ("mu___mu_mk_and_term" mu_mk_and_term)
++ (* t)
++ (fml1 (* t))
++ (fml2 (* t)))
++;;; Term mu_mk_or_term (Term fml1, Term fml2)
++(sb-alien:define-alien-routine ("mu___mu_mk_or_term" mu_mk_or_term)
++ (* t)
++ (fml1 (* t))
++ (fml2 (* t)))
++;;; Term mu_mk_equiv_term (Term fml1, Term fml2)
++(sb-alien:define-alien-routine ("mu___mu_mk_equiv_term" mu_mk_equiv_term)
++ (* t)
++ (fml1 (* t))
++ (fml2 (* t)))
++;;; Term mu_mk_implies_term (Term fml1, Term fml2)
++(sb-alien:define-alien-routine ("mu___mu_mk_implies_term" mu_mk_implies_term)
++ (* t)
++ (fml1 (* t))
++ (fml2 (* t)))
++;;; const char *get_mu_bool_var_name (int bdd_idx)
++(sb-alien:define-alien-routine
++ ("mu___get_mu_bool_var_name" get_mu_bool_var_name)
++ sb-alien:c-string
++ (bdd_idx (integer 32)))
++
++;;;;;;;;;;;;;;;;;;;
++;;; Lists ;;;
++;;;;;;;;;;;;;;;;;;;
++
++;;; LIST append_cont (void *p, LIST list)
++(sb-alien:define-alien-routine ("mu___append_cont" append_cont)
++ (* t)
++ (p (* t))
++ (list (* t)))
++;;; LIST empty_list (void)
++(sb-alien:define-alien-routine ("mu___empty_list" empty_list)
++ (* t))
++
++;;;
++;;; Flags
++
++;;; int set_mu_warnings (int flag)
++(sb-alien:define-alien-routine ("mu___set_mu_warnings" set_mu_warnings)
++ (integer 32)
++ (flag (integer 32)))
++;;; int set_mu_simplify_frontier (int flag)
++(sb-alien:define-alien-routine
++ ("mu___set_mu_simplify_frontier" set_mu_simplify_frontier)
++ (integer 32)
++ (flag (integer 32)))
++;;; int set_mu_verbose (int flag)
++(sb-alien:define-alien-routine ("mu___set_mu_verbose" set_mu_verbose)
++ (integer 32)
++ (flag (integer 32)))
++
++;;
++;;
++;; GC management: not needed, "modelcheck_formula" takes care of it.
++;;
++
++;;;;;;;;;;;;;;;;;;;
++;;; print ;;;
++;;;;;;;;;;;;;;;;;;;
++
++;;; void pvs_mu_print_formula (Formula fml)
++(sb-alien:define-alien-routine
++ ("mu___pvs_mu_print_formula" pvs_mu_print_formula)
++ sb-alien:void
++ (fml (* t)))
++;;; void pvs_mu_print_term (Term t)
++(sb-alien:define-alien-routine ("mu___pvs_mu_print_term" pvs_mu_print_term)
++ sb-alien:void
++ (term (* t)))
++
++;;;;;;;;;;;;;;;;;;;;;;;;;
++;;; Main function ;;;;;
++;;;;;;;;;;;;;;;;;;;;;;;;;
++
++;;; void mu_init (void)
++(sb-alien:define-alien-routine ("mu___mu_init" mu_init)
++ sb-alien:void)
++(sb-alien:define-alien-routine ("mu___mu_quit" mu_quit)
++ sb-alien:void)
++;;; BDDPTR mu___modelcheck_formula (Formula fml)
++(sb-alien:define-alien-routine ("mu___modelcheck_formula" modelcheck_formula)
++ (* t)
++ (fml (* t)))
+diff -durN pvs-sbcl-4.2.ORIG/bin/make-dist pvs-sbcl-4.2/bin/make-dist
+--- pvs-sbcl-4.2.ORIG/bin/make-dist 2008-07-19 15:49:18.000000000 -0600
++++ pvs-sbcl-4.2/bin/make-dist 2008-11-04 20:52:16.000000000 -0700
+@@ -91,16 +91,18 @@
+ src/groundeval/*.lisp \
+ src/utils/*.lisp \
+ src/utils/ix86-Linux/Makefile src/utils/ix86-MacOSX/Makefile \
++ src/utils/ix86_64-Linux/Makefile \
+ src/utils/powerpc-MacOSX/Makefile \
+ src/utils/sun4-SunOS5/Makefile \
+ BDD/bdd-ld-table BDD/mu-ld-table \
+ BDD/*.c \
+ BDD/*.lisp \
+- BDD/ix86-Linux/Makefile BDD/sun4-SunOS5/Makefile \
++ BDD/ix86-Linux/Makefile BDD/ix86_64-Linux/Makefile BDD/sun4-SunOS5/Makefile \
+ BDD/ix86-MacOSX/Makefile BDD/powerpc-MacOSX/Makefile \
+ BDD/bdd BDD/mu \
+ src/WS1S/README src/WS1S/ws1s-ld-table \
+ src/WS1S/*.c src/WS1S/mona-1.4 \
++ src/WS1S/ix86_64-Linux/Makefile
+ src/WS1S/ix86-Linux/Makefile src/WS1S/sun4-SunOS5/Makefile \
+ src/WS1S/ix86-MacOSX/Makefile src/WS1S/powerpc-MacOSX/Makefile \
+ doc/pvs.bib doc/makebnf.sty doc/pvstex.tex doc/release-notes \
+@@ -155,7 +157,7 @@
+ # echo "pvs-libraries.tgz not created - need to typecheck finite_sets and bitvectors"
+ # fi
+
+-for platform in ix86-Linux ix86-MacOSX powerpc-MacOSX \
++for platform in ix86-Linux ix86_64-Linux ix86-MacOSX powerpc-MacOSX \
+ sun4-SunOS5
+ do
+ for subdir in runtime devel
+@@ -199,5 +201,22 @@
+ else
+ echo "CMU Lisp ${subdir} not available for ${platform}"
+ fi
++ if [ -e bin/${platform}/${subdir}/pvs-sbclisp -a "$subdir" = "runtime" ]
++ then
++ echo Creating pvs-${version}-${platform}-sbclisp${kind}.tgz
++ tar ${TARFLAGS} -f pvs-${version}-${platform}-sbclisp${kind}.tgz \
++ ${pvssystemfiles} \
++ bin/${platform}/b64 bin/relocate \
++ bin/pvs-platform bin/tar-b64-mail \
++ bin/${platform}/${subdir}/mu.* \
++ bin/${platform}/${subdir}/file_utils.* \
++ bin/${platform}/${subdir}/ws1s.* \
++ bin/${platform}/${subdir}/*-sbcl.* \
++ bin/${platform}/${subdir}/lisp \
++ bin/${platform}/${subdir}/pvs-sbclisp*
++ ls -l pvs-${version}-${platform}-sbclisp${kind}.tgz
++ else
++ echo "SBCL ${subdir} not available for ${platform}"
++ fi
+ done
+ done
+diff -durN pvs-sbcl-4.2.ORIG/bin/pvs-platform pvs-sbcl-4.2/bin/pvs-platform
+--- pvs-sbcl-4.2.ORIG/bin/pvs-platform 2007-07-16 00:28:06.000000000 -0600
++++ pvs-sbcl-4.2/bin/pvs-platform 2008-11-04 20:52:16.000000000 -0700
+@@ -33,7 +33,10 @@
+ esac
+ os=SunOS
+ os_version=`uname -r | cut -d"." -f1`;;
+- Linux) arch=ix86
++ Linux) case `uname -m` in
++ x86_64) arch=ix86_64;;
++ x86*) arch=ix86;;
++ esac
+ os=Linux;;
+ AIX) arch=powerpc-ibm
+ os=AIX
+diff -durN pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-ilisp.el pvs-sbcl-4.2/emacs/emacs-src/pvs-ilisp.el
+--- pvs-sbcl-4.2.ORIG/emacs/emacs-src/pvs-ilisp.el 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/emacs/emacs-src/pvs-ilisp.el 2008-11-04 20:52:16.000000000 -0700
+@@ -111,6 +111,7 @@
+ (case (intern (getenv "PVSLISP"))
+ (allegro (pvsallegro "pvs" nil))
+ (cmulisp (pvscmulisp "pvs" nil))
++ (sbclisp (pvssbclisp "pvs" nil))
+ (t (error "Unknown lisp - %s" (getenv "PVSLISP"))))
+ (save-excursion
+ (set-buffer (ilisp-buffer))
+@@ -164,7 +165,7 @@
+ (setq ilisp-binary-extension (pvs-cmulisp-binary-extension))
+ (setq ilisp-init-binary-extension ilisp-binary-extension)
+ (setq ilisp-load-inits nil)
+- (setq ilisp-program (format "%s -qq" (pvs-program)))
++ (setq ilisp-program (format "%s -quiet -noinit" (pvs-program)))
+ (setq comint-prompt-regexp
+ "^\\([0-9]+\\]+\\|\\*\\|[-a-zA-Z0-9]*\\[[0-9]+\\]:\\) \\|Rule\\? \\|<GndEval> \\|<PVSio> \\|(Y or N)\\|(Yes or No)\\|Please enter")
+ (setq comint-interrupt-regexp "^Interrupted at")
+@@ -173,6 +174,24 @@
+ "^\\([0-9]+\\]+\\|\\*\\|[-a-zA-Z0-9]*\\[[0-9]+\\]:\\) ")
+ (setq pvs-gc-end-regexp ";;; Finished GC"))
+
++(defdialect pvssbclisp "pvs-sbclisp"
++ cmulisp
++ (pvs-comint-init)
++ ;;(setq comint-send-newline nil)
++ (setq ilisp-binary-extension (pvs-sbclisp-binary-extension))
++ (setq ilisp-init-binary-extension ilisp-binary-extension)
++ (setq ilisp-load-inits nil)
++ (setq ilisp-program (format "%s --noinform --no-userinit" (pvs-program)))
++ (setq ilisp-reset ":abort")
++ (setq comint-prompt-regexp
++ "^\\([0-9]+\\]+\\|\\*\\|[-a-zA-Z0-9]*\\[[0-9]+\\]:\\) \\|Rule\\? \\|<GndEval> \\|<PVSio> \\|(Y or N)\\|(Yes or No)\\|Please enter")
++ (setq comint-interrupt-regexp "^ Interactive interrupt at")
++ (setq comint-continue ":continue")
++ (setq ilisp-error-regexp "^restarts (invokable by number or by possibly-abbreviated name):$")
++ (setq pvs-top-regexp
++ "^\\([0-9]+\\]+\\|\\*\\|[-a-zA-Z0-9]*\\[[0-9]+\\]:\\) ")
++ (setq pvs-gc-end-regexp ";;; Finished GC"))
++
+ (defun pvs-allegro-binary-extension ()
+ (let ((machine (getenv "PVSARCH")))
+ (cond ((string-equal machine "sun4") ; Sun/Solaris
+@@ -193,6 +212,18 @@
+ "ppcf")
+ (t (error "Machine architecture %s not recognized" machine)))))
+
++(defun pvs-sbclisp-binary-extension ()
++ (let ((machine (getenv "PVSARCH")))
++ (cond ((string-equal machine "sun4") ; Sun/Solaris
++ "sparcs")
++ ((string-equal machine "ix86") ; Intel/Linux
++ "x86s")
++ ((string-equal machine "ix86_64") ; Intel/Linux
++ "x8664s")
++ ((string-equal machine "powerpc") ; Mac
++ "ppcs")
++ (t (error "Machine architecture %s not recognized" machine)))))
++
+ (defun pvs-comint-init ()
+ (setq ilisp-motd nil)
+ (setq pvs-fix-error comint-fix-error)
+diff -durN pvs-sbcl-4.2.ORIG/ess/box-defs.lisp pvs-sbcl-4.2/ess/box-defs.lisp
+--- pvs-sbcl-4.2.ORIG/ess/box-defs.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/box-defs.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -15,8 +15,8 @@
+ ;;; Frank Pfenning (fp@cs.cmu.edu) ;;;
+ ;;; ******************************************************************* ;;;
+
+-(in-package :tools #+sbcl (:use :common-lisp :ergolisp))
+-#-sbcl (use-package :ergolisp)
++(in-package :tools)
++(use-package :ergolisp)
+
+ (export '(*plain-readtable*))
+
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/ab-term/rel/af-dependency.lisp pvs-sbcl-4.2/ess/lang/ab-term/rel/af-dependency.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/ab-term/rel/af-dependency.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/ab-term/rel/af-dependency.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -24,7 +24,7 @@
+ ;;; 07-17-86 rln Initial development and release
+ ;;; 07-22-87 rln Reimplementation
+
+-(in-package 'analysis-facility)
++(in-package :analysis-facility)
+ (use-package '("AF-RUNTIME-LIB"))
+
+ ;;; The variable *CODE* accumulates the code descriptors generated by SCHEDULE.
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/ab-term/rel/af-runtime.lisp pvs-sbcl-4.2/ess/lang/ab-term/rel/af-runtime.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/ab-term/rel/af-runtime.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/ab-term/rel/af-runtime.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -25,7 +25,12 @@
+ ;;; 07-22-87 rln Initial development release.
+ ;;;
+
+-(in-package "AF-RUNTIME-LIB" :nicknames '(abrt afrt))
++(eval-when (compile load eval)
++ (unless (find-package "AF-RUNTIME-LIB")
++ (make-package "AF-RUNTIME-LIB"
++ :nicknames '("ABRT" "AFRT")
++ :use '("COMMON-LISP"))))
++(in-package "AF-RUNTIME-LIB")
+
+ (export '(opcase argcase rt-delta-error rt-term-argn rt-term-args
+ rt-symbol rt-ite rt-opt rt-function rt-ast
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/ab-term/rel/af-structs.lisp pvs-sbcl-4.2/ess/lang/ab-term/rel/af-structs.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/ab-term/rel/af-structs.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/ab-term/rel/af-structs.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -23,7 +23,7 @@
+ ;;;
+ ;;; 07-22-87 rln Initial development and release.
+
+-(in-package 'analysis-facility)
++(in-package :analysis-facility)
+
+ ;;; A DP-EVAL structure describes an attribute which is defined by an expression.
+ ;;; An expression always defines exactly one attribute.
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/ab-term/rel/af-top.lisp pvs-sbcl-4.2/ess/lang/ab-term/rel/af-top.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/ab-term/rel/af-top.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/ab-term/rel/af-top.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -29,7 +29,7 @@
+ ;;; 07-22-87 rln Initial development release.
+
+
+-(in-package 'analysis-facility :nicknames '(ab af))
++(in-package :analysis-facility)
+
+ (export '(ab ab-make help))
+
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/access-par.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/access-par.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/access-par.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/access-par.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -21,7 +21,7 @@
+ ;;; Revised Scott Dietzen, Mon Oct 13 15:32:09 1986
+
+
+-(in-package 'syntax-box) (use-package :ergolisp)
++(in-package :syntax-box) (use-package :ergolisp)
+
+
+
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/aux-funs.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/aux-funs.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/aux-funs.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/aux-funs.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -17,7 +17,7 @@
+ ;;; Scott Dietzen, Mon Oct 13 16:05:43 1986
+
+
+-(in-package 'syntax-box) (use-package :ergolisp)
++(in-package :syntax-box) (use-package :ergolisp)
+
+
+ (defparameter *sb-package* (find-package :sb))
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/collapse.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/collapse.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/collapse.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/collapse.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -16,7 +16,7 @@
+
+ ;;;; Basic Function: Collapse fragments into lisp functions
+
+-(in-package 'syntax-box) (use-package :ergolisp)
++(in-package :syntax-box) (use-package :ergolisp)
+
+
+ ; The purpose of collapse is to take the fragments produced by process-grammar
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/flatten.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/flatten.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/flatten.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/flatten.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -17,7 +17,7 @@
+
+ ;;;; Basic Function: Flatten Patterns
+
+-(in-package 'syntax-box) (use-package :ergolisp)
++(in-package :syntax-box) (use-package :ergolisp)
+
+
+
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/inter-phase.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/inter-phase.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/inter-phase.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/inter-phase.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -16,8 +16,8 @@
+
+ ;;; Intermediate Phase.
+
+-(in-package 'syntax-box) (use-package :ergolisp)
+-(use-package '(sb-runtime))
++(in-package :syntax-box) (use-package :ergolisp)
++(use-package :sb-runtime)
+
+ ;;; Understanding of the internal grammar term structure is essential to
+ ;;; understanding this code (see documentation in access.lisp). @@@
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/lexer-gen.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/lexer-gen.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/lexer-gen.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/lexer-gen.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -31,7 +31,7 @@
+ ;;; (Routines check-comment-char(s)-with-op(S))
+
+
+-(in-package 'syntax-box) (use-package :ergolisp)
++(in-package :syntax-box) (use-package :ergolisp)
+
+
+
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/look-ahead.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/look-ahead.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/look-ahead.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/look-ahead.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -9,9 +9,9 @@
+ ;;; ******************************************************************* ;;;
+
+
+-(in-package 'syntax-box) (use-package :ergolisp)
++(in-package :syntax-box) (use-package :ergolisp)
+
+-(use-package '(sb-runtime))
++(use-package :sb-runtime)
+
+
+
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/new-rt-format.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/new-rt-format.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/new-rt-format.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/new-rt-format.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -13,7 +13,7 @@
+
+ ;;; Scott Dietzen, Wed Aug 26 17:16:29 1987
+
+-(in-package 'sb-runtime) (use-package :ergolisp)
++(in-package :sb-runtime) (use-package :ergolisp)
+
+ (export '(
+ format-uterm
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/old-rt-format.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/old-rt-format.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/old-rt-format.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/old-rt-format.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -13,7 +13,7 @@
+
+ ;;; Scott Dietzen, Wed Aug 26 17:16:29 1987
+
+-(in-package 'sb-runtime) (use-package :ergolisp)
++(in-package :sb-runtime) (use-package :ergolisp)
+
+ (export '(
+ format-uterm
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/old-rt-unp-structs.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/old-rt-unp-structs.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/old-rt-unp-structs.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/old-rt-unp-structs.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -13,7 +13,7 @@
+
+ ;;; Scott Dietzen, Wed Aug 26 17:16:29 1987
+
+-(in-package 'sb-runtime) (use-package :ergolisp)
++(in-package :sb-runtime) (use-package :ergolisp)
+
+ (export '(token-p make-token token-kind token-subkind
+ token-value token-str-value
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/rt-lex.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/rt-lex.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/rt-lex.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/rt-lex.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -40,7 +40,7 @@
+ ))
+
+
+-(defconstant possible-single-char-operators
++(defconstant-if-unbound possible-single-char-operators
+ '(#\( #\) #\[ #\] #\{ #\} #\< #\> #\, #\; #\| #\^ #\# #\~ #\/
+ #\! #\@ #\$ #\& #\_ #\- #\? #\% #\' #\: #\* #\+ #\` #\= #\\))
+
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/rt-term.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/rt-term.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/rt-term.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/rt-term.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -19,7 +19,7 @@
+
+
+
+-(in-package "SB-RUNTIME" :nicknames '("RT-SB" "RTSB" "SB-RT" "SBRT"))
++(in-package "SB-RUNTIME")
+ (use-package :ergolisp)
+
+ (use-package '("TERM" "OCC" "OPER"))
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/rt-unparse.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/rt-unparse.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/rt-unparse.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/rt-unparse.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -117,17 +117,17 @@
+
+ ;;; Just so we don't repeatedly cons identical tokens.
+
+-(defconstant ellipsis-token
++(defconstant-if-unbound ellipsis-token
+ (make-token :kind :lt :subkind :string :value "#"))
+-(defconstant cr-token
++(defconstant-if-unbound cr-token
+ (make-token :kind :whitespace :subkind :cr))
+-(defconstant unindent-token
++(defconstant-if-unbound unindent-token
+ (make-token :kind :whitespace :subkind :unindent))
+-(defconstant tab-left-token
++(defconstant-if-unbound tab-left-token
+ (make-token :kind :whitespace :subkind :tab-left))
+-(defconstant tab-right-token
++(defconstant-if-unbound tab-right-token
+ (make-token :kind :whitespace :subkind :tab-right))
+-(defconstant untab-token
++(defconstant-if-unbound untab-token
+ (make-token :kind :whitespace :subkind :untab))
+
+
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/rt-unp-attr.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/rt-unp-attr.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/rt-unp-attr.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/rt-unp-attr.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -13,7 +13,7 @@
+
+ ;;; Scott Dietzen, Tue Oct 6 15:32:22 1987
+
+-(in-package 'sb-runtime) (use-package :ergolisp)
++(in-package "SB-RUNTIME") (use-package :ergolisp)
+
+
+ ;;; The following is a hack to avoid the problems inherent in the circularity
+@@ -42,38 +42,6 @@
+
+
+
+-(defun memo-uterm (term unp-function &key (top-level? nil))
+- (if (or *disable-caching*
+- (and *disable-nested-caching*
+- (null top-level?)))
+- (funcall unp-function term)
+- (newattr::get-gsyn theuterm
+- term
+- (list unp-function
+- *unparse-style*
+- *no-escapes*
+- *sb-print-depth*
+- *sb-print-length*
+- *formatting-off*))))
+-
+-
+-(defun memo-aw (uterm width indent-unit-width fontwidth fontheight)
+- (if *disable-caching*
+- (let* ((aw (make-aw :uterm uterm
+- :indent-unit-width indent-unit-width)))
+- (format-aw uterm aw width))
+- (newattr::get-gsyn theaw
+- (uterm-term uterm)
+- (list uterm
+- width
+- indent-unit-width
+- fontwidth
+- fontheight))))
+-
+-
+-
+-
+-
+ (newattr::defgcon uterm-args)
+ (newattr::defgsyn theuterm uterm-args)
+
+@@ -105,3 +73,33 @@
+ :indent-unit-width indent-unit-width)))
+ (format-aw uterm aw width))))
+
++
++
++
++(defun memo-uterm (term unp-function &key (top-level? nil))
++ (if (or *disable-caching*
++ (and *disable-nested-caching*
++ (null top-level?)))
++ (funcall unp-function term)
++ (newattr::get-gsyn theuterm
++ term
++ (list unp-function
++ *unparse-style*
++ *no-escapes*
++ *sb-print-depth*
++ *sb-print-length*
++ *formatting-off*))))
++
++
++(defun memo-aw (uterm width indent-unit-width fontwidth fontheight)
++ (if *disable-caching*
++ (let* ((aw (make-aw :uterm uterm
++ :indent-unit-width indent-unit-width)))
++ (format-aw uterm aw width))
++ (newattr::get-gsyn theaw
++ (uterm-term uterm)
++ (list uterm
++ width
++ indent-unit-width
++ fontwidth
++ fontheight))))
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/rt-unp-structs.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/rt-unp-structs.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/rt-unp-structs.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/rt-unp-structs.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -13,7 +13,7 @@
+
+ ;;; Scott Dietzen, Wed Aug 26 17:16:29 1987
+
+-(in-package 'sb-runtime) (use-package :ergolisp)
++(in-package "SB-RUNTIME") (use-package :ergolisp)
+
+ (export '(token-p make-token token-kind token-subkind
+ token-value token-str-value
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/sbrt-lang-def.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/sbrt-lang-def.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/sbrt-lang-def.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/sbrt-lang-def.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -2,7 +2,9 @@
+ ;;; package SB-RUNTIME is seen. fp, Mon Jan 2 11:07:17 1989.
+ #-gcl
+ (defpackage :sb-runtime
+- #+sbcl (:use :common-lisp :ergolisp :oper :occ :term :sort :lang))
++ #+sbcl (:nicknames "RT-SB" "RTSB" "SB-RT" "SBRT")
++ #+sbcl (:use :common-lisp :ergolisp :oper :occ :term :sort :lang)
++ #+sbcl (:shadowing-import-from :sb-int memq))
+ (in-package :sb-runtime)
+ #-sbcl (use-package :ergolisp)
+ #-sbcl (use-package '(:oper :occ :term :sort :lang))
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/top.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/top.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/top.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/top.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -25,7 +25,7 @@
+ ;;; Added calls to preprocessing phase.
+
+
+-(in-package 'syntax-box) (use-package :ergolisp)
++(in-package :syntax-box) (use-package :ergolisp)
+
+ (export '(sb sb-make))
+
+diff -durN pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/unp-code-revise.lisp pvs-sbcl-4.2/ess/lang/sb-term/rel/unp-code-revise.lisp
+--- pvs-sbcl-4.2.ORIG/ess/lang/sb-term/rel/unp-code-revise.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/lang/sb-term/rel/unp-code-revise.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -14,7 +14,7 @@
+ ;;; This code modifies unparser generator code.
+ ;;; Scott Dietzen, Wed Nov 11 15:38:39 1987
+
+-(in-package 'SB) (use-package :ergolisp)
++(in-package :SB) (use-package :ergolisp)
+
+
+ (defun unp-code-revision (routines)
+diff -durN pvs-sbcl-4.2.ORIG/ess/sys/ergolisp/rel/dlambda.lisp pvs-sbcl-4.2/ess/sys/ergolisp/rel/dlambda.lisp
+--- pvs-sbcl-4.2.ORIG/ess/sys/ergolisp/rel/dlambda.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/sys/ergolisp/rel/dlambda.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -26,7 +26,7 @@
+ ;; This is a macro so that setf will work for declare-constructor
+ `(gethash ,constr *constructors-table* :no-info))
+
+-(defconstant *reserved-constrs* '(:as)
++(defconstant-if-unbound *reserved-constrs* '(:as)
+ "List of symbols that may not be used as constructors.")
+
+ (defmacro defreconstr (constr argcnt &key equal)
+diff -durN pvs-sbcl-4.2.ORIG/ess/sys/tools/rel/box-system.lisp pvs-sbcl-4.2/ess/sys/tools/rel/box-system.lisp
+--- pvs-sbcl-4.2.ORIG/ess/sys/tools/rel/box-system.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/sys/tools/rel/box-system.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -190,15 +190,11 @@
+ (when lisp-compiler
+ (when boot
+ (load source-file))
+- (if readtable
+- (let ((*readtable* readtable))
+- (compile-file source-file :output-file compiled-file
+- #+(or lucid allegro) :messages #+(or lucid allegro) messages
+- #+(or cmu sbcl) :progress #+(or cmu sbcl) messages
+- ))
++ (let ((*readtable* (if readtable readtable *readtable*))
++ #+sbcl (*compiler-progress* messages))
+ (compile-file source-file :output-file compiled-file
+ #+(or lucid allegro) :messages #+(or lucid allegro) messages
+- #+(or cmu sbcl) :progress #+(or cmu sbcl) messages
++ #+cmu :progress #+cmu messages
+ ))
+ )
+ ;; #+kcl (rename-file (merge-pathnames ".o" source-file) compiled-file)
+@@ -249,6 +245,8 @@
+ (multiple-value-bind (junk1 junk2 result junk4)
+ (run-program "cc" :arguments arguments)
+ result)
++ #+sbcl
++ (sb-ext:process-exit-code (sb-ext:run-program "cc" arguments))
+ #+allegro
+ (excl:run-shell-command
+ (format nil "cc ~{ ~a~}" arguments))))
+@@ -390,8 +388,8 @@
+ ;;; all source files are .lisp, so we need only one set.
+ ;;; Recommend not changing the source extension. -fp
+
+-(defconstant *lisp-source-extension* "lisp")
+-(defconstant *lisp-compiled-extension*
++(defconstant-if-unbound *lisp-source-extension* "lisp")
++(defconstant-if-unbound *lisp-compiled-extension*
+ #+(and allegro sparc) "fasl" ; Sun4
+ #+(and allegro rios) "rfasl" ; PowerPC/RS6000
+ #+(and allegro hpux) "hfasl" ; HP 9000
+@@ -421,14 +419,14 @@
+ for this implementation of Lisp in the file sys/tools/rel/box-system.lisp.
+ Right now it is assumed to be \"bin\".")
+
+-(defconstant *lisp-source-suffix-string*
++(defconstant-if-unbound *lisp-source-suffix-string*
+ (concatenate 'string "." *lisp-source-extension*))
+
+-(defconstant *lisp-compiled-suffix-string*
++(defconstant-if-unbound *lisp-compiled-suffix-string*
+ (concatenate 'string "." *lisp-compiled-extension*))
+
+-(defconstant *lisp-source-extension-pathname*
++(defconstant-if-unbound *lisp-source-extension-pathname*
+ (make-pathname :type *lisp-source-extension*))
+
+-(defconstant *lisp-compiled-extension-pathname*
++(defconstant-if-unbound *lisp-compiled-extension-pathname*
+ (make-pathname :type *lisp-compiled-extension*))
+diff -durN pvs-sbcl-4.2.ORIG/ess/sys/tools/rel/print-utils.lisp pvs-sbcl-4.2/ess/sys/tools/rel/print-utils.lisp
+--- pvs-sbcl-4.2.ORIG/ess/sys/tools/rel/print-utils.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/sys/tools/rel/print-utils.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -8,6 +8,7 @@
+ (defpackage :print-utils #+sbcl (:use :common-lisp :ergolisp))
+ (in-package :print-utils) #-sbcl (use-package :ergolisp)
+
++#-sbcl
+ (export '(lisp::print-struct lisp::writing-readably)
+ :lisp)
+ (export '(print-struct writing-readably))
+diff -durN pvs-sbcl-4.2.ORIG/ess/sys/tools/rel/regression-test.lisp pvs-sbcl-4.2/ess/sys/tools/rel/regression-test.lisp
+--- pvs-sbcl-4.2.ORIG/ess/sys/tools/rel/regression-test.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/sys/tools/rel/regression-test.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -19,8 +19,8 @@
+ (defvar *regression-testing-p* nil)
+
+ (defun regression-test (&key (name "Anonymous test")
+- form (form-predicate #'identity) script endp)
+- (declare (special name script endp))
++ form (form-predicate #'identity) script donep)
++ (declare (special name script donep))
+ (let ((*regression-testing-p* t))
+ (catch 'script-ended
+ (let ((formval (if (functionp form) (funcall form) (eval form))))
+@@ -43,13 +43,13 @@
+ (cadr (car script)))
+
+ (defun move-script ()
+- (declare (special name script endp))
++ (declare (special name script donep))
+ (when (null script)
+- (if endp
++ (if donep
+ (throw 'script-ended nil)
+ (error "Regression test ~s fell off of end of script." name)))
+ (pop script)
+- (when (and (null script) endp) (throw 'script-ended nil))
++ (when (and (null script) donep) (throw 'script-ended nil))
+ (values))
+
+ (defmacro regression-test-only (key &body body)
+@@ -164,7 +164,7 @@
+ :name "Regressible-error should succeed."
+ :form '(regressible-error :test "Error message ~s." 'foo)
+ :script '((:test "Error message FOO."))
+- :endp t)
++ :donep t)
+
+ #+regression
+ (regression-test
+diff -durN pvs-sbcl-4.2.ORIG/ess/term/language/rel/languages.lisp pvs-sbcl-4.2/ess/term/language/rel/languages.lisp
+--- pvs-sbcl-4.2.ORIG/ess/term/language/rel/languages.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/term/language/rel/languages.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -85,18 +85,18 @@
+
+
+
+-(defconstant standard-use-packages
++(defconstant-if-unbound standard-use-packages
+ '("ERGOLISP" "OPER" "OCC" "TERM" "SORT" "SB-RUNTIME" "LANG" "NEWATTR")
+ "The standard packages used by SB output files.")
+
+-(defconstant standard-use-languages
++(defconstant-if-unbound standard-use-languages
+ '("LEXICAL-TERMINALS")
+ "The standard languages used by SB output files.")
+
+
+-(defconstant gen-src-file-ext "lisp")
++(defconstant-if-unbound gen-src-file-ext "lisp")
+
+-(defconstant per-gen-src-file-ext
++(defconstant-if-unbound per-gen-src-file-ext
+ (concatenate 'string "." gen-src-file-ext))
+
+
+diff -durN pvs-sbcl-4.2.ORIG/ess/term/trep/rel/attr-prims.lisp pvs-sbcl-4.2/ess/term/trep/rel/attr-prims.lisp
+--- pvs-sbcl-4.2.ORIG/ess/term/trep/rel/attr-prims.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/term/trep/rel/attr-prims.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -19,7 +19,11 @@
+ ;;; features from the terms, so it is the default method for storing
+ ;;; attributes.
+
+-(in-package "TERM" :nicknames '("GTERM")) (use-package :ergolisp)
++(eval-when (compile load eval)
++ (unless (find-package "TERM")
++ (make-package "TERM" :nicknames '("GTERM")
++ :use '(:cl-user :common-lisp :ergolisp))))
++(in-package "TERM")
+
+ (export '(attr-clear-one attr-clear-all))
+
+diff -durN pvs-sbcl-4.2.ORIG/ess/term/trep/rel/gterm.lisp pvs-sbcl-4.2/ess/term/trep/rel/gterm.lisp
+--- pvs-sbcl-4.2.ORIG/ess/term/trep/rel/gterm.lisp 2007-07-02 14:07:41.000000000 -0600
++++ pvs-sbcl-4.2/ess/term/trep/rel/gterm.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -29,7 +29,11 @@
+ ;;; instead of a real operator.
+ ;;;
+
+-(in-package :term :nicknames '(:gterm)) (use-package :ergolisp)
++(eval-when (compile load eval)
++ (unless (find-package "TERM")
++ (make-package "TERM" :nicknames '("GTERM")
++ :use '(:cl-user :common-lisp :ergolisp))))
++(in-package "TERM")
+
+ (export '(term termp mk-term ds-term term-op term-args
+ term-attr set-term-attr))
+diff -durN pvs-sbcl-4.2.ORIG/Makefile.in pvs-sbcl-4.2/Makefile.in
+--- pvs-sbcl-4.2.ORIG/Makefile.in 2008-07-20 02:58:09.000000000 -0600
++++ pvs-sbcl-4.2/Makefile.in 2008-11-04 20:52:16.000000000 -0700
+@@ -90,18 +90,18 @@
+ endif
+ endif
+
+-# ifneq ($(SBCL_HOME),)
+-# # Check that the given SBCL_HOME works
+-# SBCLISPEXE = $(SBCL_HOME)/bin/lisp
+-# ifeq ($(shell if [ -x "$(SBCLISPEXE)" ]; then echo OK; fi),OK)
+-# SBCLVERSION = $(shell $(SBCL_HOME)/bin/lisp -batch -eval '(progn (format t "~a" (lisp-implementation-version)) (terpri) (quit))')
+-# $(warning "SBCL Version $(SBCLVERSION)")
+-# sbcl-devel += $(bindir)/devel/$(SYSTEM)-sbclisp
+-# sbcl-rt += $(bindir)/runtime/$(SYSTEM)-sbclisp
+-# else
+-# $(error "$(SBCLISPEXE) is not executable")
+-# endif
+-# endif
++ifneq ($(SBCLISP_HOME),)
++# Check that the given SBCLISP_HOME works
++SBCLISPEXE = $(SBCLISP_HOME)/bin/sbcl
++ifeq ($(shell if [ -x "$(SBCLISPEXE)" ]; then echo OK; fi),OK)
++SBCLVERSION = $(shell $(SBCLISPEXE) --version)
++$(warning "$(SBCLVERSION)")
++sbcl-devel += $(bindir)/devel/$(SYSTEM)-sbclisp
++sbcl-rt += $(bindir)/runtime/$(SYSTEM)-sbclisp
++else
++$(error "$(SBCLISPEXE) is not executable")
++endif
++endif
+
+
+ LOAD-FOREIGN-EXTENSION=so
+@@ -342,6 +342,7 @@
+ src/tex-support.lisp \
+ src/raw-api.lisp
+
++sbcllisp += src/utils/file-utils-sbcl.lisp
+ cmulisp += src/utils/file-utils-cmu.lisp
+ allegrolisp += src/utils/file-utils.lisp
+
+@@ -372,6 +373,7 @@
+
+ bddlisp = BDD/bdd.lisp BDD/mu.lisp
+ allegrolisp += BDD/bdd-allegro.lisp BDD/mu-allegro.lisp
++sbcllisp += BDD/bdd-sbcl.lisp BDD/mu-sbcl.lisp
+ cmulisp += BDD/bdd-cmu.lisp BDD/mu-cmu.lisp
+
+ PVSiolisp = src/PVSio/pvs-lib.lisp src/PVSio/defattach.lisp \
+@@ -423,6 +425,7 @@
+ groundevallisp := $(patsubst %,$(PVSPATH)%,$(groundevallisp))
+ inst-by-unif-lisp := $(patsubst %,$(PVSPATH)%,$(inst-by-unif-lisp))
+ allegrolisp := $(patsubst %,$(PVSPATH)%,$(allegrolisp))
++sbcllisp := $(patsubst %,$(PVSPATH)%,$(sbcllisp))
+ cmulisp := $(patsubst %,$(PVSPATH)%,$(cmulisp))
+ endif
+
+@@ -437,16 +440,16 @@
+ .PHONY : all devel runtime parser emacs prelude-files-and-regions etags
+
+ ifneq ($(buildcmds),)
+-ifeq ($(CMULISP_HOME)$(ALLEGRO_HOME),)
+-$(error "Must set CMULISP_HOME or ALLEGRO_HOME")
++ifeq ($(SBCLISP_HOME)$(CMULISP_HOME)$(ALLEGRO_HOME),)
++$(error "Must set SBCLISP_HOME, CMULISP_HOME, or ALLEGRO_HOME")
+ endif
+ endif
+
+ all : devel runtime prelude-files-and-regions $(emacs-elc) etags
+
+-devel : $(allegro-devel) $(cmulisp-devel)
++devel : $(allegro-devel) $(sbcl-devel) $(cmulisp-devel)
+
+-runtime : $(allegro-rt) $(cmulisp-rt)
++runtime : $(allegro-rt) $(sbcl-rt) $(cmulisp-rt)
+
+ parser : pvs-parser-out
+
+@@ -454,8 +457,8 @@
+
+ etags : $(PVSPATH)TAGS
+
+-$(PVSPATH)TAGS : $(lisp-files) $(allegrolisp) $(cmulisp) $(pvs-emacs-src)
+- $(ETAGS) $(lisp-files) $(allegrolisp) $(cmulisp) $(pvs-emacs-src)
++$(PVSPATH)TAGS : $(lisp-files) $(allegrolisp) $(sbcllisp) $(cmulisp) $(pvs-emacs-src)
++ $(ETAGS) $(lisp-files) $(allegrolisp) $(sbcllisp) $(cmulisp) $(pvs-emacs-src)
+
+ fileutils = \
+ $(PVSPATH)src/utils/$(PLATFORM)/file_utils.$(LOAD-FOREIGN-EXTENSION) \
+@@ -472,6 +475,56 @@
+ # Here are the rules for building the PVS grammar, pvs-methods file, and
+ # devel and runtime images.
+
++ifneq ($(SBCLISP_HOME),)
++
++ifeq ($(ALLEGRO_HOME),) # Build these with Allegro, if available
++$(PVSPATH)src/pvs-lexer.lisp : $(pvs-parser-in)
++ @echo "******* Creating parser"
++ $(SBCLISPEXE) --load src/make-pvs-parser
++
++$(PVSPATH)src/pvs-methods.lisp : $(PVSPATH)src/make-pvs-methods.lisp \
++ $(PVSPATH)src/defcl.lisp \
++ $(PVSPATH)src/classes-expr.lisp \
++ $(PVSPATH)src/classes-decl.lisp
++ @echo "******* Creating pvs-methods.lisp"
++ $(SBCLISPEXE) --eval "(defvar *pvs-path* \"$(PVSPATH)\")" \
++ --load src/make-pvs-methods.lisp
++endif
++
++$(sbcl-devel) $(sbcl-rt) : $(image-deps) \
++ $(pvs-make-files) $(ess) $(ff-files) \
++ $(lisp-files) $(sbcllisp) \
++ $(PVSPATH)lib/prelude.pvs $(PVSPATH)lib/prelude.prf
++ $(MKDIR) -p $(subst $(SYSTEM)-sbclisp,,$@)
++ @echo "******* Compiling PVS files in Steel Bank Common Lisp (SBCL)"
++ $(SBCLISPEXE) --eval '(require :sb-posix)' \
++ --eval '(require :sb-md5)' \
++ --eval '(load "pvs.system" :verbose t)' \
++ --eval "(let ((*load-pvs-prelude* nil)) \
++ (mk:operate-on-system :pvs :compile))" \
++ --eval '(quit)'
++ cp $(PVSPATH)src/utils/$(PLATFORM)/b64 $(bindir)
++ @echo "******* Building PVS image $@"
++ $(SBCLISPEXE) --eval '(require :sb-posix)' \
++ --eval '(require :sb-md5)' \
++ --eval '(load "pvs.system" :verbose t)' \
++ --eval "(unwind-protect \
++ (mk:operate-on-system :pvs :compile) \
++ (save-lisp-and-die \"$@.core\" \
++ :toplevel (function startup-pvs) \
++ ))"
++ -rm $(PVSPATH)BDD/$(PLATFORM)/bdd-sbcl.*
++ cp $(SBCLISPEXE) $(subst $(SYSTEM)-sbclisp,,$@)
++ cp $(PVSPATH)BDD/$(PLATFORM)/mu.$(LOAD-FOREIGN-EXTENSION) $(subst $(SYSTEM)-sbclisp,,$@)
++ cp $(PVSPATH)BDD/bdd-sbcl.lisp $(PVSPATH)BDD/mu-sbcl.lisp $(subst $(SYSTEM)-sbclisp,,$@)
++ cp $(PVSPATH)src/WS1S/$(PLATFORM)/ws1s.$(LOAD-FOREIGN-EXTENSION) $(subst $(SYSTEM)-sbclisp,,$@)
++ cp $(PVSPATH)src/WS1S/lisp/dfa-foreign-sbcl.lisp $(subst $(SYSTEM)-sbclisp,,$@)
++ cp $(PVSPATH)src/utils/$(PLATFORM)/b64 $(bindir)
++ echo "#!/bin/sh" > $@
++ echo "sbcl --core \`dirname \$$0\`/\`basename \$$0\`.core \$$*" >> $@
++ chmod a+x $@
++endif
++
+ ifneq ($(CMULISP_HOME),)
+
+ ifeq ($(ALLEGRO_HOME),) # Build these with Allegro, if available
+@@ -617,7 +670,7 @@
+
+ faslexts = fasl,rfasl,hfasl,lfasl,mfasl,nfasl,sbin,obin,rbin,mbin,x86f,ppcf,sparcf,x8664s,x86s,ppcs,sparcs,clfasl,wfasl,err
+
+-platforms = ix86-Linux,ix86-MacOSX,powerpc-MacOSX,powerpc-MacOSX,sun4-SunOS5
++platforms = ix86-Linux,ix86_64-Linux,ix86-MacOSX,powerpc-MacOSX,powerpc-MacOSX,sun4-SunOS5
+ # HT: Need to put a comma in a variable, because a literal
+ # comma cannot appear in a makefile function argument.
+ comma:= ,
+diff -durN pvs-sbcl-4.2.ORIG/pvs-config.lisp pvs-sbcl-4.2/pvs-config.lisp
+--- pvs-sbcl-4.2.ORIG/pvs-config.lisp 2008-07-20 02:40:19.000000000 -0600
++++ pvs-sbcl-4.2/pvs-config.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -99,7 +99,7 @@
+
+ #+sbcl
+ (defun bye (&optional (exit-status 0))
+- (sb-unix:unix-exit exit-status))
++ (quit :unix-status exit-status))
+
+ (defun pvs-version-and-quit ()
+ (format t "PVS Version ~a" (eval (find-symbol (string :*pvs-version*) :pvs)))
+diff -durN pvs-sbcl-4.2.ORIG/pvs.in pvs-sbcl-4.2/pvs.in
+--- pvs-sbcl-4.2.ORIG/pvs.in 2008-07-20 02:48:14.000000000 -0600
++++ pvs-sbcl-4.2/pvs.in 2008-11-04 20:52:16.000000000 -0700
+@@ -11,7 +11,7 @@
+ # -version | --version prints the PVS version
+ # -emacs emacsref emacs, xemacs, alias, or pathname
+ # -load-after efile loads emacs file name after PVS emacs files
+-# -lisp name lisp image name - allegro or cmulisp
++# -lisp name lisp image name - allegro, cmulisp, or sbclisp
+ # -runtime use the runtime image (devel is default, if there)
+ # -decision-procedures set the default decision procedures (ics or shostak)
+ # -force-decision-procedures forces the decision procedures to be used
+@@ -42,10 +42,10 @@
+ # PVSVERBOSE - corresponds to the -v argument
+ #
+ # The following environment variables are used by PVS, and are set below:
+-# PVSPATH pvs system path - this should not normally be set by the user
+-# PVSARCH sun4 or ix86
++# PVSPATH pvs system path - this should not normally be set by the user
++# PVSARCH sun4, ix86, ix86_64, or powerpc
+ #
+-# The PVS binary paths are appended to the front of the PATH variable
++# The PVS binary paths are appended to the front of the PATH variable
+ # --------------------------------------------------------------------
+ # PVS
+ # Copyright (C) 2006, SRI International. All Rights Reserved.
+@@ -98,7 +98,8 @@
+ case $2 in
+ allegro) PVSLISP=allegro;;
+ cmulisp) PVSLISP=cmulisp;;
+- *) echo "Only allegro and cmulisp are currently available"
++ sbclisp) PVSLISP=sbclisp;;
++ *) echo "Only allegro, cmulisp, and sbclisp are currently available"
+ exit 1;;
+ esac
+ shift;;
+@@ -170,7 +171,7 @@
+ -version | --version show the PVS version number
+ -emacs emacsref emacs, xemacs, alias, or pathname
+ -load-after efile loads emacs file after PVS emacs files
+- -lisp name lisp image name (allegro or cmulisp)
++ -lisp name lisp image name (allegro, cmulisp, or sbclisp)
+ -runtime use the runtime image
+ -decision-procedures set default decision procedures (ics or shostak)
+ -force-decision-procedures forces the decision procedures (ics or shostak)
+@@ -198,13 +199,17 @@
+ case $opsys in
+ SunOS) majvers=`uname -r | cut -d"." -f1`
+ if [ $majvers = 4 ]
+- then echo "PVS 3.3 only runs under Mac OS X, Linux, FreeBSD, or Solaris"; exit 1
++ then echo "PVS 4.2 only runs under Mac OS X, Linux, FreeBSD, or Solaris"; exit 1
+ fi
+ PVSARCH=sun4;;
+ Linux) # If Linux, we need to determine the Redhat version to use.
+ opsys=Linux
+ majvers=
+- PVSARCH=ix86
++ case `uname -m` in
++ x86) PVSARCH=ix86 ;;
++ x86_64) PVSARCH=ix86_64 ;;
++ *) echo "PVS 4.2 only runs on Intel Linux"; exit 1
++ esac
+ # Allegro does not work with Linux's New Posix Thread Library (NPTL)
+ # used in newer Red Hat kernels and 2.6 kernels. This will force
+ # the old thread-implementation.
+@@ -215,7 +220,11 @@
+ ;;
+ FreeBSD) opsys=Linux
+ majvers=
+- PVSARCH=ix86
++ case `uname -m` in
++ x86) PVSARCH=ix86 ;;
++ x86_64) PVSARCH=ix86_64 ;;
++ *) echo "PVS 4.2 only runs on Intel Linux"; exit 1
++ esac
+ # Allegro does not work with Linux's New Posix Thread Library (NPTL)
+ # used in newer Red Hat kernels and 2.6 kernels. This will force
+ # the old thread-implementation.
+@@ -233,13 +242,13 @@
+ #majvers=`uname -r | cut -d"." -f1`
+ majvers=
+ ;;
+- *) echo "PVS 3.3 only runs under Solaris, Linux, FreeBSD (linux-enabled), or Mac (Darwin 7.4)"; exit 1
++ *) echo "PVS 4.2 only runs under Solaris, Linux, FreeBSD (linux-enabled), or Mac (Darwin 7.4)"; exit 1
+ esac
+
+ binpath=$PVSPATH/bin/$PVSARCH-$opsys${majvers}
+
+-if [ -n "$PVSLISP" -a "$PVSLISP" != "allegro" -a "$PVSLISP" != "cmulisp" ]
+- then echo "ERROR: PVSLISP must be unset, or set to 'allegro' or 'cmulisp'"
++if [ -n "$PVSLISP" -a "$PVSLISP" != "allegro" -a "$PVSLISP" != "cmulisp" -a "$PVSLISP" != "sbclisp" ]
++ then echo "ERROR: PVSLISP must be unset, or set to 'allegro', 'cmulisp', or 'sbclisp'"
+ exit 1
+ fi
+
+@@ -252,6 +261,10 @@
+ then PVSLISP=cmulisp
+ elif [ -x $binpath/runtime/pvs-cmulisp ]
+ then PVSLISP=cmulisp
++ elif [ -x $binpath/devel/pvs-sbclisp ]
++ then PVSLISP=sbclisp
++ elif [ -x $binpath/runtime/pvs-sbclisp ]
++ then PVSLISP=sbclisp
+ else echo "No executable available in $binpath"
+ exit 1
+ fi
+@@ -292,6 +305,16 @@
+ do flags="$flags -load $lf"; done
+ fi
+ ;;
++ sbclisp)
++ noinit="--noinform --no-userinit"
++ evalflag="--eval"
++ if [ -n "$lisploadfiles" ]
++ then
++ flags="$flags --eval (pvs::pvs-init)"
++ for lf in $lisploadfiles
++ do flags="$flags --load $lf"; done
++ fi
++ ;;
+ esac
+
+ PVSPATCHLEVEL=${PVSPATCHLEVEL:-2}
+diff -durN pvs-sbcl-4.2.ORIG/pvsio.in pvs-sbcl-4.2/pvsio.in
+--- pvs-sbcl-4.2.ORIG/pvsio.in 2007-11-09 13:39:43.000000000 -0700
++++ pvs-sbcl-4.2/pvsio.in 2008-11-04 20:52:16.000000000 -0700
+@@ -22,7 +22,7 @@
+ -T|--timing print timing information for each evaluation
+ -v|--version print PVSio version
+ -V|--verbose print typechecking information
+- -l|--lisp PVS lisp version [allegro,cmulisp]
++ -l|--lisp PVS lisp version [allegro,cmulisp,sbclisp]
+ <file>@<theory>:<main> load <theory> from <file>.pvs, evaluate <main>,
+ and exit
+
+@@ -42,7 +42,8 @@
+ case $2 in
+ allegro) PVSLISP='-lisp allegro';;
+ cmulisp) PVSLISP='-lisp cmulisp';;
+- *) echo "Only allegro and cmulisp are currently available"
++ sbclisp) PVSLISP='-lisp sbclisp';;
++ *) echo "Only allegro, cmulisp, and sbclisp are currently available"
+ exit 1;;
+ esac
+ shift;;
+diff -durN pvs-sbcl-4.2.ORIG/pvs.system pvs-sbcl-4.2/pvs.system
+--- pvs-sbcl-4.2.ORIG/pvs.system 2007-09-19 23:19:31.000000000 -0600
++++ pvs-sbcl-4.2/pvs.system 2008-11-04 20:52:16.000000000 -0700
+@@ -25,6 +25,16 @@
+ ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ ;; --------------------------------------------------------------------
+
++(in-package :common-lisp)
++
++(#-(or cmu sbcl) progn
++ #+cmu ext:without-package-locks
++ #+sbcl sb-ext:without-package-locks
++ (defmacro defconstant-if-unbound (name value &optional doc)
++ `(defconstant ,name (if (boundp ',name) (symbol-value ',name) ,value)
++ ,@(when doc (list doc))))
++ (export 'defconstant-if-unbound))
++
+ (in-package :cl-user)
+
+ #+allegro
+@@ -46,9 +56,11 @@
+ #+sbcl
+ (defun startup-pvs ()
+ (in-package :pvs)
+- ;; Can't directly call (pvs::pvs-init)
+- (apply (find-symbol (string :pvs-init) :pvs) nil)
+- )
++ ;; Turn off compiler warnings
++ (handler-bind ((sb-ext:compiler-note #'muffle-warning))
++ ;; Can't directly call (pvs::pvs-init)
++ (apply (find-symbol (string :pvs-init) :pvs) nil)
++ (sb-impl::toplevel-init)))
+
+ #+allegro
+ (eval-when (eval load)
+@@ -59,12 +71,17 @@
+ excl:*enclose-printer-errors* nil
+ *print-pretty* t))
+
++#+sbcl
++(eval-when (eval load)
++ (setq *compile-verbose* nil)
++ (setq *compile-print* nil))
++
+ (eval-when (eval load)
+ ;; This sets *pvs-path* and sets *pvs-binary-type*
+ (load "pvs-config.lisp")
+ #+allegro (chdir *pvs-path*))
+
+-(defpackage :ilisp)
++(defpackage :ilisp (:nicknames :ILISP) (:use :common-lisp #+:CMU :conditions))
+ (defpackage :bvec)
+
+ (unless (find-package :make)
+@@ -181,7 +198,11 @@
+ (load (format nil "~a/src/xp" *pvs-path*))
+ #+gcl
+ (load (format nil "~a/src/xp-code" *pvs-path*))
+- (apply (find-symbol :install :xp) :package :pvs nil))
++ #-sbcl
++ (apply (find-symbol :install :xp) :package :pvs nil)
++ #+sbcl
++ (apply (find-symbol "INSTALL" (find-package :xp))
++ :package :pvs nil))
+ #-(or cmu sbcl)
+ (load (format nil "~a/ess/dist-ess.lisp" *pvs-path*))
+ #-gcl
+@@ -215,6 +236,7 @@
+ (let* ((platform #+(and sun4 sunos4) "sun4-SunOS4"
+ #+(and sun4 (not sunos4)) "sun4-SunOS5"
+ #+(and x86 (not macosx)) "ix86-Linux"
++ #+(and x86-64 (not macosx)) "ix86_64-Linux"
+ #+(and macosx powerpc) "powerpc-MacOSX"
+ #+(and macosx x86) "ix86-MacOSX")
+ (utilpath (concatenate 'string
+@@ -281,7 +303,9 @@
+ :components ((:file "hashfn")
+ #+allegro
+ (:file "file-utils")
+- #+(or cmu sbcl)
++ #+sbcl
++ (:file "file-utils-sbcl")
++ #+cmu
+ (:file "file-utils-cmu")))
+ (:module language
+ :source-pathname "src/"
+diff -durN pvs-sbcl-4.2.ORIG/src/abstraction/abstract.lisp pvs-sbcl-4.2/src/abstraction/abstract.lisp
+--- pvs-sbcl-4.2.ORIG/src/abstraction/abstract.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/abstraction/abstract.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -27,7 +27,7 @@
+ ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ ;; --------------------------------------------------------------------
+
+-(in-package 'pvs)
++(in-package :pvs)
+
+
+ (defvar *abs-cache+* nil)
+diff -durN pvs-sbcl-4.2.ORIG/src/classes-decl.lisp pvs-sbcl-4.2/src/classes-decl.lisp
+--- pvs-sbcl-4.2.ORIG/src/classes-decl.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/classes-decl.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -141,7 +141,7 @@
+ type-name type-name? type-value types update-expr using-hash
+ var-decl visible?))
+ #+(or cmu sbcl)
+-(ext:without-package-locks
++(#-sbcl ext:without-package-locks #+sbcl sb-ext:without-package-locks
+ (defgeneric class (x))
+ (defgeneric (setf class) (x y))
+ (defgeneric keyword (x))
+@@ -338,6 +338,9 @@
+ ;;; unparser. The type is set by the typechecker to the canonical value
+ ;;; of the declared-type.
+
++(
++ #-sbcl progn
++ #+sbcl sb-ext:without-package-locks
+ (defcl declaration (syntax)
+ (newline-comment :restore-as nil)
+ (id :type (or symbol number) :parse t :restore-as nil)
+@@ -353,6 +356,7 @@
+ (semi :parse t :restore-as nil)
+ (tcc-form :fetch-as nil :ignore t)
+ (typecheck-time :restore-as nil))
++)
+
+ ;;; declared-type-string keeps the string of the declared type for
+ ;;; creating the pvs context - see create-declaration-entry
+diff -durN pvs-sbcl-4.2.ORIG/src/classes-expr.lisp pvs-sbcl-4.2/src/classes-expr.lisp
+--- pvs-sbcl-4.2.ORIG/src/classes-expr.lisp 2007-10-10 18:11:41.000000000 -0600
++++ pvs-sbcl-4.2/src/classes-expr.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -35,7 +35,7 @@
+ propositional-application))
+
+ #+(or cmu sbcl)
+-(ext:without-package-locks
++(#-sbcl ext:without-package-locks #+sbcl sb-ext:without-package-locks
+ (defgeneric type (x))
+ (defgeneric (setf type) (x y))
+ (defgeneric number (x))
+@@ -45,7 +45,7 @@
+
+ #+(or cmu sbcl)
+ ;; This is actually defined in utils, but convenient to add here
+-(ext:without-package-locks
++(#-sbcl ext:without-package-locks #+sbcl sb-ext:without-package-locks
+ (defgeneric condition (x)))
+
+ ;;; Provide a class on which to hang syntactic information
+@@ -172,8 +172,13 @@
+ ;; When an extraction-expr is used as a conversion
+ (defcl extraction-conversion (extraction-application))
+
++#-sbcl
+ (defcl number-expr (expr)
+ (number :type integer :parse t :restore-as nil))
++#+sbcl
++(sb-ext:without-package-locks
++ (defcl number-expr (expr)
++ (number :type integer :parse t :restore-as nil)))
+
+ ;; This is for integers of the form xxx.000, where the fractional part is
+ ;; all zeros. We keep it as a number expr, but store the number of zeros so
+@@ -529,10 +534,17 @@
+ ;;; resolution. The inclusions are the predicates which will become
+ ;;; TCCs if that particular resolution is chosen.
+
++#-sbcl
+ (defcl resolution ()
+ (declaration :restore-as nil)
+ module-instance
+ type)
++#+sbcl
++(sb-ext:without-package-locks
++ (defcl resolution ()
++ (declaration :restore-as nil)
++ module-instance
++ type))
+
+ ;(defcl judgement-resolution (resolution)
+ ; judgement-type
+diff -durN pvs-sbcl-4.2.ORIG/src/context.lisp pvs-sbcl-4.2/src/context.lisp
+--- pvs-sbcl-4.2.ORIG/src/context.lisp 2008-05-11 14:34:50.000000000 -0600
++++ pvs-sbcl-4.2/src/context.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -402,8 +402,9 @@
+ subdir))
+ (multiple-value-bind (result err)
+ (ignore-lisp-errors #+allegro (excl:make-directory subdir)
+- #+(or cmu sbcl)
+- (unix:unix-mkdir (namestring subdir) #o777))
++ #+cmu (unix:unix-mkdir (namestring subdir) #o777)
++ #+sbcl
++ (sb-unix:unix-mkdir (namestring subdir) #o777))
+ (cond (result (pvs-message "Created directory ~a" subdir)
+ t)
+ (t (pvs-message "Error creating ~a: ~a" subdir err)
+@@ -534,7 +535,7 @@
+
+ #+(or cmu sbcl)
+ (defun md5-file (file)
+- (let ((digest (md5:md5sum-file file))
++ (let ((digest (#+cmu md5:md5sum-file #+sbcl sb-md5:md5sum-file file))
+ (sum 0))
+ (loop for x across digest
+ do (setq sum (+ (* sum 256) x)))
+diff -durN pvs-sbcl-4.2.ORIG/src/datatype.lisp pvs-sbcl-4.2/src/datatype.lisp
+--- pvs-sbcl-4.2.ORIG/src/datatype.lisp 2008-05-11 14:36:59.000000000 -0600
++++ pvs-sbcl-4.2/src/datatype.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -203,7 +203,8 @@
+ (checksum-ok? (and adt-ce
+ file-exists?
+ (equal #+allegro (excl:md5-file adt-path)
+- #-allegro (md5:md5sum-file adt-path)
++ #+sbcl (sb-md5:md5sum-file adt-path)
++ #-(or allegro sbcl) (md5:md5sum-file adt-path)
+ (ce-md5sum adt-ce)))))
+ (unless (and file-exists?
+ ce
+diff -durN pvs-sbcl-4.2.ORIG/src/defcl.lisp pvs-sbcl-4.2/src/defcl.lisp
+--- pvs-sbcl-4.2.ORIG/src/defcl.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/defcl.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -51,11 +51,13 @@
+ (defmacro defcl (name classes &rest args)
+ (setf args (mapcar #'(lambda (a) (if (consp a) a (list a))) args))
+ `(progn ,@(mapcar #'(lambda (a)
+- #+allegro `(declaim (ftype (function
++ #+(or allegro sbcl)
++ `(declaim (ftype (function
+ (t)
+ ,(cadr (member :type a)))
+ ,(car a)))
+- #-allegro `(proclaim '(function ,(car a) (t)
++ #-(or allegro sbcl)
++ `(proclaim '(function ,(car a) (t)
+ ,(cadr (member :type a)))))
+ (remove-if-not #'(lambda (a) (member :type a))
+ args))
+diff -durN pvs-sbcl-4.2.ORIG/src/defsystem.lisp pvs-sbcl-4.2/src/defsystem.lisp
+--- pvs-sbcl-4.2.ORIG/src/defsystem.lisp 2007-07-06 13:08:53.000000000 -0600
++++ pvs-sbcl-4.2/src/defsystem.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -4796,7 +4796,7 @@
+ :loader #+:lucid #'load-foreign-files
+ #+:allegro #'load
+ #+(or :cmu :scl) #'alien:load-foreign
+- #+:sbcl #'sb-alien:load-foreign
++ #+:sbcl #'sb-alien:load-shared-object
+ #+(and :lispworks :unix (not :linux) (not :macosx)) #'link-load:read-foreign-modules
+ #+(and :lispworks :unix (or :linux :macosx)) #'fli:register-module
+ #+(and :lispworks :win32) #'fli:register-module
+diff -durN pvs-sbcl-4.2.ORIG/src/globals.lisp pvs-sbcl-4.2/src/globals.lisp
+--- pvs-sbcl-4.2.ORIG/src/globals.lisp 2008-07-17 12:12:19.000000000 -0600
++++ pvs-sbcl-4.2/src/globals.lisp 2008-11-04 20:54:30.000000000 -0700
+@@ -346,7 +346,9 @@
+ (pprint-indent :block 0)
+ (loop (pprint-exit-if-list-exhausted)
+ (write (pprint-pop) :stream stream :escape nil :pretty nil
+- :pprint-dispatch nil)
++ :pprint-dispatch #-sbcl nil
++ #+sbcl (sb-pretty::make-pprint-dispatch-table)
++ )
+ (pprint-exit-if-list-exhausted)
+ (pprint-newline :mandatory stream)))))
+
+@@ -385,6 +387,7 @@
+
+ (defvar *use-default-dp?* nil)
+ (defvar *prover-print-lines* nil)
++#-sbcl
+ (defvar *print-lines* nil)
+
+ (defvar *substit-dont-simplify* nil)
+diff -durN pvs-sbcl-4.2.ORIG/src/groundeval/ground-expr.lisp pvs-sbcl-4.2/src/groundeval/ground-expr.lisp
+--- pvs-sbcl-4.2.ORIG/src/groundeval/ground-expr.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/groundeval/ground-expr.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -29,7 +29,7 @@
+ ; -- no free variables
+ ;
+
+-(in-package 'pvs)
++(in-package :pvs)
+
+ (defun ground-expr? (expr)
+ (assert (type expr))
+diff -durN pvs-sbcl-4.2.ORIG/src/groundeval/pvs2clean.lisp pvs-sbcl-4.2/src/groundeval/pvs2clean.lisp
+--- pvs-sbcl-4.2.ORIG/src/groundeval/pvs2clean.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/groundeval/pvs2clean.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -138,7 +138,7 @@
+
+ (defmethod pvs2clean* ((expr projection-application) bindings livevars)
+ (let* ((ll (length (exprs expr)))
+- (dummy (gentemp 'ddd))
++ (dummy (gentemp "DDD"))
+ (match-list (pvs2clean_tuple (matchlist (index expr) ll dummy)))
+ (expr-list (pvs2clean* expr bindings livevars)))
+ `(let ,match-list = ,expr-list in ,dummy)))
+diff -durN pvs-sbcl-4.2.ORIG/src/groundeval/pvseval-update.lisp pvs-sbcl-4.2/src/groundeval/pvseval-update.lisp
+--- pvs-sbcl-4.2.ORIG/src/groundeval/pvseval-update.lisp 2007-12-01 16:04:01.000000000 -0700
++++ pvs-sbcl-4.2/src/groundeval/pvseval-update.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -47,7 +47,7 @@
+ (if (special-variable-p id)
+ (let ((lid (gethash id *lisp-id-hash*)))
+ (or lid
+- (let ((new-lid (intern (gensym (string id)))))
++ (let ((new-lid (intern (symbol-name (gensym (string id))))))
+ (setf (gethash id *lisp-id-hash*) new-lid)
+ new-lid)))
+ id))
+@@ -1779,7 +1779,7 @@
+ :if-exists
+ (if supersede? :supersede :append)
+ :if-does-not-exist :create)
+- (when supersede? (format output "(in-package 'PVS)~%"))
++ (when supersede? (format output "(in-package :pvs)~%"))
+ (print-lisp-defns-to-output (get-theory theory) output))
+ (print-lisp-defns-to-output (get-theory theory) nil)))
+
+diff -durN pvs-sbcl-4.2.ORIG/src/groundeval/static-update.lisp pvs-sbcl-4.2/src/groundeval/static-update.lisp
+--- pvs-sbcl-4.2.ORIG/src/groundeval/static-update.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/groundeval/static-update.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -42,7 +42,7 @@
+ ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ ;; --------------------------------------------------------------------
+
+-(in-package 'pvs)
++(in-package :pvs)
+
+ (defmethod updateable? ((texpr tupletype))
+ (updateable? (types texpr)))
+diff -durN pvs-sbcl-4.2.ORIG/src/ground-prover/prglobals.lisp pvs-sbcl-4.2/src/ground-prover/prglobals.lisp
+--- pvs-sbcl-4.2.ORIG/src/ground-prover/prglobals.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/ground-prover/prglobals.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -46,7 +46,7 @@
+ (defconstant true 'true )
+ (defconstant false 'false )
+
+-(defconstant primtypealist
++(defconstant-if-unbound primtypealist
+ '((true . bool)
+ (false . bool)
+ (and . bool)
+@@ -139,16 +139,16 @@
+
+ ;;; the following special declarations are rather offensive:
+
+-(proclaim '(special const sum u s eq lit var coef product ineqpot ))
++(proclaim '(special const sum u s #-sbcl eq lit var coef product ineqpot ))
+
+
+ ;;; the following (til end-of-file) are taken from prpp:
+
+-(defconstant *infixlist* ;temporary list of infixes
++(defconstant-if-unbound *infixlist* ;temporary list of infixes
+ '(equal nequal lessp greaterp lesseq lesseqp greatereq greatereqp
+ PLUS MINUS TIMES DIVIDE DIFFERENCE) )
+
+-(defconstant precedence-alist
++(defconstant-if-unbound precedence-alist
+ '((iff 1)
+ (implies 2)
+ (or 3)
+diff -durN pvs-sbcl-4.2.ORIG/src/ground-prover/prmacros.lisp pvs-sbcl-4.2/src/ground-prover/prmacros.lisp
+--- pvs-sbcl-4.2.ORIG/src/ground-prover/prmacros.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/ground-prover/prmacros.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -55,21 +55,21 @@
+ (defun prerr (&rest args)
+ (apply #'error args))
+
+-(defconstant *truecons* '(true))
++(defconstant-if-unbound *truecons* '(true))
+
+-(defconstant *eqarithrels* '(greatereqp lesseqp))
++(defconstant-if-unbound *eqarithrels* '(greatereqp lesseqp))
+
+ (defconstant *ifops* nil ;;'(if if*)
+ )
+
+-(defconstant *boolconstants* '(false true))
++(defconstant-if-unbound *boolconstants* '(false true))
+
+-(defconstant *arithrels* '(lessp lesseqp greaterp greatereqp))
++(defconstant-if-unbound *arithrels* '(lessp lesseqp greaterp greatereqp))
+
+-(defconstant *arithops* '(PLUS TIMES DIFFERENCE MINUS))
++(defconstant-if-unbound *arithops* '(PLUS TIMES DIFFERENCE MINUS))
+
+-(defconstant *boolops* '(and or implies not ;;if
+- iff))
++(defconstant-if-unbound *boolops* '(and or implies not ;;if
++ iff))
+
+ (defmacro singleton? (obj)
+ `(and (consp ,obj) (null (cdr ,obj))))
+diff -durN pvs-sbcl-4.2.ORIG/src/interface/pvs-emacs.lisp pvs-sbcl-4.2/src/interface/pvs-emacs.lisp
+--- pvs-sbcl-4.2.ORIG/src/interface/pvs-emacs.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/interface/pvs-emacs.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -66,11 +66,15 @@
+ *noninteractive-timeout*
+ ,(not (and (listp form)
+ (memq (car form) *prover-invoking-commands*))))
+- #-(or multiprocessing mp) nil
++ #-(or multiprocessing mp sbcl) nil
+ #+(or multiprocessing mp)
+ (mp:with-timeout (*noninteractive-timeout*
+ (format t "Timed out!"))
+ ,form)
++ #+sbcl
++ (sb-ext:with-timeout *noninteractive-timeout*
++ (handler-case ,form
++ (sb-ext:timeout () (format t "Timed out!"))))
+ ,form))
+ (string (error)
+ (with-output-to-string (string)
+@@ -94,7 +98,7 @@
+ ;;; This replaces ilisp-restore in pvs-init
+ (defun pvs-ilisp-restore ()
+ "Restore the old result history."
+- (declare (special / // + ++ * **))
++ #-sbcl (declare (special / // + ++ * **))
+ (setq // (pop *old-result*)
+ ** (first //)
+ / (pop *old-result*)
+@@ -105,7 +109,7 @@
+ nil)
+
+ (defun pvs-ilisp-save ()
+- (declare (special / // /// + ++ +++))
++ #-sbcl (declare (special / // /// + ++ +++))
+ (unless *old-result*
+ (setq *old-result* (list /// // +++ ++))))
+
+@@ -546,7 +550,8 @@
+ (t (cons (char string pos) result))))
+ (coerce (nreverse result) 'string)))
+
+-(#+(or cmu sbcl) ext:without-package-locks
++(#+cmu ext:without-package-locks
++ #+sbcl sb-ext:without-package-locks
+ #-(or cmu sbcl) progn
+ (defun parse-error (obj message &rest args)
+ ;;(assert (or *in-checker* *current-file*))
+@@ -606,7 +611,8 @@
+ (defvar *type-error-argument* nil)
+ (defvar *skip-all-conversion-checks* nil)
+
+-(#+(or cmu sbcl) ext:without-package-locks
++(#+cmu ext:without-package-locks
++ #+sbcl sb-ext:without-package-locks
+ #-(or cmu sbcl) progn
+ (defun type-error (obj message &rest args)
+ (let ((errmsg (type-error-for-conversion obj message args)))
+diff -durN pvs-sbcl-4.2.ORIG/src/linked-hash-table.lisp pvs-sbcl-4.2/src/linked-hash-table.lisp
+--- pvs-sbcl-4.2.ORIG/src/linked-hash-table.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/linked-hash-table.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -51,7 +51,7 @@
+ (if (memq test '(eq eql equal equalp))
+ (make-hash-table :test test :size size :rehash-size rehash-size
+ :rehash-threshold rehash-threshold
+- :weak-p weak-keys)
++ #-sbcl :weak-p #+sbcl :weakness weak-keys)
+ (make-pvs-hash-table
+ :strong-eq? (eq test 'strong-tc-eq)
+ :weak-p weak-keys
+@@ -77,6 +77,8 @@
+ :weak-keys (excl:hash-table-weak-keys ht))
+ #-allegro
+ (let* ((test (hash-table-test ht))
++ (weakp #+sbcl (sb-ext:hash-table-weakness ht)
++ #-sbcl (lisp::hash-table-weak-p ht))
+ (newht
+ (if (memq test '(eq eql equal equalp))
+ (make-hash-table
+@@ -84,13 +86,14 @@
+ :size size
+ :rehash-size rehash-size
+ :rehash-threshold rehash-threshold
+- :weak-p (lisp::hash-table-weak-p ht))
++ #-sbcl :weak-p #+sbcl :weakness weakp)
+ (make-pvs-hash-table :strong-eq? (eq test 'strong-tc-eq)
+- :weak-keys? (lisp::hash-table-weak-p ht)
++ :weak-keys? weakp
+ :size size
+ :rehash-size rehash-size
+ :rehash-threshold rehash-threshold
+- :table (lisp::hash-table-table ht)))))
++ :table #-sbcl (lisp::hash-table-table ht)
++ #+sbcl (sb-impl::hash-table-table ht)))))
+ (declare (inline maphash))
+ (maphash #'(lambda (x y) (setf (gethash x newht) y))
+ ht)
+diff -durN pvs-sbcl-4.2.ORIG/src/make-pvs-methods.lisp pvs-sbcl-4.2/src/make-pvs-methods.lisp
+--- pvs-sbcl-4.2.ORIG/src/make-pvs-methods.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/make-pvs-methods.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -33,8 +33,11 @@
+ ;; This sets *pvs-path* and sets *pvs-binary-type*
+ (load "pvs-config.lisp"))
+
+-(defpackage pvs (:use #+lucid :lucid-common-lisp :lisp
+- #-(or gcl cmu sbcl) :clos #+(or gcl cmu sbcl) :pcl))
++(defpackage pvs (:use #+lucid :lucid-common-lisp #-sbcl :lisp #+sbcl :cl
++ #-(or gcl cmu sbcl) :clos #+(or gcl cmu) :pcl
++ #+sbcl :sb-pcl)
++ #+sbcl (:shadowing-import-from :sb-int memq)
++ #+sbcl (:export memq))
+
+ (in-package :pvs)
+ (import '(cl-user:*pvs-path*))
+diff -durN pvs-sbcl-4.2.ORIG/src/metering.lisp pvs-sbcl-4.2/src/metering.lisp
+--- pvs-sbcl-4.2.ORIG/src/metering.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/metering.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -288,7 +288,7 @@
+ ;;; to seconds.
+
+ (progn
+- #-(or cmu allegro)
++ #-(or sbcl cmu allegro)
+ (eval-when (compile eval)
+ (warn
+ "You may want to supply implementation-specific get-time functions."))
+@@ -302,6 +302,12 @@
+ ;;; The get-cons macro is called to find the total number of bytes
+ ;;; consed since the beginning of time.
+
++#+sbcl
++(defmacro get-cons ()
++ "The get-cons macro is called to find the total number of bytes
++ consed since the beginning of time."
++ '(sb-ext:get-bytes-consed))
++
+ #+:cmu
+ (defmacro get-cons ()
+ "The get-cons macro is called to find the total number of bytes
+@@ -312,7 +318,7 @@
+ #+:lcl3.0
+ (defmacro get-cons () `(gc-size))
+
+-#-(or :cmu :lcl3.0)
++#-(or sbcl :cmu :lcl3.0)
+ (progn
+ (eval-when (compile eval)
+ (warn "No consing will be reported unless a get-cons function is ~
+@@ -326,6 +332,12 @@
+ ;;; arguments. The function Required-Arguments returns two values: the first
+ ;;; is the number of required arguments, and the second is T iff there are any
+ ;;; non-required arguments (e.g. &optional, &rest, &key).
++#+sbcl
++(defun required-arguments (name)
++ (multiple-value-bind (min max)
++ (sb-kernel:fun-type-nargs (sb-kernel:ctype-of (symbol-function name)))
++ (values (or min 0) (or (null max) (> max min)))))
++
+ #+cmu
+ (progn
+ #-new-compiler
+@@ -387,7 +399,7 @@
+
+
+
+-#-(or :cmu :lcl3.0 (and :allegro (not :coral)))
++#-(or sbcl :cmu :lcl3.0 (and :allegro (not :coral)))
+ (progn
+ (eval-when (compile eval)
+ (warn
+diff -durN pvs-sbcl-4.2.ORIG/src/pp-html.lisp pvs-sbcl-4.2/src/pp-html.lisp
+--- pvs-sbcl-4.2.ORIG/src/pp-html.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/pp-html.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -611,7 +611,8 @@
+ (when (eq ans :auto)
+ (setq *force-dirs* t)))))
+ #+allegro (excl:make-directory dir)
+- #+(or cmu sbcl) (unix:unix-mkdir dir #o777)
++ #+cmu (unix:unix-mkdir dir #o777)
++ #+sbcl (sb-unix:unix-mkdir dir #o777)
+ (pvs-message "Directory ~a created" dir))
+ (t (html-pvs-error "Directory ~a not created" dir))))))
+
+diff -durN pvs-sbcl-4.2.ORIG/src/prover/checker-macros.lisp pvs-sbcl-4.2/src/prover/checker-macros.lisp
+--- pvs-sbcl-4.2.ORIG/src/prover/checker-macros.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/prover/checker-macros.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -55,7 +55,7 @@
+ (defvar *printproofstate* nil)
+ (defvar *in-checker* nil)
+ (defvar *in-apply* nil)
+-(defvar *please-interrupt* nil)
++(defvar *please-interrupt* #-sbcl nil #+sbcl t)
+ (defvar *assert-bindings* nil)
+ (defvar *modsubst* nil)
+ (defvar *proving-tcc* nil)
+@@ -143,9 +143,11 @@
+ (defvar *module-context*)
+ ;;(defvar *current-theory*)
+ (defvar *ps* nil)
+-(defvar * '*)
+-(defvar + '+)
+-(defvar - '-)
++(#+sbcl sb-ext:without-package-locks
++ #-sbcl progn
++ (defvar * '*)
++ (defvar + '+)
++ (defvar - '-))
+ (defvar *macro-names* nil)
+ (defvar *subst-type-hash* ;;used in assert-sformnums
+ ;;(make-pvs-hash-table)
+@@ -177,14 +179,22 @@
+ (defmacro with-interrupts-deferred (&body form)
+ `(let ((excl::*without-interrupts* t)) ,@form))
+
+-#+(or cmu sbcl)
++#+cmu
+ (defmacro with-interrupts-allowed (&body form)
+ `(system:with-interrupts ,@form))
+
+-#+(or cmu sbcl)
++#+cmu
+ (defmacro with-interrupts-deferred (&body form)
+ `(system:without-interrupts ,@form))
+
++#+sbcl
++(defmacro with-interrupts-allowed (&body form)
++ `(sb-sys:with-interrupts ,@form))
++
++#+sbcl
++(defmacro with-interrupts-deferred (&body form)
++ `(sb-sys:without-interrupts ,@form))
++
+
+
+ ;;; KCL does not really have the equivalent to the following - punt for now.
+diff -durN pvs-sbcl-4.2.ORIG/src/prover/eproofcheck.lisp pvs-sbcl-4.2/src/prover/eproofcheck.lisp
+--- pvs-sbcl-4.2.ORIG/src/prover/eproofcheck.lisp 2008-01-14 04:12:56.000000000 -0700
++++ pvs-sbcl-4.2/src/prover/eproofcheck.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -210,9 +210,15 @@
+ (and *noninteractive*
+ *noninteractive-timeout*))
+ (let ((timeout (or *proof-timeout* *noninteractive-timeout*)))
++ #-sbcl
+ (mp:with-timeout (timeout (pvs-message "Interrupted: ~a sec timeout"
+ timeout))
+- (call-next-method)))
++ (call-next-method))
++ #+sbcl
++ (sb-ext:with-timeout timeout
++ (handler-case (call-next-method)
++ (sb-ext:timeout ()
++ (pvs-message "Interrupted: ~a sec timeout" timeout)))))
+ (call-next-method)))
+
+ (defmethod prove-decl ((decl formula-decl) &key strategy context)
+diff -durN pvs-sbcl-4.2.ORIG/src/prover/rules.lisp pvs-sbcl-4.2/src/prover/rules.lisp
+--- pvs-sbcl-4.2.ORIG/src/prover/rules.lisp 2008-01-15 21:53:29.000000000 -0700
++++ pvs-sbcl-4.2/src/prover/rules.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -334,9 +334,15 @@
+ (init-time (get-internal-run-time))
+ (result (let ((*in-apply* ps))
+ (if timeout
++ #-sbcl
+ (mp:with-timeout (timeout nil)
+ (prove* newps)
+ newps)
++ #+sbcl
++ (sb-ext:with-timeout timeout
++ (handler-case
++ (progn (prove* newps) newps)
++ (sb-ext:timeout () nil)))
+ (prove* newps))))
+ (end-time (/ (- (get-internal-run-time) init-time)
+ internal-time-units-per-second)))
+diff -durN pvs-sbcl-4.2.ORIG/src/prover/translate-to-yices.lisp pvs-sbcl-4.2/src/prover/translate-to-yices.lisp
+--- pvs-sbcl-4.2.ORIG/src/prover/translate-to-yices.lisp 2007-09-07 14:02:37.000000000 -0600
++++ pvs-sbcl-4.2/src/prover/translate-to-yices.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -910,6 +910,13 @@
+ :input "//dev//null"
+ :output out
+ :error-output :output)
++ #+sbcl
++ (sb-ext:run-program
++ (format nil "~a ~a" *yices-call* (namestring file))
++ nil
++ :input "//dev//null"
++ :output out
++ :error out)
+ #+cmu
+ (extensions:run-program
+ (format nil "~a ~a" *yices-call* (namestring file))
+diff -durN pvs-sbcl-4.2.ORIG/src/pvs.lisp pvs-sbcl-4.2/src/pvs.lisp
+--- pvs-sbcl-4.2.ORIG/src/pvs.lisp 2008-07-19 14:29:49.000000000 -0600
++++ pvs-sbcl-4.2/src/pvs.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -102,19 +102,21 @@
+ (let ((exepath (car (make::split-string
+ (environment-variable "LD_LIBRARY_PATH") :item #\:))))
+ (pushnew exepath *pvs-directories*)
+- (ext:load-foreign (format nil "~a/mu.~a" exepath
++ (#+cmu ext:load-foreign #+sbcl sb-alien:load-shared-object
++ (format nil "~a/mu.~a" exepath
+ #+darwin "dylib"
+ #-darwin "so"))
+- (ext:load-foreign (format nil "~a/ws1s.~a" exepath
++ (#+cmu ext:load-foreign #+sbcl sb-alien:load-shared-object
++ (format nil "~a/ws1s.~a" exepath
+ #+darwin "dylib"
+ #-darwin "so"))
+ ;; Have no idea what is going on here, but if you leave this out,
+ ;; bdd-cmu gives a compile error.
+- (fmakunbound 'bdd_cofactor_neg_)
+- (lf "bdd-cmu")
+- (lf "mu-cmu")
++ #+cmu (fmakunbound 'bdd_cofactor_neg_)
++ #+cmu (lf "bdd-cmu") #+sbcl (lf "bdd-sbcl")
++ #+cmu (lf "mu-cmu") #+sbcl (lf "mu-sbcl")
+ (bdd_init)
+- (lf "dfa-foreign-cmu"))
++ #+cmu (lf "dfa-foreign-cmu") #+sbcl (lf "dfa-foreign-sbcl"))
+ (setq *started-with-minus-q*
+ (or dont-load-user-lisp
+ (let ((mq (environment-variable "PVSMINUSQ")))
+diff -durN pvs-sbcl-4.2.ORIG/src/restore-theories.lisp pvs-sbcl-4.2/src/restore-theories.lisp
+--- pvs-sbcl-4.2.ORIG/src/restore-theories.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/restore-theories.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -27,7 +27,7 @@
+ ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ ;; --------------------------------------------------------------------
+
+-(in-package 'pvs)
++(in-package :pvs)
+
+ ;;; Restores the state of the system from information provided in the
+ ;;; context. The context has the form
+diff -durN pvs-sbcl-4.2.ORIG/src/store-object.lisp pvs-sbcl-4.2/src/store-object.lisp
+--- pvs-sbcl-4.2.ORIG/src/store-object.lisp 2007-10-13 15:30:22.000000000 -0600
++++ pvs-sbcl-4.2/src/store-object.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -301,8 +301,8 @@
+ (ensure-vector-size *store-object-store* *store-object-store-size* size)
+ (with-open-file (f file :direction :input
+ :element-type '(unsigned-byte 32))
+- (lisp:read-sequence *store-object-store* f
+- :start 0 :end size))
++ (cl:read-sequence *store-object-store* f
++ :start 0 :end size))
+ (when reverse-endian
+ (dotimes (i size)
+ (setf (object-store i)
+diff -durN pvs-sbcl-4.2.ORIG/src/utils/file-utils-sbcl.lisp pvs-sbcl-4.2/src/utils/file-utils-sbcl.lisp
+--- pvs-sbcl-4.2.ORIG/src/utils/file-utils-sbcl.lisp 1969-12-31 17:00:00.000000000 -0700
++++ pvs-sbcl-4.2/src/utils/file-utils-sbcl.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -0,0 +1,66 @@
++;; --------------------------------------------------------------------
++;; PVS
++;; Copyright (C) 2008, SRI International. All Rights Reserved.
++
++;; This program is free software; you can redistribute it and/or
++;; modify it under the terms of the GNU General Public License
++;; as published by the Free Software Foundation; either version 2
++;; of the License, or (at your option) any later version.
++
++;; This program is distributed in the hope that it will be useful,
++;; but WITHOUT ANY WARRANTY; without even the implied warranty of
++;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++;; GNU General Public License for more details.
++
++;; You should have received a copy of the GNU General Public License
++;; along with this program; if not, write to the Free Software
++;; Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
++;; 02110-1301, USA.
++;; --------------------------------------------------------------------
++
++(in-package :pvs)
++(require :sb-posix)
++(export '(file-exists-p directory-p read-permission? write-permission?
++ file-write-time get-file-info))
++
++(defun remove-backslashes (string)
++ (declare (type string string))
++ (sb-impl::remove-backslashes string 0 (length string)))
++
++(defun file-exists-p (file)
++ (handler-case
++ (zerop
++ (sb-posix:access
++ (remove-backslashes (namestring (merge-pathnames file)))
++ sb-posix:f-ok))
++ (sb-posix:syscall-error () nil)))
++
++(defun directory-p (dir)
++ (handler-case
++ (let ((filestring (namestring (merge-pathnames dir))))
++ (when (sb-posix:s-isdir (sb-posix:stat-mode (sb-posix:stat filestring)))
++ ;; Needs to end with a slash!!!
++ (pathname (if (char= (char filestring (1- (length filestring))) #\/)
++ filestring
++ (concatenate 'string filestring "/")))))
++ (sb-posix:syscall-error () nil)))
++
++(defun read-permission? (file)
++ (handler-case (zerop (sb-posix:access file sb-posix:r-ok))
++ (sb-posix:syscall-error () nil)))
++
++(defun write-permission? (file)
++ (handler-case (zerop (sb-posix:access file sb-posix:w-ok))
++ (sb-posix:syscall-error () nil)))
++
++(defconstant u1970 (encode-universal-time 0 0 0 1 1 1970 0))
++
++(defun file-write-time (file)
++ (handler-case (+ u1970 (sb-posix:stat-mtime (sb-posix:stat file)))
++ (sb-posix:syscall-error () nil)))
++
++(defun get-file-info (file)
++ (handler-case
++ (let ((stat (sb-posix:stat file)))
++ (list (sb-posix:stat-dev stat) (sb-posix:stat-ino stat)))
++ (sb-posix:syscall-error () nil)))
+diff -durN pvs-sbcl-4.2.ORIG/src/utils/hashfn.lisp pvs-sbcl-4.2/src/utils/hashfn.lisp
+--- pvs-sbcl-4.2.ORIG/src/utils/hashfn.lisp 2007-10-10 18:14:03.000000000 -0600
++++ pvs-sbcl-4.2/src/utils/hashfn.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -56,7 +56,7 @@
+ ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ ;; --------------------------------------------------------------------
+
+-(in-package 'pvs)
++(in-package :pvs)
+
+ ;(declaim (function pvs-sxhash* (T list) (integer 0 65535)))
+
+@@ -64,7 +64,7 @@
+ ;(defun tc-eq (x y &optional bindings)
+ ; (tc-eq* x y bindings))
+
+-(defconstant pvs-sxhash-byte (byte #+allegro 24 #-allegro 29 0))
++(defconstant-if-unbound pvs-sxhash-byte (byte #+allegro 24 #-allegro 29 0))
+
+ (defconstant pvs-max-hashnum (1- (expt 2 #+allegro 24 #-allegro 29)))
+
+@@ -104,7 +104,7 @@
+ (declare (ignore bindings))
+ (the positive-fixnum (sxhash x)))
+
+-(defconstant nil-sxhash (sxhash nil))
++(defconstant-if-unbound nil-sxhash (sxhash nil))
+
+ (defmethod pvs-sxhash* ((x null) bindings)
+ (declare (ignore bindings))
+diff -durN pvs-sbcl-4.2.ORIG/src/utils/ix86_64-Linux/Makefile pvs-sbcl-4.2/src/utils/ix86_64-Linux/Makefile
+--- pvs-sbcl-4.2.ORIG/src/utils/ix86_64-Linux/Makefile 1969-12-31 17:00:00.000000000 -0700
++++ pvs-sbcl-4.2/src/utils/ix86_64-Linux/Makefile 2008-11-04 20:52:16.000000000 -0700
+@@ -0,0 +1,23 @@
++LD = gcc
++LDFLAGS = -shared -L./
++CC=gcc
++CFLAGS=-fPIC
++WFLAGS=-Wall
++VPATH=..
++
++obj=file_utils.o
++
++.SUFFIXES:
++.SUFFIXES: .c .o
++.c.o : ; $(CC) $(XCFLAGS) ${WFLAGS} ${CFLAGS} -c $< -o $@
++
++all : file_utils.so b64
++
++file_utils.so: ${obj}
++ $(LD) ../utils-ld-table $(LDFLAGS) -o file_utils.so ${obj} -lc
++
++b64: ../b64.c
++ $(CC) -o ./b64 ../b64.c
++
++clean :
++ rm -f *.o *.a *.so b64
+diff -durN pvs-sbcl-4.2.ORIG/src/utils.lisp pvs-sbcl-4.2/src/utils.lisp
+--- pvs-sbcl-4.2.ORIG/src/utils.lisp 2008-07-17 04:35:11.000000000 -0600
++++ pvs-sbcl-4.2/src/utils.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -137,11 +137,12 @@
+ (let* ((test (hash-table-test ht))
+ (size (hash-table-count ht))
+ (weak? #+allegro (excl:hash-table-weak-keys ht)
+- #+(or cmu sbcl) (lisp::hash-table-weak-p ht))
++ #+cmu (lisp::hash-table-weak-p ht)
++ #+sbcl (sb-ext:hash-table-weakness ht))
+ (new-ht (if (memq test '(eq eql equal equalp))
+ (make-hash-table
+ :test test :size size
+- #+allegro :weak-keys #+(or cmu sbcl) :weak-p weak?)
++ #+allegro :weak-keys #+cmu :weak-p #+sbcl :weakness weak?)
+ (make-pvs-hash-table :strong-eq? (eq test 'strong-tc-eq)
+ :size size
+ :weak-keys? weak?))))
+@@ -279,7 +280,8 @@
+ #+(and allegro (version>= 6) (not (version>= 7)))
+ (excl::variable-special-p obj nil)
+ #+(and allegro (not (version>= 6))) (clos::variable-special-p obj nil)
+- #+(or cmu sbcl) (eq (extensions:info variable kind obj) :special)
++ #+cmu (eq (extensions:info variable kind obj) :special)
++ #+sbcl (sb-walker:var-globally-special-p obj)
+ #+harlequin-common-lisp (system:declared-special-p obj)
+ #-(or lucid kcl allegro harlequin-common-lisp cmu sbcl)
+ (error "Need to handle special variables for this version of lisp")
+@@ -310,14 +312,22 @@
+ (namestring (working-directory))))
+ nil)
+
+-#+(or gcl cmu sbcl)
++#+(or gcl cmu)
+ (defun working-directory ()
+ (pathname (nth-value 1 (unix:unix-current-directory))))
+
+-#+(or gcl cmu sbcl)
++#+(or gcl cmu)
+ (defun set-working-directory (dir)
+ (unix:unix-chdir (namestring dir)))
+
++#+sbcl
++(defun working-directory ()
++ (make-pathname :directory (sb-posix:getcwd)))
++
++#+sbcl
++(defun set-working-directory (dir)
++ (sb-posix:chdir dir))
++
+ #+allegro
+ (defun working-directory ()
+ (excl:current-directory))
+@@ -334,10 +344,14 @@
+ (defun environment-variable (string)
+ (sys:getenv string))
+
+-#+(or cmu sbcl)
++#+cmu
+ (defun environment-variable (string)
+ (tools:getenv string))
+
++#+sbcl
++(defun environment-variable (string)
++ (sb-posix:getenv string))
++
+ #+harlequin-common-lisp
+ (defun environment-variable (string)
+ ;; This didn't work before
+@@ -370,13 +384,20 @@
+ :show-cmd nil
+ :output-stream (open "/dev/null" :direction :output
+ :if-exists :append)))
+-#+(or cmu sbcl)
++#+cmu
+ (defun chmod (prot file)
+ (extensions:run-program
+ "chmod"
+ (list prot (namestring file))
+ :output nil :error nil :wait nil))
+
++#+sbcl
++(defun chmod (prot file)
++ (sb-ext:run-program
++ "chmod"
++ (list prot (namestring file))
++ :output nil :error nil :wait nil))
++
+ #+gcl
+ (defun chmod (prot file)
+ (system (format nil "chmod ~a ~a" prot (namestring file))))
+@@ -605,11 +626,12 @@
+
+ (defun shortpath (directory)
+ (or (gethash directory *shortpath-directories*)
+- (let* ((dirlist (pathname-directory
++ (let* ((realdir (namestring (truename directory)))
++ (dirlist (pathname-directory
+ (directory-p
+- (#+allegro excl:pathname-resolve-symbolic-links
+- #+(or cmu sbcl) unix:unix-resolve-links
+- (namestring (truename directory))))))
++ #+allegro (excl:pathname-resolve-symbolic-links realdir)
++ #+cmu (unix:unix-resolve-links realdir)
++ #-(or allegro cmu) realdir)))
+ (file-info (get-file-info directory))
+ (result (if (eq (car dirlist) :absolute)
+ (shortpath* (reverse (cdr dirlist)) file-info)
+@@ -2915,10 +2937,14 @@
+ (defun direct-superclasses (class)
+ (slot-value class 'pcl:class-direct-superclasses))
+
+-#+(or cmu sbcl)
++#+cmu
+ (defun direct-superclasses (class)
+ (class-direct-superclasses class))
+
++#+sbcl
++(defun direct-superclasses (class)
++ (sb-mop:class-direct-superclasses class))
++
+ (defun types-of (obj)
+ (let ((types nil))
+ (labels ((tof (type)
+@@ -3225,7 +3251,7 @@
+ (when (compiled-function-p #'pvs-gc-after-hook)
+ (setf excl:*gc-after-hook* #'pvs-gc-after-hook)))
+
+-#+(or cmu sbcl)
++#+cmu
+ (eval-when (load)
+ (setf extensions:*gc-verbose* nil))
+
+@@ -4022,7 +4048,8 @@
+ (every #'(lambda (slot)
+ (let ((name (slot-value slot
+ '#+allegro excl::name
+- #+(or cmu sbcl) pcl::name)))
++ #+cmu pcl::name
++ #+sbcl sb-pcl::name)))
+ (equals (slot-value x name) (slot-value y name))))
+ slots)))
+
+@@ -4059,8 +4086,12 @@
+ #-(or allegro cmu sbcl)
+ (error "Need a hash-table for tc-eq for this lisp"))
+
+-#+(or cmu sbcl)
++#+cmu
+ (extensions:define-hash-table-test 'tc-eq-test #'tc-eq #'pvs-sxhash)
+-#+(or cmu sbcl)
++#+cmu
+ (extensions:define-hash-table-test 'strong-tc-eq-test
+ #'strong-tc-eq #'pvs-sxhash)
++#+sbcl
++(sb-int:define-hash-table-test 'tc-eq-test #'tc-eq #'pvs-sxhash)
++#+sbcl
++(sb-int:define-hash-table-test 'strong-tc-eq-test #'strong-tc-eq #'pvs-sxhash)
+diff -durN pvs-sbcl-4.2.ORIG/src/WS1S/ix86_64-Linux/Makefile pvs-sbcl-4.2/src/WS1S/ix86_64-Linux/Makefile
+--- pvs-sbcl-4.2.ORIG/src/WS1S/ix86_64-Linux/Makefile 1969-12-31 17:00:00.000000000 -0700
++++ pvs-sbcl-4.2/src/WS1S/ix86_64-Linux/Makefile 2008-11-04 20:52:16.000000000 -0700
+@@ -0,0 +1,64 @@
++ifneq (,)
++This makefile requires GNU Make.
++endif
++
++BDD = ../mona/BDD
++DFA = ../mona/DFA
++UTILS = ../mona/Mem
++INCLUDES = -I$(BDD) -I$(DFA) -I$(UTILS)
++LD = gcc
++LDFLAGS = -shared -L./
++CC = gcc
++CFLAGS += -D_POSIX_SOURCE -DSYSV $(INCLUDES)
++XCFLAGS = -O
++SHELL = /bin/sh
++VPATH = ..:../mona/BDD:../mona/DFA:../mona/Mem
++
++obj = analyze.o prefix.o product.o \
++ quotient.o basic.o external.o \
++ makebasic.o minimize.o printdfa.o \
++ project.o dfa.o \
++ bdd.o bdd_double.o bdd_external.o \
++ bdd_manager.o hash.o bdd_dump.o \
++ bdd_trace.o bdd_cache.o \
++ dlmalloc.o mem.o \
++ ws1s_extended_interface.o
++
++.SUFFIXES:
++.SUFFIXES: .c .o
++.c.o : ; $(CC) $(XCFLAGS) ${CFLAGS} -c $< -o $@
++
++all : ws1s.so
++
++ws1s_extended_interface.o : ../ws1s_extended_interface.c
++ $(CC) $(XCFLAGS) ${CFLAGS} -c $< -o $@
++
++ws1s.so : ${obj}
++ $(LD) ../ws1s-ld-table $(LDFLAGS) -o ws1s.so ${obj}
++
++bdd.o: bdd.c bdd.h bdd_internal.h
++bdd_double.o: bdd_double.c bdd.h bdd_internal.h
++bdd_external.o: bdd_external.c bdd_external.h mem.h
++bdd_manager.o: bdd_manager.c bdd.h bdd_internal.h
++hash.o: hash.c mem.h hash.h
++bdd_dump.o: bdd_dump.c bdd_dump.h
++bdd_trace.o: bdd_trace.c bdd.h bdd_internal.h
++bdd_cache.o: bdd_cache.c bdd.h bdd_internal.h
++
++analyze.o: analyze.c dfa.h mem.h
++prefix.o: prefix.c dfa.h mem.h
++product.o: product.c dfa.h bdd.h hash.h mem.h
++quotient.o: quotient.c dfa.h hash.h mem.h
++basic.o: basic.c dfa.h mem.h
++external.o: external.c dfa.h bdd_external.h mem.h
++makebasic.o: makebasic.c dfa.h bdd_internal.h
++minimize.o: minimize.c dfa.h hash.h mem.h
++printdfa.o: printdfa.c dfa.h mem.h
++project.o: project.c dfa.h hash.h mem.h
++dfa.o: dfa.c dfa.h bdd.h hash.h mem.h
++
++dlmalloc.o: dlmalloc.c dlmalloc.h
++mem.o: mem.c dlmalloc.h
++
++clean :
++ rm -f *.o *.a *.so
+diff -durN pvs-sbcl-4.2.ORIG/src/WS1S/lisp/dfa-foreign-sbcl.lisp pvs-sbcl-4.2/src/WS1S/lisp/dfa-foreign-sbcl.lisp
+--- pvs-sbcl-4.2.ORIG/src/WS1S/lisp/dfa-foreign-sbcl.lisp 1969-12-31 17:00:00.000000000 -0700
++++ pvs-sbcl-4.2/src/WS1S/lisp/dfa-foreign-sbcl.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -0,0 +1,275 @@
++;; --------------------------------------------------------------------
++;; PVS
++;; Copyright (C) 2006, SRI International. All Rights Reserved.
++
++;; This program is free software; you can redistribute it and/or
++;; modify it under the terms of the GNU General Public License
++;; as published by the Free Software Foundation; either version 2
++;; of the License, or (at your option) any later version.
++
++;; This program is distributed in the hope that it will be useful,
++;; but WITHOUT ANY WARRANTY; without even the implied warranty of
++;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++;; GNU General Public License for more details.
++
++;; You should have received a copy of the GNU General Public License
++;; along with this program; if not, write to the Free Software
++;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++;; --------------------------------------------------------------------
++
++(in-package :pvs)
++
++;; Structure of a DFA in foreign space
++(sb-alien:define-alien-type nil
++ (sb-alien:struct mona-dfa
++ (bddm (* t)) ; Manager of BDD nodes
++ (ns (integer 32)) ; Number of states
++ (q (* t)) ; Transition array
++ (s (integer 32)) ; Start State
++ (f (* (integer 32))))) ; State Status Array
++
++;; Predefined basic automata
++
++(sb-alien:define-alien-routine ("ws1s___dfaTrue" mona-true) ; true
++ (* (sb-alien:struct mona-dfa)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaFalse" mona-false) ; false
++ (* (sb-alien:struct mona-dfa)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaConst" mona-const) ; p_i = n
++ (* (sb-alien:struct mona-dfa))
++ (n (integer 32)) (i (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaLess" mona-less) ; p_i < p_j
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaLesseq" mona-lesseq) ; p_i <= p_j
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaPlus1" mona-plus1) ; p_i = p_j + n
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)) (n (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaMinus1" mona-minus1) ; p_i = p_i - p_j
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaEq1" mona-eq1) ; p_i = p_j
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaEq2" mona-eq2) ; P_i = P_j
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaPlus2" mona-plus2) ; P_i = P_j + 1
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaMinus2" mona-minus2) ; P_i = P_j - 1
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaPlusModulo1" mona-plusmodulo1) ; p_i = p_j + 1 % p_k
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)) (k (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaMinusModulo1" mona-minusmodulo1) ; p_i = p_j - 1 % p_k
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)) (k (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaEmpty" mona-empty) ; P_i = empty
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaIn" mona-in) ; p_i in P_j recognizes <X,X>(<0,X>+)<1,1>(<X,X>*)
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaSubset" mona-subset) ; P_i sub P_j
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaUnion" mona-union) ; P_i = P_j union P_k
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)) (k (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaInter" mona-intersection) ; P_i = P_j inter P_k
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)) (k (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaSetminus" mona-difference) ; P_i = P_j \ P_k
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)) (k (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaMax" mona-max) ; p_i = max(P_j)
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaMin" mona-min) ; p_i = min(P_j)
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (j (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaBoolvar" mona-boolvar) ; b_i
++ (* (sb-alien:struct mona-dfa))
++ (b (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaPresbConst" mona-presburger-const) ; P_i = pconst(n)
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)) (n (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaSingleton" mona-singleton) ; singleton(P_i)
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaFirstOrder" mona-first-order) ; recognizes 0*1+
++ (* (sb-alien:struct mona-dfa))
++ (i (integer 32)))
++
++
++;; Automaton operations
++
++(sb-alien:define-alien-routine ("ws1s___dfaFree" mona-free!)
++ sb-alien:void
++ (a (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaNegation" mona-negation!)
++ sb-alien:void
++ (a (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaRestrict" mona-restrict!)
++ sb-alien:void
++ (a (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaUnrestrict" mona-unrestrict!)
++ sb-alien:void
++ (a (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaCopy" mona-copy)
++ (* (sb-alien:struct mona-dfa))
++ (a (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaProduct" mona-product)
++ (* (sb-alien:struct mona-dfa))
++ (a1 (* (sb-alien:struct mona-dfa)))
++ (a2 (* (sb-alien:struct mona-dfa)))
++ (mode (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaPrefixClose" mona-prefix-close!)
++ sb-alien:void
++ (a (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaConjunction" mona-conjunction)
++ (* (sb-alien:struct mona-dfa))
++ (a1 (* (sb-alien:struct mona-dfa))) (a2 (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaDisjunction" mona-disjunction)
++ (* (sb-alien:struct mona-dfa))
++ (a1 (* (sb-alien:struct mona-dfa))) (a2 (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaImplication" mona-implication)
++ (* (sb-alien:struct mona-dfa))
++ (a1 (* (sb-alien:struct mona-dfa))) (a2 (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaIff" mona-iff)
++ (* (sb-alien:struct mona-dfa))
++ (a1 (* (sb-alien:struct mona-dfa))) (a2 (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaStatus" mona-status)
++ (integer 32)
++ (a (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaProject" mona-project)
++ ; projects away track var_index from a and
++ ; determinizes the resulting automaton
++ (* (sb-alien:struct mona-dfa))
++ (a (* (sb-alien:struct mona-dfa))) (index (sb-alien:unsigned 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaRightQuotient" mona-right-quotient!)
++ sb-alien:void
++ (a (* (sb-alien:struct mona-dfa))) (index (sb-alien:unsigned 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaMinimize" mona-minimize) ; Minimization
++ (* (sb-alien:struct mona-dfa))
++ (a (* (sb-alien:struct mona-dfa))))
++
++
++;; Analysis and printing
++
++(sb-alien:define-alien-routine ("ws1s___dfaMakeExample" mona-make-example)
++ sb-alien:c-string
++ (a (* (sb-alien:struct mona-dfa)))
++ (kind (integer 32))
++ (num (integer 32))
++ (indices (array (sb-alien:unsigned 32))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaAnalyze" mona-analyze)
++ sb-alien:void
++ (a (* (sb-alien:struct mona-dfa)))
++ (num (integer 32))
++ (names (array sb-alien:c-string))
++ (indices (array sb-alien:unsigned))
++ (orders (array sb-alien:char))
++ (treestyle (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaPrintVitals" mona-print-vitals)
++ sb-alien:void
++ (a (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaPrint" mona-print)
++ sb-alien:void
++ (a (* (sb-alien:struct mona-dfa)))
++ (num (integer 32))
++ (names (array sb-alien:c-string))
++ (indices (array (sb-alien:unsigned 32))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaPrintGraphviz" mona-print-graphviz)
++ sb-alien:void
++ (a (* (sb-alien:struct mona-dfa)))
++ (num (integer 32))
++ (indices (array (sb-alien:unsigned 32))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaPrintVerbose" mona-print-verbose)
++ sb-alien:void
++ (a (* (sb-alien:struct mona-dfa))))
++
++(sb-alien:define-alien-routine ("ws1s___bdd_size" bdd-size)
++ (sb-alien:unsigned 32)
++ (bbdm (* t)))
++
++
++;; Constructing Automata Explicitly
++
++(sb-alien:define-alien-routine ("ws1s___dfaSetup" mona-setup)
++ sb-alien:void
++ (s (integer 32))
++ (len (integer 32))
++ (indices (array (integer 32))))
++
++(sb-alien:define-alien-routine ("ws1s___dfaAllocExceptions" mona-alloc-exceptions)
++ sb-alien:void
++ (n (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaStoreException" mona-store-exception)
++ sb-alien:void
++ (s (integer 32)) (path sb-alien:c-string))
++
++(sb-alien:define-alien-routine ("ws1s___dfaStoreState" mona-store-state)
++ sb-alien:void
++ (s (integer 32)))
++
++(sb-alien:define-alien-routine ("ws1s___dfaBuild" mona-build)
++ (* (sb-alien:struct mona-dfa))
++ (statuses (array sb-alien:char)))
++
++;; Exporting
++
++(sb-alien:define-alien-routine ("ws1s___dfaExport" mona-export)
++ (integer 32)
++ (a (* (sb-alien:struct mona-dfa)))
++ (filename sb-alien:c-string)
++ (num (integer 32))
++ (names (array sb-alien:c-string))
++ (orders (array sb-alien:char)))
+diff -durN pvs-sbcl-4.2.ORIG/src/WS1S/lisp/symtab.lisp pvs-sbcl-4.2/src/WS1S/lisp/symtab.lisp
+--- pvs-sbcl-4.2.ORIG/src/WS1S/lisp/symtab.lisp 2007-07-02 14:07:39.000000000 -0600
++++ pvs-sbcl-4.2/src/WS1S/lisp/symtab.lisp 2008-11-04 20:52:16.000000000 -0700
+@@ -81,7 +81,7 @@
+ (let* ((free (symtab-freevars symtab))
+ (size (length free))
+ (offsets (make-array size :element-type 'fixnum))
+- (fvars (make-array size :element-type 'string))
++ (fvars (make-array size :element-type 'string :initial-element ""))
+ (types (make-string size))
+ (i 0))
+ (mapc #'(lambda (bndng)
diff --git a/sci-mathematics/pvs/files/4.2/pvs-4.2-typo.patch b/sci-mathematics/pvs/files/4.2/pvs-4.2-typo.patch
new file mode 100644
index 000000000..9af8a6f7d
--- /dev/null
+++ b/sci-mathematics/pvs/files/4.2/pvs-4.2-typo.patch
@@ -0,0 +1,96 @@
+diff -dur pvs-sbcl-4.2.ORIG/src/groundeval/pvs2clean.lisp pvs-sbcl-4.2/src/groundeval/pvs2clean.lisp
+--- pvs-sbcl-4.2.ORIG/src/groundeval/pvs2clean.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/groundeval/pvs2clean.lisp 2008-08-22 22:12:18.000000000 -0600
+@@ -177,7 +177,7 @@
+ (updateable-free-formal-vars operator)
+ livevars))))
+ (if (clean-updateable? (type operator))
+- (format nil "(pvsSelect ~a ~a)"
++ (format nil "(pvsSelect ~a ~a ~a)"
+ clean-op clean-arg
+ (mk-clean-funcall clean-op
+ (list clean-arg))))))))
+@@ -375,6 +375,7 @@
+ livevars))))))
+ (if else-part
+ (format nil "~a ~% _ -> ~a"
++ selections-clean
+ (pvs2clean* (expression else-part) bindings livevars))
+ selections-clean)))
+
+diff -durN pvs-sbcl-4.2.ORIG/src/groundeval/eval-utils.lisp pvs-sbcl-4.2/src/groundeval/eval-utils.lisp
+--- pvs-sbcl-4.2.ORIG/src/groundeval/eval-utils.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/groundeval/eval-utils.lisp 2008-08-24 14:58:20.000000000 -0600
+@@ -68,14 +68,14 @@
+ (defmethod print-object ((obj eval-info) stream)
+ (if *debugging-print-object*
+ (call-next-method)
+- (format stream "~@<#<eval-info ~2I~_~:0Iinternal: ~W~:@_external: ~W>~:>"
++ (format stream "~@<#<eval-info ~2I~_~0:Iinternal: ~W~:@_external: ~W>~:>"
+ (internal obj) (external obj))))
+
+ (defmethod print-object ((obj eval-defn-info) stream)
+ (if *debugging-print-object*
+ (call-next-method)
+ (format stream
+- "~@<#<eval-defn-info ~2I~_~:0Iunary: ~W~:@_multiary: ~W~:@_destructive: ~W>~:>"
++ "~@<#<eval-defn-info ~2I~_~0:Iunary: ~W~:@_multiary: ~W~:@_destructive: ~W>~:>"
+ (unary obj) (multiary obj) (destructive obj))))
+
+ (defmethod print-object ((obj eval-defn) stream)
+diff -durN pvs-sbcl-4.2.ORIG/src/ground-prover/process.lisp pvs-sbcl-4.2/src/ground-prover/process.lisp
+--- pvs-sbcl-4.2.ORIG/src/ground-prover/process.lisp 2007-07-02 14:07:40.000000000 -0600
++++ pvs-sbcl-4.2/src/ground-prover/process.lisp 2008-08-24 15:13:06.000000000 -0600
+@@ -729,7 +729,7 @@
+ ; (set (setsolve atf))
+ (tuple (tupsolve atf))
+ (array (arraysolve atf))
+- (t (error "No solver for type " (prtype (arg1 atf))))
++ (t (error "No solver for type ~a" (prtype (arg1 atf))))
+ )))))
+
+ ; ------------------------------------------------------------------
+@@ -808,7 +808,7 @@
+ ; (set (setnsolve atf))
+ (tuple (tupnsolve atf))
+ (array (arraynsolve atf))
+- (t (error "No nsolve for type "
++ (t (error "No nsolve for type ~a"
+ (or (prtype (arg1 atf)) (prtype (arg2 atf))) ))
+ )))))
+
+diff -dur pvs-sbcl-4.2.ORIG/src/prover/eproofcheck.lisp pvs-sbcl-4.2/src/prover/eproofcheck.lisp
+--- pvs-sbcl-4.2.ORIG/src/prover/eproofcheck.lisp 2008-01-14 04:12:56.000000000 -0700
++++ pvs-sbcl-4.2/src/prover/eproofcheck.lisp 2008-08-22 22:07:06.000000000 -0600
+@@ -3446,7 +3446,7 @@
+ (values 'X nil nil))
+ ((and (or (digit-char-p (char strlbl 0))
+ (char= (char strlbl 0) #\-))
+- (every #'digit-char-p (subseq strlbl) 1))
++ (every #'digit-char-p (subseq strlbl 1)))
+ (error-format-if
+ "~%Label cannot be an integer"))
+ (t
+diff -durN pvs-sbcl-4.2.ORIG/src/tex-support.lisp pvs-sbcl-4.2/src/tex-support.lisp
+--- pvs-sbcl-4.2.ORIG/src/tex-support.lisp 2008-03-11 16:53:37.000000000 -0600
++++ pvs-sbcl-4.2/src/tex-support.lisp 2008-08-24 15:18:16.000000000 -0600
+@@ -532,7 +532,7 @@
+ (when (and *report-mode*
+ (loop for sf in neg-s-forms
+ thereis (memq sf par-sforms)))
+- (format stream "~% & $\\vdots$ \\\\" *prover-indent*)))
++ (format stream "~%~VT & $\\vdots$ \\\\" *prover-indent*)))
+ (t (format stream "\\strut\\\\")))
+ (format stream "\\hline~%")
+ (cond (pos-s-forms
+diff -durN pvs-sbcl-4.2.ORIG/src/WS1S/lisp/ws1s-strategy.lisp pvs-sbcl-4.2/src/WS1S/lisp/ws1s-strategy.lisp
+--- pvs-sbcl-4.2.ORIG/src/WS1S/lisp/ws1s-strategy.lisp 2007-07-02 14:07:39.000000000 -0600
++++ pvs-sbcl-4.2/src/WS1S/lisp/ws1s-strategy.lisp 2008-08-24 15:20:16.000000000 -0600
+@@ -193,7 +193,7 @@
+ (loop* 0 (emptyset-operator))))
+
+ (defun ws1s-automaton-output (p num fvars offsets)
+- (format t "~2%Free vars:~2%" fvars)
++ (format t "~2%Free vars:~{ ~s~}~2%" fvars)
+ (dfa-print p num fvars offsets)
+ (format t "~%"))
diff --git a/sci-mathematics/pvs/files/4.2/pvs-4.2-unused.patch b/sci-mathematics/pvs/files/4.2/pvs-4.2-unused.patch
new file mode 100644
index 000000000..a7b820555
--- /dev/null
+++ b/sci-mathematics/pvs/files/4.2/pvs-4.2-unused.patch
@@ -0,0 +1,11 @@
+diff -dur pvs-sbcl-4.2.ORIG/BDD/mu_interface.c pvs-sbcl-4.2/BDD/mu_interface.c
+--- pvs-sbcl-4.2.ORIG/BDD/mu_interface.c 2007-08-27 01:03:57.000000000 -0600
++++ pvs-sbcl-4.2/BDD/mu_interface.c 2008-08-08 15:19:58.000000000 -0600
+@@ -107,7 +107,6 @@
+ void yywarning (const char *format, ...) { fputs ("", stderr); }
+ HASHTAB *var_table; /* primary variable names */
+ FILE *bdd_output_stream;
+-static const char *bdd_output_strings ;
+
+ /* setting flags */
+ int set_mu_warnings (int flag) {warnings = flag; return 0;}
diff --git a/sci-mathematics/pvs/files/pvs-4.2-patch-make b/sci-mathematics/pvs/files/pvs-4.2-patch-make
deleted file mode 100644
index 8bde99182..000000000
--- a/sci-mathematics/pvs/files/pvs-4.2-patch-make
+++ /dev/null
@@ -1,52 +0,0 @@
-diff -Naur pvs4.2-orig/doc/user-guide/Makefile.in pvs4.2-make/doc/user-guide/Makefile.in
---- pvs4.2-orig/doc/user-guide/Makefile.in 2007-07-02 20:07:42.000000000 +0000
-+++ pvs4.2-make/doc/user-guide/Makefile.in 2009-03-24 18:59:13.000000000 +0000
-@@ -24,7 +24,7 @@
- pdflatex $<
-
- sum-nosub.tex sum-sub.tex sum-tccs.tex : sum.pvs sum.el
-- @PVSPATH@/pvs -batch -q -l sum.el -f kill-process
-+ @PVSPATH@/pvs -batch -q -l sum.el || echo
-
- .PHONY: clean
- clean :
-diff -Naur pvs4.2-orig/Makefile.in pvs4.2-make/Makefile.in
---- pvs4.2-orig/Makefile.in 2008-07-20 08:58:09.000000000 +0000
-+++ pvs4.2-make/Makefile.in 2009-03-24 18:58:50.000000000 +0000
-@@ -488,22 +488,26 @@
- -load src/make-pvs-methods.lisp
- endif
-
-+CMU-LISP-COMPILE-EXPR=\
-+ '(load "pvs.system" :verbose t) \
-+ (let ((*load-pvs-prelude* nil)) \
-+ (mk:operate-on-system :pvs :compile)) \
-+ (quit)'
-+
-+CMU-BUILD-IMAGE-EXPR=\
-+ '(load "pvs.system" :verbose t) \
-+ (unwind-protect \
-+ (mk:operate-on-system :pvs :compile) \
-+ (save-lisp "$@.core" :init-function (function startup-pvs)))'
-+
- $(cmulisp-devel) $(cmulisp-rt) : $(image-deps) \
- $(pvs-make-files) $(ess) $(ff-files) \
- $(lisp-files) $(cmulisp) lib/prelude.pvs lib/prelude.prf
- @echo "******* Compiling PVS files in CMU Lisp"
- $(MKDIR) -p $(subst $(SYSTEM)-cmulisp,,$@)
-- $(CMULISPEXE) -eval '(load "pvs.system" :verbose t) \
-- (let ((*load-pvs-prelude* nil)) \
-- (mk:operate-on-system :pvs :compile)) \
-- (quit)'
-+ $(CMULISPEXE) -eval $(CMU-LISP-COMPILE-EXPR)
- @echo "******* Building PVS image $@"
-- $(CMULISPEXE) -eval '(load "pvs.system" :verbose t) \
-- (unwind-protect \
-- (mk:operate-on-system :pvs :compile) \
-- (save-lisp "$@.core" \
-- :init-function (function startup-pvs) \
-- ))'
-+ $(CMULISPEXE) -eval $(CMU-BUILD-IMAGE-EXPR)
- -rm $(PVSPATH)BDD/$(PLATFORM)/bdd-cmu.*
- cp $(CMULISPEXE) $(subst $(SYSTEM)-cmulisp,,$@)
- cp $(PVSPATH)BDD/$(PLATFORM)/mu.$(LOAD-FOREIGN-EXTENSION) $(subst $(SYSTEM)-cmulisp,,$@)
diff --git a/sci-mathematics/pvs/files/pvs-4.2-patch-sbcl b/sci-mathematics/pvs/files/pvs-4.2-patch-sbcl
deleted file mode 100644
index 4fdc4fe46..000000000
--- a/sci-mathematics/pvs/files/pvs-4.2-patch-sbcl
+++ /dev/null
@@ -1,6847 +0,0 @@
-diff -Naur pvs4.2-orig/BDD/bdd-allegro.lisp pvs4.2-sbcl/BDD/bdd-allegro.lisp
---- pvs4.2-orig/BDD/bdd-allegro.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/BDD/bdd-allegro.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -39,6 +39,13 @@
-
- ;;; #define NULL_LIST ((LIST) 0)
-
-+;;; int null_list_p (LIST x)
-+(ff:def-foreign-call (null_list_p "bdd___null_list_p")
-+ ((x :unsigned-int integer))
-+ #+(version>= 6) :strings-convert #+(version>= 6) nil
-+ :arg-checking nil
-+ :call-direct t
-+ :returning :unsigned-int)
- ;;; void *elem_contents (LIST_ELEM_PTR x)
- (ff:def-foreign-call (elem_contents "bdd___elem_contents")
- ((x :unsigned-int integer))
-diff -Naur pvs4.2-orig/BDD/bdd-cmu.lisp pvs4.2-sbcl/BDD/bdd-cmu.lisp
---- pvs4.2-orig/BDD/bdd-cmu.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/BDD/bdd-cmu.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -39,6 +39,11 @@
-
- ;;; #define NULL_LIST ((LIST) 0)
-
-+;;; int null_list_p (LIST x)
-+(alien:def-alien-routine ("bdd___null_list_p" null_list_p)
-+ unsigned-int
-+ (x unsigned-int))
-+
- ;;; void *elem_contents (LIST_ELEM_PTR x)
- (alien:def-alien-routine ("bdd___elem_contents" elem_contents)
- unsigned-int
-diff -Naur pvs4.2-orig/BDD/bdd-ld-table pvs4.2-sbcl/BDD/bdd-ld-table
---- pvs4.2-orig/BDD/bdd-ld-table 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/BDD/bdd-ld-table 2009-03-24 18:56:17.000000000 +0000
-@@ -4,6 +4,7 @@
- bdd___bdd_poslit_p = bdd_poslit_p ;
- bdd___bdd_neglit_p = bdd_neglit_p ;
- bdd___bdd_equal_p = bdd_equal_p ;
-+bdd___null_list_p = null_list_p ;
- bdd___elem_contents = elem_contents ;
- bdd___list_first = list_first ;
- bdd___list_last = list_last ;
-diff -Naur pvs4.2-orig/BDD/bdd.lisp pvs4.2-sbcl/BDD/bdd.lisp
---- pvs4.2-orig/BDD/bdd.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/BDD/bdd.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -19,6 +19,7 @@
-
- (in-package :pvs)
-
-+(defmacro null-list? (list) `(= (null_list_p ,list) 1))
- (defmacro bdd-void? (bdd) `(= (bdd_void_p ,bdd) 1))
- (defmacro bdd-1? (bdd) `(= (bdd_1_p ,bdd) 1))
- (defmacro bdd-0? (bdd) `(= (bdd_0_p ,bdd) 1))
-@@ -369,12 +370,12 @@
- (pushnew (cons op name) (cdr entry) :test #'eql :key #'cdr))))))
-
- (defun translate-from-bdd-list (bddlist)
-- (let ((bdds (unless (zerop bddlist)
-+ (let ((bdds (unless (null-list? bddlist)
- (translate-from-bdd-list* (list_first bddlist)))))
- (mapcar #'translate-bdd-cube bdds)))
-
- (defun translate-from-bdd-list* (bddlist &optional result)
-- (if (zerop bddlist)
-+ (if (null-list? bddlist)
- (nreverse result)
- (translate-from-bdd-list*
- (list_next bddlist)
-diff -Naur pvs4.2-orig/BDD/bdd-sbcl.lisp pvs4.2-sbcl/BDD/bdd-sbcl.lisp
---- pvs4.2-orig/BDD/bdd-sbcl.lisp 1970-01-01 00:00:00.000000000 +0000
-+++ pvs4.2-sbcl/BDD/bdd-sbcl.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -0,0 +1,550 @@
-+;; --------------------------------------------------------------------
-+;; PVS
-+;; Copyright (C) 2006, SRI International. All Rights Reserved.
-+
-+;; This program is free software; you can redistribute it and/or
-+;; modify it under the terms of the GNU General Public License
-+;; as published by the Free Software Foundation; either version 2
-+;; of the License, or (at your option) any later version.
-+
-+;; This program is distributed in the hope that it will be useful,
-+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+;; GNU General Public License for more details.
-+
-+;; You should have received a copy of the GNU General Public License
-+;; along with this program; if not, write to the Free Software
-+;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+;; --------------------------------------------------------------------
-+
-+(in-package :pvs)
-+
-+;; SO - We load this from pvs-init (in src/pvs.lisp), as it requires mu.so,
-+;; but if mu.so is loaded at save-lisp time, it doesn't work (at least I
-+;; can't get it to).
-+
-+;;; List accessors
-+;;; Lists in the BDD package involve two structures.
-+
-+;;; A LIST is a structure with slots for a first element pointer, a last
-+;;; element pointer, the size, and user-defined info.
-+
-+;;; A LIST_ELEM is a structure with slots for the contents and the next
-+;;; element.
-+
-+;;; #define NULL_LIST ((LIST) 0)
-+
-+;;; void *elem_contents (LIST_ELEM_PTR x)
-+(sb-alien:define-alien-routine ("bdd___elem_contents" elem_contents)
-+ (* t)
-+ (x (* t)))
-+
-+;;; LIST_ELEM_PTR list_first (LIST x)
-+(sb-alien:define-alien-routine ("bdd___list_first" list_first)
-+ (* t)
-+ (x (* t)))
-+
-+;;; LIST_ELEM_PTR list_last (LIST x)
-+(sb-alien:define-alien-routine ("bdd___list_last" list_last)
-+ (* t)
-+ (x (* t)))
-+
-+;;; int list_info (LIST x)
-+(sb-alien:define-alien-routine ("bdd___list_info" list_info)
-+ (integer 32)
-+ (x (* t)))
-+
-+;;; LIST_ELEM_PTR list_next (LIST_ELEM_PTR x)
-+(sb-alien:define-alien-routine ("bdd___list_next" list_next)
-+ (* t)
-+ (x (* t)))
-+
-+;;; This pretty much follows the bdd.doc sections.
-+
-+;;; User settable program parameters
-+;;; --------------------------------
-+;;; int bdd_do_gc; /* default 1 */
-+
-+(sb-alien:define-alien-variable "bdd_do_gc" (integer 32))
-+
-+;;; set_bdd_do_gc (int flag)
-+(declaim (inline set_bdd_do_gc))
-+(defun set_bdd_do_gc (flag)
-+ (setf bdd-do-gc flag))
-+
-+;;; int bdd_do_dynamic_ordering;/* default 1 */
-+(sb-alien:define-alien-variable "bdd_do_dynamic_ordering" (integer 32))
-+
-+;;; set_bdd_do_dynamic_ordering (int flag)
-+(declaim (inline set_bdd_do_dynamic_ordering))
-+(defun set_bdd_do_dynamic_ordering (flag)
-+ (setf bdd-do-dynamic-ordering flag))
-+
-+;;; int bdd_verbose; /* default 0 */
-+(sb-alien:define-alien-variable "bdd_verbose" (integer 32))
-+
-+;;; set_bdd_verbose (int flag)
-+(declaim (inline set_bdd_verbose))
-+(defun set_bdd_verbose (flag)
-+ (setf bdd-verbose flag))
-+
-+;;; int bdd_use_neg_edges; /* default 1*/
-+(sb-alien:define-alien-variable "bdd_use_neg_edges" (integer 32))
-+
-+;;; set_bdd_use_neg_edges (int flag)
-+(declaim (inline set_bdd_use_neg_edges))
-+(defun set_bdd_use_neg_edges (flag)
-+ (setf bdd-use-neg-edges flag))
-+
-+;;; int bdd_use_inv_edges; /* default 1; 0 when bdd_do_dynamic_ordering = 1 */
-+(sb-alien:define-alien-variable "bdd_use_inv_edges" (integer 32))
-+
-+;;; set_bdd_use_inv_edges (int flag)
-+(declaim (inline set_bdd_use_inv_edges))
-+(defun set_bdd_use_inv_edges (flag)
-+ (setf bdd-use-inv-edges flag))
-+
-+;;; int bdd_sizeof_user_data; /* default 0 */
-+;;; int BDD_COMPUTED_TABLE_SIZE;/* default DEFAULT_BDD_COMPUTED_TABLE_SIZE */
-+;;; int BDD_HASHTAB_SIZE; /* default DEFAULT_BDD_HASHTAB_SIZE */
-+;;; int BDD_NR_RANKS; /* default DEFAULT_BDD_NR_RANKS */
-+;;; int BDD_LOAD_FACTOR; /* default DEFAULT_BDD_LOAD_FACTOR */
-+
-+
-+;;; C preprocessor macros:
-+;;; ----------------------
-+
-+;;; Access to fields of BDD struct:
-+
-+;;; BDD_VARID (F)
-+;;; bdd_varid (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_varid" bdd_varid)
-+ (sb-alien:unsigned 32)
-+ (f (* t)))
-+
-+;;; BDD_THEN (F)
-+;;; BDD_ELSE (F)
-+;;; BDD_REFCOUNT (F)
-+;;; BDD_FLAG (F)
-+;;; BDD_MARK (F)
-+
-+
-+;;; Test on terminal nodes:
-+;;; -----------------------
-+
-+;;; BDD_VOID_P (f)
-+;;; int bdd_void_p (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_void_p" bdd_void_p)
-+ (integer 32)
-+ (f (* t)))
-+
-+;;; BDD_1_P (f)
-+;;; bdd_1_p (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_1_p" bdd_1_p)
-+ (integer 32)
-+ (f (* t)))
-+
-+;;; BDD_0_P (f)
-+;;; bdd_0_p (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_0_p" bdd_0_p)
-+ (integer 32)
-+ (f (* t)))
-+
-+;;; BDD_X_P (f)
-+;;; bdd_x_p (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_x_p" bdd_x_p)
-+ (integer 32)
-+ (f (* t)))
-+
-+;;; BDD_CONST_P (f)
-+;;; int bdd_const_p (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_const_p" bdd_const_p)
-+ (integer 32)
-+ (f (* t)))
-+
-+;;; BDD_TERM_P (f)
-+;;; bdd_term_p (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_term_p" bdd_term_p)
-+ (integer 32)
-+ (f (* t)))
-+
-+;;; BDD_LIT_P (f)
-+;;; bdd_lit_p (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_lit_p" bdd_lit_p)
-+ (integer 32)
-+ (f (* t)))
-+
-+;;; BDD_POSLIT_P (f)
-+;;; int bdd_poslit_p (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_poslit_p" bdd_poslit_p)
-+ (integer 32)
-+ (f (* t)))
-+
-+;;; BDD_NEGLIT_P (f)
-+;;; int bdd_neglit_p (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_neglit_p" bdd_neglit_p)
-+ (integer 32)
-+ (f (* t)))
-+
-+;;; BDD_COFACTOR_POS (f)
-+;;; BDDPTR bdd_cofactor_pos_ (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_cofactor_pos_" bdd_cofactor_pos_)
-+ (* t)
-+ (f (* t)))
-+
-+;;; BDD_COFACTOR_NEG (f)
-+;;; BDDPTR bdd_cofactor_neg_ (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_cofactor_neg_" bdd_cofactor_neg_)
-+ (* t)
-+ (f (* t)))
-+
-+;;; void bdd_reset_marks (BDDPTR f)
-+;;; void bdd_traverse_pre (register BDDPTR v, void (*pre_action)(BDDPTR))
-+;;; void bdd_traverse_post (register BDDPTR v, void (*post_action)(BDDPTR))
-+
-+;;; int bdd_size (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_size" bdd_size)
-+ (integer 32)
-+ (f (* t)))
-+
-+;;; int bdd_size_vec (BDDPTR *f_vec, int size)
-+;;; int bdd_size_ceil (BDDPTR f, int ceiling)
-+
-+;;; void bdd_init (void)
-+(sb-alien:define-alien-routine ("bdd___bdd_init" bdd_init)
-+ sb-alien:void)
-+
-+;;; void bdd_free (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_free" bdd_free)
-+ sb-alien:void
-+ (f (* t)))
-+
-+;;; int bdd_gc (void)
-+(sb-alien:define-alien-routine ("bdd___bdd_gc" bdd_gc)
-+ (integer 32))
-+
-+;;; BDDPTR bdd_ite (BDDPTR F, BDDPTR G, BDDPTR H)
-+(sb-alien:define-alien-routine ("bdd___bdd_ite" bdd_ite)
-+ (* t)
-+ (f (* t))
-+ (g (* t))
-+ (h (* t)))
-+
-+;;; BDDPTR bdd_ite_const (BDDPTR F, BDDPTR G, BDDPTR H)
-+(sb-alien:define-alien-routine ("bdd___bdd_ite_const" bdd_ite_const)
-+ (* t)
-+ (f (* t))
-+ (g (* t))
-+ (h (* t)))
-+
-+;;; void bdd_cofactors (BDDPTR f, BDDPTR *vp, BDDPTR *Tp, BDDPTR *Ep)
-+;;; BDDPTR bdd_invert_input_top (BDDPTR f)
-+(sb-alien:define-alien-routine
-+ ("bdd___bdd_invert_input_top" bdd_invert_input_top)
-+ (* t)
-+ (f (* t)))
-+
-+;;; BDDPTR bdd_create_var (int v)
-+(sb-alien:define-alien-routine ("bdd___bdd_create_var" bdd_create_var)
-+ (* t)
-+ (v (integer 32)))
-+
-+;;; BDDPTR bdd_create_var_first (void)
-+(sb-alien:define-alien-routine
-+ ("bdd___bdd_create_var_first" bdd_create_var_first)
-+ (* t))
-+
-+;;; BDDPTR bdd_create_var_before (BDDPTR v)
-+(sb-alien:define-alien-routine
-+ ("bdd___bdd_create_var_before" bdd_create_var_before)
-+ (* t)
-+ (v (* t)))
-+
-+;;; BDDPTR bdd_create_var_after (BDDPTR v)
-+(sb-alien:define-alien-routine
-+ ("bdd___bdd_create_var_after" bdd_create_var_after)
-+ (* t)
-+ (v (* t)))
-+
-+;;; BDDPTR bdd_create_var_last (void)
-+(sb-alien:define-alien-routine
-+ ("bdd___bdd_create_var_last" bdd_create_var_last)
-+ (* t))
-+
-+;;; void bdd_print (FILE *fp, BDDPTR f, char *s)
-+(sb-alien:define-alien-routine ("bdd___bdd_print" bdd_print)
-+ sb-alien:void
-+ (fp (* t))
-+ (f (* t))
-+ (s sb-alien:c-string))
-+
-+;;; void bdd_print_stats (FILE *fp)
-+;;; void bdd_quit (void)
-+(sb-alien:define-alien-routine ("bdd___bdd_quit" bdd_quit)
-+ sb-alien:void)
-+
-+;;; int bdd_memsize (void)
-+;;; int bdd_memsize_limit (void)
-+;;; void bdd_set_memsize_limit_and_handler (int limit, void (*handler) (void))
-+;;; int bdd_nodes_alive (void)
-+(sb-alien:define-alien-routine ("bdd___bdd_nodes_alive" bdd_nodes_alive)
-+ (integer 32))
-+
-+;;; int bdd_nodes_allocated (void)
-+(sb-alien:define-alien-routine
-+ ("bdd___bdd_nodes_allocated" bdd_nodes_allocated)
-+ (integer 32))
-+
-+;;; int bdd_nr_occurs_var (int id)
-+;;; int bdd_compl_p (BDDPTR f, BDDPTR g)
-+;;; int bdd_equal_p (BDDPTR F, BDDPTR G)
-+(sb-alien:define-alien-routine ("bdd___bdd_equal_p" bdd_equal_p)
-+ (integer 32)
-+ (f (* t))
-+ (g (* t)))
-+
-+;;; int bdd_implies_taut (BDDPTR F, BDDPTR G)
-+;;; BDDPTR bdd_not (BDDPTR F)
-+(sb-alien:define-alien-routine ("bdd___bdd_not" bdd_not)
-+ (* t)
-+ (f (* t)))
-+
-+;;; BDDPTR bdd_and (BDDPTR F, BDDPTR G)
-+(sb-alien:define-alien-routine ("bdd___bdd_and" bdd_and)
-+ (* t)
-+ (f (* t))
-+ (g (* t)))
-+
-+;;; BDDPTR bdd_greater (BDDPTR F, BDDPTR G)
-+(sb-alien:define-alien-routine ("bdd___bdd_greater" bdd_greater)
-+ (* t)
-+ (f (* t))
-+ (g (* t)))
-+
-+;;; BDDPTR bdd_less (BDDPTR F, BDDPTR G)
-+(sb-alien:define-alien-routine ("bdd___bdd_less" bdd_less)
-+ (* t)
-+ (f (* t))
-+ (g (* t)))
-+
-+;;; BDDPTR bdd_xor (BDDPTR F, BDDPTR G)
-+(sb-alien:define-alien-routine ("bdd___bdd_xor" bdd_xor)
-+ (* t)
-+ (f (* t))
-+ (g (* t)))
-+
-+;;; BDDPTR bdd_or (BDDPTR F, BDDPTR G)
-+(sb-alien:define-alien-routine ("bdd___bdd_or" bdd_or)
-+ (* t)
-+ (f (* t))
-+ (g (* t)))
-+
-+;;; BDDPTR bdd_nor (BDDPTR F, BDDPTR G)
-+(sb-alien:define-alien-routine ("bdd___bdd_nor" bdd_nor)
-+ (* t)
-+ (f (* t))
-+ (g (* t)))
-+
-+;;; BDDPTR bdd_equiv (BDDPTR F, BDDPTR G)
-+(sb-alien:define-alien-routine ("bdd___bdd_equiv" bdd_equiv)
-+ (* t)
-+ (f (* t))
-+ (g (* t)))
-+
-+;;; BDDPTR bdd_xnor (BDDPTR F, BDDPTR G) /* equivalent to bdd_equiv */
-+(sb-alien:define-alien-routine ("bdd___bdd_xnor" bdd_xnor)
-+ (* t)
-+ (f (* t))
-+ (g (* t)))
-+
-+;;; BDDPTR bdd_implied (BDDPTR F, BDDPTR G)
-+(sb-alien:define-alien-routine ("bdd___bdd_implied" bdd_implied)
-+ (* t)
-+ (f (* t))
-+ (g (* t)))
-+
-+;;; BDDPTR bdd_implies (BDDPTR F, BDDPTR G)
-+(sb-alien:define-alien-routine ("bdd___bdd_implies" bdd_implies)
-+ (* t)
-+ (f (* t))
-+ (g (* t)))
-+
-+;;; BDDPTR bdd_nand (BDDPTR F, BDDPTR G)
-+(sb-alien:define-alien-routine ("bdd___bdd_nand" bdd_nand)
-+ (* t)
-+ (f (* t))
-+ (g (* t)))
-+
-+;;; BDDPTR bdd_0 (void)
-+(sb-alien:define-alien-routine ("bdd___bdd_0" bdd_0)
-+ (* t))
-+
-+;;; BDDPTR bdd_1 (void)
-+(sb-alien:define-alien-routine ("bdd___bdd_1" bdd_1)
-+ (* t))
-+
-+;;; BDDPTR bdd_X (void)
-+(sb-alien:define-alien-routine ("bdd___bdd_X" bdd_X)
-+ (* t))
-+
-+;;; BDDPTR bdd_assign (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_assign" bdd_assign)
-+ (* t)
-+ (f (* t)))
-+
-+;;; BDDPTR bdd_top_var (BDDPTR f)
-+;;; int bdd_top_var_rank (BDDPTR f)
-+;;; BDDPTR bdd_then (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_then" bdd_then)
-+ (* t)
-+ (f (* t)))
-+
-+;;; BDDPTR bdd_else (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_else" bdd_else)
-+ (* t)
-+ (f (* t)))
-+
-+;;; BDDPTR bdd_apply (BDDPTR (*f)(BDDPTR,BDDPTR),BDDPTR a,BDDPTR b)
-+(sb-alien:define-alien-routine ("bdd___bdd_apply" bdd_apply)
-+ (* t)
-+ (f (* t))
-+ (a (* t))
-+ (b (* t)))
-+
-+;;; BDDPTR bdd_constrain (BDDPTR f, BDDPTR c)
-+(sb-alien:define-alien-routine ("bdd___bdd_constrain" bdd_constrain)
-+ (* t)
-+ (f (* t))
-+ (c (* t)))
-+
-+;;; BDDPTR bdd_top_var (BDDPTR f)
-+(sb-alien:define-alien-routine ("bdd___bdd_top_var" bdd_top_var)
-+ (* t)
-+ (f (* t)))
-+
-+;;; BDD_LIST bdd_sum_of_cubes (BDDPTR f, int irredundant)
-+(sb-alien:define-alien-routine ("bdd___bdd_sum_of_cubes" bdd_sum_of_cubes)
-+ (* t)
-+ (f (* t))
-+ (irredundant (integer 32)))
-+
-+(sb-alien:define-alien-variable ("bdd_interrupted" bdd_interrupted) (integer 32))
-+
-+;;; The following were obtained by looking through mu.c and collecting
-+;;; functions not mentioned above.
-+
-+;;; int bdd_reorder_var (int var_id, int target_var_id)
-+(sb-alien:define-alien-routine ("bdd___bdd_reorder_var" bdd_reorder_var)
-+ (integer 32)
-+ (var_id (integer 32))
-+ (target_var (integer 32)))
-+
-+;;; BDDPTR bdd_and_smooth (BDDPTR f, BDDPTR g, BDD_LIST vars)
-+(sb-alien:define-alien-routine ("bdd___bdd_and_smooth" bdd_and_smooth)
-+ (* t)
-+ (f (* t))
-+ (g (* t))
-+ (vars (* t)))
-+
-+;;; BDD_LIST bdd_rank_order_vars (BDD_LIST vars)
-+(sb-alien:define-alien-routine
-+ ("bdd___bdd_rank_order_vars" bdd_rank_order_vars)
-+ (* t)
-+ (vars (* t)))
-+
-+;;; BDDPTR bdd_quantify (int existential, BDDPTR f, BDD_LIST vars)
-+(sb-alien:define-alien-routine ("bdd___bdd_quantify" bdd_quantify)
-+ (* t)
-+ (existential (integer 32))
-+ (f (* t))
-+ (vars (* t)))
-+
-+;;; BDDPTR bdd_subst_par (BDDPTR *f_vec, BDD_LIST vars, BDDPTR g)
-+(sb-alien:define-alien-routine ("bdd___bdd_subst_par" bdd_subst_par)
-+ (* t)
-+ (f_vec (array (* t)))
-+ (vars (* t))
-+ (g (* t)))
-+
-+;;; BDDPTR bdd_subst_par_list (BDD_LIST f_list, BDD_LIST vars, BDDPTR g)
-+(sb-alien:define-alien-routine ("bdd___bdd_subst_par_list" bdd_subst_par_list)
-+ (* t)
-+ (f_list (* t))
-+ (vars (* t))
-+ (g (* t)))
-+
-+;;; void bdd_free_vec (BDDPTR *f_vec, int size)
-+(sb-alien:define-alien-routine ("bdd___bdd_free_vec" bdd_free_vec)
-+ sb-alien:void
-+ (f_vec (array (* t)))
-+ (size (integer 32)))
-+
-+;;; const char *bdd_get_output_string (int idx)
-+(sb-alien:define-alien-routine
-+ ("bdd___bdd_get_output_string" bdd_get_output_string)
-+ sb-alien:c-string
-+ (idx (integer 32)))
-+
-+;;; void bdd_set_output_string (int idx, const char *str)
-+(sb-alien:define-alien-routine
-+ ("bdd___bdd_set_output_string" bdd_set_output_string)
-+ sb-alien:void
-+ (idx (integer 32))
-+ (str sb-alien:c-string))
-+
-+;;; void bdd_print_as_sum_of_cubes (FILE *fp, BDDPTR f, int irredundant)
-+(sb-alien:define-alien-routine
-+ ("bdd___bdd_print_as_sum_of_cubes" bdd_print_as_sum_of_cubes)
-+ sb-alien:void
-+ (fp (* t))
-+ (f (* t))
-+ (irredundant (integer 32)))
-+
-+;;; BDDPTR bdd_diff (BDDPTR f, BDD_LIST vars)
-+(sb-alien:define-alien-routine ("bdd___bdd_diff" bdd_diff)
-+ (* t)
-+ (f (* t))
-+ (vars (* t)))
-+
-+;;; BDDPTR bdd_one_of_vec (BDDPTR *vec, int size)
-+(sb-alien:define-alien-routine ("bdd___bdd_one_of_vec" bdd_one_of_vec)
-+ (* t)
-+ (vec (array (* t)))
-+ (size (integer 32)))
-+
-+;;; BDDPTR bdd_none_of_vec (BDDPTR *args, int size)
-+(sb-alien:define-alien-routine ("bdd___bdd_none_of_vec" bdd_none_of_vec)
-+ (* t)
-+ (args (array (* t)))
-+ (size (integer 32)))
-+
-+;;; BDDPTR bdd_subst (BDDPTR f, int var, BDDPTR g)
-+(sb-alien:define-alien-routine ("bdd___bdd_subst" bdd_subst)
-+ (* t)
-+ (f (* t))
-+ (var (integer 32))
-+ (g (* t)))
-+
-+;;; BDD_LIST bdd_sum_of_cubes_as_list (BDDPTR f)
-+(sb-alien:define-alien-routine
-+ ("bdd___bdd_sum_of_cubes_as_list" bdd_sum_of_cubes_as_list)
-+ (* t)
-+ (f (* t)))
-+
-+;;; int bdd_traverse_cube (BDDPTR cube,
-+;;; void (*action) (int index, int neg, int first))
-+(sb-alien:define-alien-routine ("bdd___bdd_traverse_cube" bdd_traverse_cube)
-+ (integer 32)
-+ (cube (* t))
-+ (action (* t)))
-+
-+;;; BDD_LIST bdd_support_as_list_of_vars (BDDPTR f)
-+(sb-alien:define-alien-routine
-+ ("bdd___bdd_support_as_list_of_vars" bdd_support_as_list_of_vars)
-+ (* t)
-+ (f (* t)))
-+
-+(defun bdd-interrupted? ()
-+ (not (zerop 'bdd_interrupted)))
-+
-+(bdd_init)
-diff -Naur pvs4.2-orig/BDD/bdd_table.c pvs4.2-sbcl/BDD/bdd_table.c
---- pvs4.2-orig/BDD/bdd_table.c 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/BDD/bdd_table.c 2009-03-24 18:56:17.000000000 +0000
-@@ -8,6 +8,8 @@
-
- int bdd___bdd_equal_p (BDDPTR F, BDDPTR G) {return bdd_equal_p (F, G);}
-
-+int bdd___null_list_p (LIST x) {return null_list_p (x);}
-+
- void bdd___elem_contents (LIST_ELEM_PTR x) {elem_contents (x);}
-
- LIST_ELEM_PTR bdd___list_first (LIST x) {
-diff -Naur pvs4.2-orig/BDD/ix86_64-Linux/Makefile pvs4.2-sbcl/BDD/ix86_64-Linux/Makefile
---- pvs4.2-orig/BDD/ix86_64-Linux/Makefile 1970-01-01 00:00:00.000000000 +0000
-+++ pvs4.2-sbcl/BDD/ix86_64-Linux/Makefile 2009-03-24 18:56:17.000000000 +0000
-@@ -0,0 +1,48 @@
-+BDD = ../bdd/src
-+MU = ../mu/src
-+UTILS = ../bdd/utils
-+INCLUDES = -I/usr/include -I$(BDD) -I$(UTILS) -I$(MU)
-+LD = ld
-+LDFLAGS = -Bsymbolic -shared -warn-once -L./
-+CC = gcc
-+CFLAGS = -D_POSIX_SOURCE -DSYSV $(INCLUDES) -DLINUX -DLINUX_REDHAT5 -DSIGNALS_LINUX -fPIC
-+XCFLAGS = -O
-+SHELL = /bin/sh
-+VPATH = ..:../bdd/utils:../bdd/src:../mu/src
-+
-+muobj = bdd_interface.o bdd.o bdd_factor.o bdd_quant.o bdd_fns.o bdd_vfns.o \
-+ appl.o mu_interface.o mu.o
-+
-+utilobj = double.o list.o hash.o alloc.o
-+
-+.SUFFIXES:
-+.SUFFIXES: .c .o
-+.c.o : ; $(CC) $(XCFLAGS) ${CFLAGS} -c $< -o $@
-+
-+all : mu.so
-+
-+mu.so : ${muobj} libutils.a ../bdd-ld-table ../mu-ld-table
-+ $(LD) ../bdd-ld-table ../mu-ld-table $(LDFLAGS) -o mu.so ${muobj} -lutils -lm -lbsd
-+
-+libutils.a : ${utilobj}
-+ ar r libutils.a ${utilobj}
-+ ranlib libutils.a
-+
-+bdd_interface.o : bdd_interface.c bdd_fns.h
-+bdd_factor.o : bdd_factor.c bdd_factor.h
-+bdd.o : bdd.c bdd.h bdd_extern.h
-+bdd_fns.o : bdd_fns.c bdd_fns.h bdd.h bdd_extern.h
-+bdd_quant.o : bdd_quant.c bdd_fns.h bdd.h bdd_extern.h
-+bdd_vfns.o : bdd_vfns.c bdd_vfns.h bdd_fns.h bdd.h bdd_extern.h
-+
-+mu_interface.o : mu_interface.c mu.h
-+mu.o : mu.c mu.h
-+
-+double.o : double.c double.h
-+list.o : list.c list.h alloc.h
-+hash.o : hash.c hash.h alloc.h
-+alloc.o : alloc.c
-+
-+clean :
-+ rm -f *.o *.a *.so
-+
-diff -Naur pvs4.2-orig/BDD/mu-sbcl.lisp pvs4.2-sbcl/BDD/mu-sbcl.lisp
---- pvs4.2-orig/BDD/mu-sbcl.lisp 1970-01-01 00:00:00.000000000 +0000
-+++ pvs4.2-sbcl/BDD/mu-sbcl.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -0,0 +1,248 @@
-+;; --------------------------------------------------------------------
-+;; PVS
-+;; Copyright (C) 2006, SRI International. All Rights Reserved.
-+
-+;; This program is free software; you can redistribute it and/or
-+;; modify it under the terms of the GNU General Public License
-+;; as published by the Free Software Foundation; either version 2
-+;; of the License, or (at your option) any later version.
-+
-+;; This program is distributed in the hope that it will be useful,
-+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+;; GNU General Public License for more details.
-+
-+;; You should have received a copy of the GNU General Public License
-+;; along with this program; if not, write to the Free Software
-+;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+;; --------------------------------------------------------------------
-+(in-package :pvs)
-+
-+
-+;;;;;;;;;;;;;;;;;
-+;;; Formula ;;;
-+;;;;;;;;;;;;;;;;;
-+
-+;;; Formula mu_mk_false_formula (void)
-+(sb-alien:define-alien-routine ("mu___mu_mk_false_formula" mu_mk_false_formula)
-+ (* t))
-+
-+;;; Formula mu_mk_true_formula (void)
-+(sb-alien:define-alien-routine ("mu___mu_mk_true_formula" mu_mk_true_formula)
-+ (* t))
-+
-+;;; Formula mu_mk_bool_var (char *name)
-+(sb-alien:define-alien-routine ("mu___mu_mk_bool_var" mu_mk_bool_var)
-+ (* t)
-+ (name sb-alien:c-string))
-+
-+;;; int mu_check_bool_var (char *name)
-+(sb-alien:define-alien-routine ("mu___mu_check_bool_var" mu_check_bool_var)
-+ (integer 32)
-+ (var sb-alien:c-string))
-+
-+;;; Formula mu_check_mk_bool_var (char *name)
-+(sb-alien:define-alien-routine
-+ ("mu___mu_check_mk_bool_var" mu_check_mk_bool_var)
-+ (* t)
-+ (name sb-alien:c-string))
-+
-+;;; Formula mu_mk_ite_formula (Formula cond, Formula then_part, Formula else_part)
-+(sb-alien:define-alien-routine ("mu___mu_mk_ite_formula" mu_mk_ite_formula)
-+ (* t)
-+ (cnd (* t))
-+ (then_part (* t))
-+ (else_part (* t)))
-+
-+;;; Formula mu_mk_curry_application (Term R, LIST subs)
-+(sb-alien:define-alien-routine
-+ ("mu___mu_mk_curry_application" mu_mk_curry_application)
-+ (* t)
-+ (R (* t))
-+ (subs (* t)))
-+
-+;;; Formula mu_mk_application (Term R, LIST subs, int curried)
-+(sb-alien:define-alien-routine ("mu___mu_mk_application" mu_mk_application)
-+ (* t)
-+ (R (* t))
-+ (subs (* t))
-+ (curried (integer 32)))
-+
-+;;; Formula mu_mk_forall (LIST listvars, Formula fml)
-+(sb-alien:define-alien-routine ("mu___mu_mk_forall" mu_mk_forall)
-+ (* t)
-+ (listvars (* t))
-+ (fml (* t)))
-+
-+;;; Formula mu_mk_exists (LIST listvars, Formula fml)
-+(sb-alien:define-alien-routine ("mu___mu_mk_exists" mu_mk_exists)
-+ (* t)
-+ (listvars (* t))
-+ (fml (* t)))
-+
-+;;; Formula mu_mk_implies_formula (Formula fml1, Formula fml2)
-+(sb-alien:define-alien-routine
-+ ("mu___mu_mk_implies_formula" mu_mk_implies_formula)
-+ (* t)
-+ (fml1 (* t))
-+ (fml2 (* t)))
-+
-+;;; Formula mu_mk_equiv_formula (Formula fml1, Formula fml2)
-+(sb-alien:define-alien-routine ("mu___mu_mk_equiv_formula" mu_mk_equiv_formula)
-+ (* t)
-+ (fml1 (* t))
-+ (fml2 (* t)))
-+
-+;;; Formula mu_mk_or_formula (Formula fml1, Formula fml2)
-+(sb-alien:define-alien-routine ("mu___mu_mk_or_formula" mu_mk_or_formula)
-+ (* t)
-+ (fml1 (* t))
-+ (fml2 (* t)))
-+
-+;;; Formula mu_mk_and_formula (Formula fml1, Formula fml2)
-+(sb-alien:define-alien-routine ("mu___mu_mk_and_formula" mu_mk_and_formula)
-+ (* t)
-+ (fml1 (* t))
-+ (fml2 (* t)))
-+
-+;;; Formula mu_mk_not_formula (Formula fml)
-+(sb-alien:define-alien-routine ("mu___mu_mk_not_formula" mu_mk_not_formula)
-+ (* t)
-+ (fml (* t)))
-+
-+;;; Formula mu_mk_cofactor (Formula fml1, Formula fml2)
-+(sb-alien:define-alien-routine ("mu___mu_mk_cofactor" mu_mk_cofactor)
-+ (* t)
-+ (fml1 (* t))
-+ (fml2 (* t)))
-+
-+;;;;;;;;;;;;;;;
-+;;; Term ;;;
-+;;;;;;;;;;;;;;;
-+;;; Term mu_mk_abstraction (LIST vars, Formula f1)
-+(sb-alien:define-alien-routine ("mu___mu_mk_abstraction" mu_mk_abstraction)
-+ (* t)
-+ (vars (* t))
-+ (f1 (* t)))
-+;;; Term mu_mk_l_fixed_point (int relvar, Term fml1)
-+(sb-alien:define-alien-routine ("mu___mu_mk_l_fixed_point" mu_mk_l_fixed_point)
-+ (* t)
-+ (relvar (integer 32))
-+ (fml1 (* t)))
-+;;; Term mu_mk_g_fixed_point (int relvar, Term fml1)
-+(sb-alien:define-alien-routine ("mu___mu_mk_g_fixed_point" mu_mk_g_fixed_point)
-+ (* t)
-+ (relvar (integer 32))
-+ (fml1 (* t)))
-+;;; Term mu_mk_reach (Term Next, Term S0, Term Inv)
-+(sb-alien:define-alien-routine ("mu___mu_mk_reach" mu_mk_reach)
-+ (* t)
-+ (Next (* t))
-+ (S0 (* t))
-+ (Inv (* t)))
-+;;; Term mu_mk_rel_var_dcl (char *name)
-+(sb-alien:define-alien-routine ("mu___mu_mk_rel_var_dcl" mu_mk_rel_var_dcl)
-+ (* t)
-+ (name sb-alien:c-string))
-+;;; Term mu_mk_rel_var_ (char *name)
-+(sb-alien:define-alien-routine ("mu___mu_mk_rel_var_" mu_mk_rel_var_)
-+ (* t)
-+ (name sb-alien:c-string))
-+;;; Term mu_mk_true_term (void)
-+(sb-alien:define-alien-routine ("mu___mu_mk_true_term" mu_mk_true_term)
-+ (* t))
-+;;; Term mu_mk_false_term (void)
-+(sb-alien:define-alien-routine ("mu___mu_mk_false_term" mu_mk_false_term)
-+ (* t))
-+;;; Term mu_mk_not_term (Term fml1)
-+(sb-alien:define-alien-routine ("mu___mu_mk_not_term" mu_mk_not_term)
-+ (* t)
-+ (fml1 (* t)))
-+;;; Term mu_mk_and_term (Term fml1, Term fml2)
-+(sb-alien:define-alien-routine ("mu___mu_mk_and_term" mu_mk_and_term)
-+ (* t)
-+ (fml1 (* t))
-+ (fml2 (* t)))
-+;;; Term mu_mk_or_term (Term fml1, Term fml2)
-+(sb-alien:define-alien-routine ("mu___mu_mk_or_term" mu_mk_or_term)
-+ (* t)
-+ (fml1 (* t))
-+ (fml2 (* t)))
-+;;; Term mu_mk_equiv_term (Term fml1, Term fml2)
-+(sb-alien:define-alien-routine ("mu___mu_mk_equiv_term" mu_mk_equiv_term)
-+ (* t)
-+ (fml1 (* t))
-+ (fml2 (* t)))
-+;;; Term mu_mk_implies_term (Term fml1, Term fml2)
-+(sb-alien:define-alien-routine ("mu___mu_mk_implies_term" mu_mk_implies_term)
-+ (* t)
-+ (fml1 (* t))
-+ (fml2 (* t)))
-+;;; const char *get_mu_bool_var_name (int bdd_idx)
-+(sb-alien:define-alien-routine
-+ ("mu___get_mu_bool_var_name" get_mu_bool_var_name)
-+ sb-alien:c-string
-+ (bdd_idx (integer 32)))
-+
-+;;;;;;;;;;;;;;;;;;;
-+;;; Lists ;;;
-+;;;;;;;;;;;;;;;;;;;
-+
-+;;; LIST append_cont (void *p, LIST list)
-+(sb-alien:define-alien-routine ("mu___append_cont" append_cont)
-+ (* t)
-+ (p (* t))
-+ (list (* t)))
-+;;; LIST empty_list (void)
-+(sb-alien:define-alien-routine ("mu___empty_list" empty_list)
-+ (* t))
-+
-+;;;
-+;;; Flags
-+
-+;;; int set_mu_warnings (int flag)
-+(sb-alien:define-alien-routine ("mu___set_mu_warnings" set_mu_warnings)
-+ (integer 32)
-+ (flag (integer 32)))
-+;;; int set_mu_simplify_frontier (int flag)
-+(sb-alien:define-alien-routine
-+ ("mu___set_mu_simplify_frontier" set_mu_simplify_frontier)
-+ (integer 32)
-+ (flag (integer 32)))
-+;;; int set_mu_verbose (int flag)
-+(sb-alien:define-alien-routine ("mu___set_mu_verbose" set_mu_verbose)
-+ (integer 32)
-+ (flag (integer 32)))
-+
-+;;
-+;;
-+;; GC management: not needed, "modelcheck_formula" takes care of it.
-+;;
-+
-+;;;;;;;;;;;;;;;;;;;
-+;;; print ;;;
-+;;;;;;;;;;;;;;;;;;;
-+
-+;;; void pvs_mu_print_formula (Formula fml)
-+(sb-alien:define-alien-routine
-+ ("mu___pvs_mu_print_formula" pvs_mu_print_formula)
-+ sb-alien:void
-+ (fml (* t)))
-+;;; void pvs_mu_print_term (Term t)
-+(sb-alien:define-alien-routine ("mu___pvs_mu_print_term" pvs_mu_print_term)
-+ sb-alien:void
-+ (term (* t)))
-+
-+;;;;;;;;;;;;;;;;;;;;;;;;;
-+;;; Main function ;;;;;
-+;;;;;;;;;;;;;;;;;;;;;;;;;
-+
-+;;; void mu_init (void)
-+(sb-alien:define-alien-routine ("mu___mu_init" mu_init)
-+ sb-alien:void)
-+(sb-alien:define-alien-routine ("mu___mu_quit" mu_quit)
-+ sb-alien:void)
-+;;; BDDPTR mu___modelcheck_formula (Formula fml)
-+(sb-alien:define-alien-routine ("mu___modelcheck_formula" modelcheck_formula)
-+ (* t)
-+ (fml (* t)))
-diff -Naur pvs4.2-orig/bin/make-dist pvs4.2-sbcl/bin/make-dist
---- pvs4.2-orig/bin/make-dist 2008-07-19 21:49:18.000000000 +0000
-+++ pvs4.2-sbcl/bin/make-dist 2009-03-24 18:56:17.000000000 +0000
-@@ -91,16 +91,18 @@
- src/groundeval/*.lisp \
- src/utils/*.lisp \
- src/utils/ix86-Linux/Makefile src/utils/ix86-MacOSX/Makefile \
-+ src/utils/ix86_64-Linux/Makefile \
- src/utils/powerpc-MacOSX/Makefile \
- src/utils/sun4-SunOS5/Makefile \
- BDD/bdd-ld-table BDD/mu-ld-table \
- BDD/*.c \
- BDD/*.lisp \
-- BDD/ix86-Linux/Makefile BDD/sun4-SunOS5/Makefile \
-+ BDD/ix86-Linux/Makefile BDD/ix86_64-Linux/Makefile BDD/sun4-SunOS5/Makefile \
- BDD/ix86-MacOSX/Makefile BDD/powerpc-MacOSX/Makefile \
- BDD/bdd BDD/mu \
- src/WS1S/README src/WS1S/ws1s-ld-table \
- src/WS1S/*.c src/WS1S/mona-1.4 \
-+ src/WS1S/ix86_64-Linux/Makefile
- src/WS1S/ix86-Linux/Makefile src/WS1S/sun4-SunOS5/Makefile \
- src/WS1S/ix86-MacOSX/Makefile src/WS1S/powerpc-MacOSX/Makefile \
- doc/pvs.bib doc/makebnf.sty doc/pvstex.tex doc/release-notes \
-@@ -155,7 +157,7 @@
- # echo "pvs-libraries.tgz not created - need to typecheck finite_sets and bitvectors"
- # fi
-
--for platform in ix86-Linux ix86-MacOSX powerpc-MacOSX \
-+for platform in ix86-Linux ix86_64-Linux ix86-MacOSX powerpc-MacOSX \
- sun4-SunOS5
- do
- for subdir in runtime devel
-@@ -199,5 +201,22 @@
- else
- echo "CMU Lisp ${subdir} not available for ${platform}"
- fi
-+ if [ -e bin/${platform}/${subdir}/pvs-sbclisp -a "$subdir" = "runtime" ]
-+ then
-+ echo Creating pvs-${version}-${platform}-sbclisp${kind}.tgz
-+ tar ${TARFLAGS} -f pvs-${version}-${platform}-sbclisp${kind}.tgz \
-+ ${pvssystemfiles} \
-+ bin/${platform}/b64 bin/relocate \
-+ bin/pvs-platform bin/tar-b64-mail \
-+ bin/${platform}/${subdir}/mu.* \
-+ bin/${platform}/${subdir}/file_utils.* \
-+ bin/${platform}/${subdir}/ws1s.* \
-+ bin/${platform}/${subdir}/*-sbcl.* \
-+ bin/${platform}/${subdir}/lisp \
-+ bin/${platform}/${subdir}/pvs-sbclisp*
-+ ls -l pvs-${version}-${platform}-sbclisp${kind}.tgz
-+ else
-+ echo "SBCL ${subdir} not available for ${platform}"
-+ fi
- done
- done
-diff -Naur pvs4.2-orig/bin/pvs-platform pvs4.2-sbcl/bin/pvs-platform
---- pvs4.2-orig/bin/pvs-platform 2007-07-16 06:28:06.000000000 +0000
-+++ pvs4.2-sbcl/bin/pvs-platform 2009-03-24 18:56:17.000000000 +0000
-@@ -33,7 +33,11 @@
- esac
- os=SunOS
- os_version=`uname -r | cut -d"." -f1`;;
-- Linux) arch=ix86
-+ Linux) case `uname -m` in
-+ x86_64) arch=ix86_64;;
-+ i*86) arch=ix86;;
-+ x86*) arch=ix86;;
-+ esac
- os=Linux;;
- AIX) arch=powerpc-ibm
- os=AIX
-diff -Naur pvs4.2-orig/config.guess pvs4.2-sbcl/config.guess
---- pvs4.2-orig/config.guess 2007-07-02 20:07:43.000000000 +0000
-+++ pvs4.2-sbcl/config.guess 2009-03-24 18:56:17.000000000 +0000
-@@ -1,9 +1,10 @@
- #! /bin/sh
- # Attempt to guess a canonical system name.
- # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
--# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-+# Free Software Foundation, Inc.
-
--timestamp='2003-06-17'
-+timestamp='2008-12-19'
-
- # This file is free software; you can redistribute it and/or modify it
- # under the terms of the GNU General Public License as published by
-@@ -17,13 +18,15 @@
- #
- # You should have received a copy of the GNU General Public License
- # along with this program; if not, write to the Free Software
--# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-+# 02110-1301, USA.
- #
- # As a special exception to the GNU General Public License, if you
- # distribute this file as part of a program that contains a
- # configuration script generated by Autoconf, you may include it under
- # the same distribution terms that you use for the rest of that program.
-
-+
- # Originally written by Per Bothner <per@bothner.com>.
- # Please send patches to <config-patches@gnu.org>. Submit a context
- # diff and a properly formatted ChangeLog entry.
-@@ -53,8 +56,8 @@
- GNU config.guess ($timestamp)
-
- Originally written by Per Bothner.
--Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
--Free Software Foundation, Inc.
-+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
- This is free software; see the source for copying conditions. There is NO
- warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-@@ -66,11 +69,11 @@
- while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
-- echo "$timestamp" ; exit 0 ;;
-+ echo "$timestamp" ; exit ;;
- --version | -v )
-- echo "$version" ; exit 0 ;;
-+ echo "$version" ; exit ;;
- --help | --h* | -h )
-- echo "$usage"; exit 0 ;;
-+ echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
-@@ -104,7 +107,7 @@
- trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
- trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
- : ${TMPDIR=/tmp} ;
-- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
-+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-@@ -123,7 +126,7 @@
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
--esac ;'
-+esac ; set_cc_for_build= ;'
-
- # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
- # (ghazi@noc.rutgers.edu 1994-08-24)
-@@ -136,13 +139,6 @@
- UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
- UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
--## for Red Hat Linux
--if test -f /etc/redhat-release ; then
-- VENDOR=redhat ;
--else
-- VENDOR= ;
--fi
--
- # Note: order is significant - the case branches are not exclusive.
-
- case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-@@ -165,6 +161,7 @@
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
-+ sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
-@@ -203,50 +200,32 @@
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
-- exit 0 ;;
-- amiga:OpenBSD:*:*)
-- echo m68k-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-- arc:OpenBSD:*:*)
-- echo mipsel-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-- hp300:OpenBSD:*:*)
-- echo m68k-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-- mac68k:OpenBSD:*:*)
-- echo m68k-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-- macppc:OpenBSD:*:*)
-- echo powerpc-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-- mvme68k:OpenBSD:*:*)
-- echo m68k-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-- mvme88k:OpenBSD:*:*)
-- echo m88k-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-- mvmeppc:OpenBSD:*:*)
-- echo powerpc-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-- pmax:OpenBSD:*:*)
-- echo mipsel-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-- sgi:OpenBSD:*:*)
-- echo mipseb-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-- sun3:OpenBSD:*:*)
-- echo m68k-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-- wgrisc:OpenBSD:*:*)
-- echo mipsel-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- *:OpenBSD:*:*)
-- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-+ exit ;;
-+ *:ekkoBSD:*:*)
-+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-+ exit ;;
-+ *:SolidBSD:*:*)
-+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-+ exit ;;
-+ macppc:MirBSD:*:*)
-+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-+ exit ;;
-+ *:MirBSD:*:*)
-+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-+ exit ;;
- alpha:OSF1:*:*)
-- if test $UNAME_RELEASE = "V4.0"; then
-+ case $UNAME_RELEASE in
-+ *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-- fi
-+ ;;
-+ *5.*)
-+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-+ ;;
-+ esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
-@@ -284,42 +263,49 @@
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
-+ # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
-- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-- exit 0 ;;
-- Alpha*:OpenVMS:*:*)
-- echo alpha-hp-vms
-- exit 0 ;;
-+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-+ exit ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
-- exit 0 ;;
-+ exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
-- exit 0 ;;
-+ exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
-- exit 0;;
-+ exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
-- exit 0 ;;
-+ exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
-- exit 0 ;;
-+ exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
-- exit 0 ;;
-+ exit ;;
-+ *:z/VM:*:*)
-+ echo s390-ibm-zvmoe
-+ exit ;;
-+ *:OS400:*:*)
-+ echo powerpc-ibm-os400
-+ exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
-- exit 0;;
-+ exit ;;
-+ arm:riscos:*:*|arm:RISCOS:*:*)
-+ echo arm-unknown-riscos
-+ exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
-- exit 0;;
-+ exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
-@@ -327,32 +313,45 @@
- else
- echo pyramid-pyramid-bsd
- fi
-- exit 0 ;;
-+ exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
-- exit 0 ;;
-+ exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
-- exit 0 ;;
-- DRS?6000:UNIX_SV:4.2*:7*)
-+ exit ;;
-+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
-- sparc) echo sparc-icl-nx7 && exit 0 ;;
-+ sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-- exit 0 ;;
-+ exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-- exit 0 ;;
-- i86pc:SunOS:5.*:*)
-- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-- exit 0 ;;
-+ exit ;;
-+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-+ eval $set_cc_for_build
-+ SUN_ARCH="i386"
-+ # If there is a compiler, see if it is configured for 64-bit objects.
-+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
-+ # This test works for both compilers.
-+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-+ grep IS_64BIT_ARCH >/dev/null
-+ then
-+ SUN_ARCH="x86_64"
-+ fi
-+ fi
-+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-+ exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-- exit 0 ;;
-+ exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
-@@ -361,10 +360,10 @@
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-- exit 0 ;;
-+ exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-@@ -376,10 +375,10 @@
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
-- exit 0 ;;
-+ exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
-@@ -390,37 +389,40 @@
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
-+ m68k:machten:*:*)
-+ echo m68k-apple-machten${UNAME_RELEASE}
-+ exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
-- exit 0 ;;
-+ exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-@@ -444,32 +446,33 @@
- exit (-1);
- }
- EOF
-- $CC_FOR_BUILD -o $dummy $dummy.c \
-- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-- && exit 0
-+ $CC_FOR_BUILD -o $dummy $dummy.c &&
-+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-+ SYSTEM_NAME=`$dummy $dummyarg` &&
-+ { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
-- exit 0 ;;
-+ exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
-- exit 0 ;;
-+ exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
-- exit 0 ;;
-+ exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
-- exit 0 ;;
-+ exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
-- exit 0 ;;
-+ exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
-- exit 0 ;;
-+ exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
-- exit 0 ;;
-+ exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
-@@ -485,29 +488,29 @@
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
-- exit 0 ;;
-+ exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
-- exit 0 ;;
-+ exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
-- exit 0 ;;
-+ exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
-- exit 0 ;;
-+ exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
-- exit 0 ;;
-+ exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-- exit 0 ;;
-+ exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
-- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
-+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
-+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
-- exit 0 ;;
-+ exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
-@@ -515,7 +518,7 @@
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-- exit 0 ;;
-+ exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
-@@ -530,15 +533,19 @@
- exit(0);
- }
- EOF
-- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-- echo rs6000-ibm-aix3.2.5
-+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-+ then
-+ echo "$SYSTEM_NAME"
-+ else
-+ echo rs6000-ibm-aix3.2.5
-+ fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
-- exit 0 ;;
-- *:AIX:*:[45])
-+ exit ;;
-+ *:AIX:*:[456])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
-@@ -551,28 +558,28 @@
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-- exit 0 ;;
-+ exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
-- exit 0 ;;
-+ exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
-- exit 0 ;;
-+ exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
-- exit 0 ;; # report: romp-ibm BSD 4.3
-+ exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
-- exit 0 ;;
-+ exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
-- exit 0 ;;
-+ exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
-- exit 0 ;;
-+ exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
-- exit 0 ;;
-+ exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
-@@ -634,9 +641,19 @@
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
-- # avoid double evaluation of $set_cc_for_build
-- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
-- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
-+ eval $set_cc_for_build
-+
-+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
-+ # generating 64-bit code. GNU and HP use different nomenclature:
-+ #
-+ # $ CC_FOR_BUILD=cc ./config.guess
-+ # => hppa2.0w-hp-hpux11.23
-+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-+ # => hppa64-hp-hpux11.23
-+
-+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-+ grep __LP64__ >/dev/null
- then
- HP_ARCH="hppa2.0w"
- else
-@@ -644,11 +661,11 @@
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-- exit 0 ;;
-+ exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
-- exit 0 ;;
-+ exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-@@ -676,150 +693,192 @@
- exit (0);
- }
- EOF
-- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-+ { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
-- exit 0 ;;
-+ exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
-- exit 0 ;;
-+ exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
-- exit 0 ;;
-+ exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
-- exit 0 ;;
-+ exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
-- exit 0 ;;
-+ exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
-- exit 0 ;;
-+ exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
-- exit 0 ;;
-+ exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
-- exit 0 ;;
-+ exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
-- exit 0 ;;
-+ exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
-- exit 0 ;;
-+ exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
-- exit 0 ;;
-+ exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
-- exit 0 ;;
-+ exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
-- exit 0 ;;
-+ exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-- exit 0 ;;
-+ exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
-- exit 0 ;;
-+ exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-- exit 0 ;;
-+ exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-- exit 0 ;;
-+ exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-- exit 0 ;;
-+ exit ;;
- *:UNICOS/mp:*:*)
-- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-- exit 0 ;;
-+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-+ exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-- exit 0 ;;
-+ exit ;;
-+ 5000:UNIX_System_V:4.*:*)
-+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-+ exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-- exit 0 ;;
-- *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
-- # Determine whether the default compiler uses glibc.
-- eval $set_cc_for_build
-- sed 's/^ //' << EOF >$dummy.c
-- #include <features.h>
-- #if __GLIBC__ >= 2
-- LIBC=gnu
-- #else
-- LIBC=
-- #endif
--EOF
-- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
-- exit 0 ;;
-+ exit ;;
-+ *:FreeBSD:*:*)
-+ case ${UNAME_MACHINE} in
-+ pc98)
-+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-+ amd64)
-+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-+ *)
-+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-+ esac
-+ exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
-- exit 0 ;;
-- i*:MINGW*:*)
-+ exit ;;
-+ *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
-- exit 0 ;;
-+ exit ;;
-+ i*:windows32*:*)
-+ # uname -m includes "-pc" on this system.
-+ echo ${UNAME_MACHINE}-mingw32
-+ exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
-- exit 0 ;;
-- x86:Interix*:[34]*)
-- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
-- exit 0 ;;
-+ exit ;;
-+ *:Interix*:[3456]*)
-+ case ${UNAME_MACHINE} in
-+ x86)
-+ echo i586-pc-interix${UNAME_RELEASE}
-+ exit ;;
-+ EM64T | authenticamd | genuineintel)
-+ echo x86_64-unknown-interix${UNAME_RELEASE}
-+ exit ;;
-+ IA64)
-+ echo ia64-unknown-interix${UNAME_RELEASE}
-+ exit ;;
-+ esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
-- exit 0 ;;
-+ exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
-- exit 0 ;;
-+ exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
-- exit 0 ;;
-+ exit ;;
-+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-+ echo x86_64-unknown-cygwin
-+ exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
-- exit 0 ;;
-+ exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-- exit 0 ;;
-+ exit ;;
- *:GNU:*:*)
-+ # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-- exit 0 ;;
-+ exit ;;
-+ *:GNU/*:*:*)
-+ # other systems with GNU libc and userland
-+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-+ exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
-- exit 0 ;;
-+ exit ;;
- arm*:Linux:*:*)
-+ eval $set_cc_for_build
-+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
-+ | grep -q __ARM_EABI__
-+ then
-+ echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ else
-+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
-+ fi
-+ exit ;;
-+ avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
-- exit 0 ;;
-+ exit ;;
- cris:Linux:*:*)
- echo cris-axis-linux-gnu
-- exit 0 ;;
-+ exit ;;
-+ crisv32:Linux:*:*)
-+ echo crisv32-axis-linux-gnu
-+ exit ;;
-+ frv:Linux:*:*)
-+ echo frv-unknown-linux-gnu
-+ exit ;;
- ia64:Linux:*:*)
-- echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
-- exit 0 ;;
-+ echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ exit ;;
-+ m32r*:Linux:*:*)
-+ echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
-- exit 0 ;;
-+ exit ;;
- mips:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-@@ -836,8 +895,12 @@
- #endif
- #endif
- EOF
-- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
-+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-+ /^CPU/{
-+ s: ::g
-+ p
-+ }'`"
-+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
-@@ -855,15 +918,22 @@
- #endif
- #endif
- EOF
-- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
-+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-+ /^CPU/{
-+ s: ::g
-+ p
-+ }'`"
-+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
-+ or32:Linux:*:*)
-+ echo or32-unknown-linux-gnu
-+ exit ;;
- ppc:Linux:*:*)
-- echo powerpc-${VENDOR:-unknown}-linux-gnu
-- exit 0 ;;
-+ echo powerpc-unknown-linux-gnu
-+ exit ;;
- ppc64:Linux:*:*)
-- echo powerpc64-${VENDOR:-unknown}-linux-gnu
-- exit 0 ;;
-+ echo powerpc64-unknown-linux-gnu
-+ exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
-@@ -877,7 +947,10 @@
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-- exit 0 ;;
-+ exit ;;
-+ padre:Linux:*:*)
-+ echo sparc-unknown-linux-gnu
-+ exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-@@ -885,25 +958,31 @@
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
-- exit 0 ;;
-+ exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
-- exit 0 ;;
-+ exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
-- echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
-- exit 0 ;;
-+ echo ${UNAME_MACHINE}-ibm-linux
-+ exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
-- exit 0 ;;
-+ exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
-- exit 0 ;;
-+ exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
-- exit 0 ;;
-+ exit ;;
-+ vax:Linux:*:*)
-+ echo ${UNAME_MACHINE}-dec-linux-gnu
-+ exit ;;
- x86_64:Linux:*:*)
-- echo x86_64-${VENDOR:-unknown}-linux-gnu
-- exit 0 ;;
-+ echo x86_64-unknown-linux-gnu
-+ exit ;;
-+ xtensa*:Linux:*:*)
-+ echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
-@@ -921,15 +1000,12 @@
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-- exit 0 ;;
-- coff-i386)
-- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-- exit 0 ;;
-+ exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-- exit 0 ;;
-+ exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
-@@ -946,23 +1022,33 @@
- LIBC=gnulibc1
- # endif
- #else
-- #ifdef __INTEL_COMPILER
-+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
-+ #ifdef __dietlibc__
-+ LIBC=dietlibc
-+ #endif
- EOF
-- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0
-- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
-+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-+ /^LIBC/{
-+ s: ::g
-+ p
-+ }'`"
-+ test x"${LIBC}" != x && {
-+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-+ exit
-+ }
-+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
- ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
-- exit 0 ;;
-+ exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
-@@ -970,24 +1056,27 @@
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-- exit 0 ;;
-+ exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
-- exit 0 ;;
-+ exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
-- exit 0 ;;
-+ exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
-- exit 0 ;;
-+ exit ;;
-+ i*86:syllable:*:*)
-+ echo ${UNAME_MACHINE}-pc-syllable
-+ exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
-- exit 0 ;;
-+ exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-@@ -995,15 +1084,16 @@
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
-- exit 0 ;;
-- i*86:*:5:[78]*)
-+ exit ;;
-+ i*86:*:5:[678]*)
-+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-- exit 0 ;;
-+ exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-@@ -1021,73 +1111,83 @@
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
-- exit 0 ;;
-+ exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
- echo i386-pc-msdosdjgpp
-- exit 0 ;;
-+ exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
-- exit 0 ;;
-+ exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
-- exit 0 ;;
-+ exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
-- exit 0 ;;
-+ exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
-- exit 0 ;;
-+ exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
-- exit 0 ;;
-+ exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
-- exit 0 ;;
-- M68*:*:R3V[567]*:*)
-- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
-+ exit ;;
-+ M68*:*:R3V[5678]*:*)
-+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
-+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
-+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-- && echo i486-ncr-sysv4 && exit 0 ;;
-+ && { echo i486-ncr-sysv4; exit; } ;;
-+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
-+ OS_REL='.3'
-+ test -r /etc/.relid \
-+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
-+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
-- exit 0 ;;
-+ exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
-- exit 0 ;;
-+ exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
-- exit 0 ;;
-+ exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
-@@ -1095,68 +1195,84 @@
- else
- echo ns32k-sni-sysv
- fi
-- exit 0 ;;
-+ exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
-- exit 0 ;;
-+ exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <hewes@openmarket.com>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
-- exit 0 ;;
-+ exit ;;
- *:*:*:FTX*)
- # From seanf@swdc.stratus.com.
- echo i860-stratus-sysv4
-- exit 0 ;;
-+ exit ;;
-+ i*86:VOS:*:*)
-+ # From Paul.Green@stratus.com.
-+ echo ${UNAME_MACHINE}-stratus-vos
-+ exit ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
-- exit 0 ;;
-+ exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
-- exit 0 ;;
-+ exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
-- exit 0 ;;
-+ exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
-- exit 0 ;;
-+ exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
-- exit 0 ;;
-+ exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
-- exit 0 ;;
-+ exit ;;
-+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
-+ echo i586-pc-haiku
-+ exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
-+ SX-7:SUPER-UX:*:*)
-+ echo sx7-nec-superux${UNAME_RELEASE}
-+ exit ;;
-+ SX-8:SUPER-UX:*:*)
-+ echo sx8-nec-superux${UNAME_RELEASE}
-+ exit ;;
-+ SX-8R:SUPER-UX:*:*)
-+ echo sx8r-nec-superux${UNAME_RELEASE}
-+ exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- *:Darwin:*:*)
-- case `uname -p` in
-- *86) UNAME_PROCESSOR=i686 ;;
-- powerpc) UNAME_PROCESSOR=powerpc ;;
-+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-+ case $UNAME_PROCESSOR in
-+ unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
-@@ -1164,22 +1280,25 @@
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
-- exit 0 ;;
-- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
-+ exit ;;
-+ NSE-?:NONSTOP_KERNEL:*:*)
-+ echo nse-tandem-nsk${UNAME_RELEASE}
-+ exit ;;
-+ NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
-- exit 0 ;;
-+ exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
-- exit 0 ;;
-+ exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
-@@ -1190,28 +1309,47 @@
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
-- exit 0 ;;
-+ exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
-- exit 0 ;;
-+ exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
-- exit 0 ;;
-+ exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
-- exit 0 ;;
-+ exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
-- exit 0 ;;
-+ exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
-- exit 0 ;;
-+ exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
-- exit 0 ;;
-+ exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
-- exit 0 ;;
-+ exit ;;
-+ *:DragonFly:*:*)
-+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-+ exit ;;
-+ *:*VMS:*:*)
-+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
-+ case "${UNAME_MACHINE}" in
-+ A*) echo alpha-dec-vms ; exit ;;
-+ I*) echo ia64-dec-vms ; exit ;;
-+ V*) echo vax-dec-vms ; exit ;;
-+ esac ;;
-+ *:XENIX:*:SysV)
-+ echo i386-pc-xenix
-+ exit ;;
-+ i*86:skyos:*:*)
-+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-+ exit ;;
-+ i*86:rdos:*:*)
-+ echo ${UNAME_MACHINE}-pc-rdos
-+ exit ;;
- esac
-
- #echo '(No uname command or uname output not recognized.)' 1>&2
-@@ -1243,7 +1381,7 @@
- #endif
-
- #if defined (__arm) && defined (__acorn) && defined (__unix)
-- printf ("arm-acorn-riscix"); exit (0);
-+ printf ("arm-acorn-riscix\n"); exit (0);
- #endif
-
- #if defined (hp300) && !defined (hpux)
-@@ -1332,11 +1470,12 @@
- }
- EOF
-
--$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
-+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-+ { echo "$SYSTEM_NAME"; exit; }
-
- # Apollos put the system type in the environment.
-
--test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
-+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
- # Convex versions that predate uname can use getsysinfo(1)
-
-@@ -1345,22 +1484,22 @@
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
-- exit 0 ;;
-+ exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
-- exit 0 ;;
-+ exit ;;
- c34*)
- echo c34-convex-bsd
-- exit 0 ;;
-+ exit ;;
- c38*)
- echo c38-convex-bsd
-- exit 0 ;;
-+ exit ;;
- c4*)
- echo c4-convex-bsd
-- exit 0 ;;
-+ exit ;;
- esac
- fi
-
-@@ -1371,7 +1510,9 @@
- the operating system you are using. It is advised that you
- download the most up to date version of the config scripts from
-
-- ftp://ftp.gnu.org/pub/gnu/config/
-+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-+and
-+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
- If the version you run ($0) is already up to date, please
- send the following data and any information you think might be
-diff -Naur pvs4.2-orig/config.sub pvs4.2-sbcl/config.sub
---- pvs4.2-orig/config.sub 2007-07-02 20:07:43.000000000 +0000
-+++ pvs4.2-sbcl/config.sub 2009-03-24 18:56:17.000000000 +0000
-@@ -1,9 +1,10 @@
- #! /bin/sh
- # Configuration validation subroutine script.
- # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
--# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-+# Free Software Foundation, Inc.
-
--timestamp='2003-06-18'
-+timestamp='2009-01-19'
-
- # This file is (in principle) common to ALL GNU software.
- # The presence of a machine in this file suggests that SOME GNU software
-@@ -21,14 +22,15 @@
- #
- # You should have received a copy of the GNU General Public License
- # along with this program; if not, write to the Free Software
--# Foundation, Inc., 59 Temple Place - Suite 330,
--# Boston, MA 02111-1307, USA.
--
-+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-+# 02110-1301, USA.
-+#
- # As a special exception to the GNU General Public License, if you
- # distribute this file as part of a program that contains a
- # configuration script generated by Autoconf, you may include it under
- # the same distribution terms that you use for the rest of that program.
-
-+
- # Please send patches to <config-patches@gnu.org>. Submit a context
- # diff and a properly formatted ChangeLog entry.
- #
-@@ -70,8 +72,8 @@
- version="\
- GNU config.sub ($timestamp)
-
--Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
--Free Software Foundation, Inc.
-+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
- This is free software; see the source for copying conditions. There is NO
- warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-@@ -83,11 +85,11 @@
- while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
-- echo "$timestamp" ; exit 0 ;;
-+ echo "$timestamp" ; exit ;;
- --version | -v )
-- echo "$version" ; exit 0 ;;
-+ echo "$version" ; exit ;;
- --help | --h* | -h )
-- echo "$usage"; exit 0 ;;
-+ echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
-@@ -99,7 +101,7 @@
- *local*)
- # First pass through any local machine types.
- echo $1
-- exit 0;;
-+ exit ;;
-
- * )
- break ;;
-@@ -118,7 +120,10 @@
- # Here we must recognize all the valid KERNEL-OS combinations.
- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
- case $maybe_os in
-- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
-+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-+ kopensolaris*-gnu* | \
-+ storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
-@@ -144,7 +149,7 @@
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-- -apple | -axis)
-+ -apple | -axis | -knuth | -cray)
- os=
- basic_machine=$1
- ;;
-@@ -169,6 +174,10 @@
- -hiux*)
- os=-hiuxwe2
- ;;
-+ -sco6)
-+ os=-sco5v6
-+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-+ ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-@@ -185,6 +194,10 @@
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
-+ -sco5v6*)
-+ # Don't forget version if it is 3.2v4 or newer.
-+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-+ ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-@@ -228,45 +241,56 @@
- | a29k \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
-+ | am33_2.0 \
-+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-+ | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
-- | fr30 | frv \
-+ | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
-- | ip2k \
-- | m32r | m68000 | m68k | m88k | mcore \
-+ | ip2k | iq2000 \
-+ | lm32 \
-+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
-+ | maxq | mb | microblaze | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
-- | mips64vr | mips64vrel \
-+ | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
-+ | mips64r5900 | mips64r5900el \
-+ | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
-+ | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
-+ | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
-+ | mt \
- | msp430 \
-+ | nios | nios2 \
- | ns16k | ns32k \
-- | openrisc | or32 \
-+ | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
-- | s390 | s390x \
-- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
-+ | score \
-+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
-- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
-- | strongarm \
-+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-+ | spu | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
- | we32k \
-- | x86 | xscale | xstormy16 | xtensa \
-- | z8k)
-+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-+ | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
-@@ -276,6 +300,9 @@
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
-+ ms1)
-+ basic_machine=mt-unknown
-+ ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
-@@ -295,55 +322,67 @@
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
-- | avr-* \
-- | bs2000-* \
-+ | avr-* | avr32-* \
-+ | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-- | clipper-* | cydra-* \
-+ | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
-- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
-+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
-- | ip2k-* \
-- | m32r-* \
-+ | ip2k-* | iq2000-* \
-+ | lm32-* \
-+ | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-- | m88110-* | m88k-* | mcore-* \
-+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
-- | mips64vr-* | mips64vrel-* \
-+ | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
-+ | mips64r5900-* | mips64r5900el-* \
-+ | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
-+ | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
-+ | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipstx39-* | mipstx39el-* \
-+ | mmix-* \
-+ | mt-* \
- | msp430-* \
-- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
-+ | nios-* | nios2-* \
-+ | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
-- | s390-* | s390x-* \
-- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
-+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
-- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
-+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-+ | sparclite-* \
-+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
-- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
-- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
-- | xtensa-* \
-+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-+ | xstormy16-* | xtensa*-* \
- | ymp-* \
-- | z8k-*)
-+ | z8k-* | z80-*)
-+ ;;
-+ # Recognize the basic CPU types without company name, with glob match.
-+ xtensa*)
-+ basic_machine=$basic_machine-unknown
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
-@@ -361,6 +400,9 @@
- basic_machine=a29k-amd
- os=-udi
- ;;
-+ abacus)
-+ basic_machine=abacus-unknown
-+ ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
-@@ -378,6 +420,9 @@
- amd64)
- basic_machine=x86_64-pc
- ;;
-+ amd64-*)
-+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-+ ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
-@@ -409,10 +454,22 @@
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
-+ blackfin)
-+ basic_machine=bfin-unknown
-+ os=-linux
-+ ;;
-+ blackfin-*)
-+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
-+ os=-linux
-+ ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
-+ cegcc)
-+ basic_machine=arm-unknown
-+ os=-cegcc
-+ ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
-@@ -437,12 +494,27 @@
- basic_machine=j90-cray
- os=-unicos
- ;;
-+ craynv)
-+ basic_machine=craynv-cray
-+ os=-unicosmp
-+ ;;
-+ cr16)
-+ basic_machine=cr16-unknown
-+ os=-elf
-+ ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
-+ crisv32 | crisv32-* | etraxfs*)
-+ basic_machine=crisv32-axis
-+ ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
-+ crx)
-+ basic_machine=crx-unknown
-+ os=-elf
-+ ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
-@@ -465,6 +537,14 @@
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
-+ dicos)
-+ basic_machine=i686-pc
-+ os=-dicos
-+ ;;
-+ djgpp)
-+ basic_machine=i586-pc
-+ os=-msdosdjgpp
-+ ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
-@@ -615,6 +695,14 @@
- basic_machine=m68k-isi
- os=-sysv
- ;;
-+ m68knommu)
-+ basic_machine=m68k-unknown
-+ os=-linux
-+ ;;
-+ m68knommu-*)
-+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
-+ os=-linux
-+ ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
-@@ -630,6 +718,10 @@
- basic_machine=i386-pc
- os=-mingw32
- ;;
-+ mingw32ce)
-+ basic_machine=arm-unknown
-+ os=-mingw32ce
-+ ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
-@@ -643,10 +735,6 @@
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
-- mmix*)
-- basic_machine=mmix-knuth
-- os=-mmixware
-- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
-@@ -659,6 +747,9 @@
- basic_machine=i386-pc
- os=-msdos
- ;;
-+ ms1-*)
-+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-+ ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
-@@ -727,10 +818,6 @@
- np1)
- basic_machine=np1-gould
- ;;
-- nv1)
-- basic_machine=nv1-cray
-- os=-unicosmp
-- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
-@@ -738,9 +825,12 @@
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
-- or32 | or32-*)
-+ openrisc | openrisc-*)
- basic_machine=or32-unknown
-- os=-coff
-+ ;;
-+ os400)
-+ basic_machine=powerpc-ibm
-+ os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
-@@ -758,6 +848,14 @@
- basic_machine=i860-intel
- os=-osf
- ;;
-+ parisc)
-+ basic_machine=hppa-unknown
-+ os=-linux
-+ ;;
-+ parisc-*)
-+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
-+ os=-linux
-+ ;;
- pbd)
- basic_machine=sparc-tti
- ;;
-@@ -767,6 +865,12 @@
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
-+ pc98)
-+ basic_machine=i386-pc
-+ ;;
-+ pc98-*)
-+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-+ ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
-@@ -823,6 +927,10 @@
- basic_machine=i586-unknown
- os=-pw32
- ;;
-+ rdos)
-+ basic_machine=i386-pc
-+ os=-rdos
-+ ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
-@@ -833,6 +941,12 @@
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
-+ s390 | s390-*)
-+ basic_machine=s390-ibm
-+ ;;
-+ s390x | s390x-*)
-+ basic_machine=s390x-ibm
-+ ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
-@@ -843,6 +957,10 @@
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
-+ sde)
-+ basic_machine=mipsisa32-sde
-+ os=-elf
-+ ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
-@@ -854,6 +972,9 @@
- basic_machine=sh-hitachi
- os=-hms
- ;;
-+ sh5el)
-+ basic_machine=sh5le-unknown
-+ ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
-@@ -943,6 +1064,10 @@
- basic_machine=tic6x-unknown
- os=-coff
- ;;
-+ tile*)
-+ basic_machine=tile-unknown
-+ os=-linux-gnu
-+ ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
-@@ -956,6 +1081,10 @@
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
-+ tpf)
-+ basic_machine=s390x-ibm
-+ os=-tpf
-+ ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
-@@ -999,6 +1128,10 @@
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
-+ xbox)
-+ basic_machine=i686-pc
-+ os=-mingw32
-+ ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
-@@ -1010,6 +1143,10 @@
- basic_machine=z8k-unknown
- os=-sim
- ;;
-+ z80-*-coff)
-+ basic_machine=z80-unknown
-+ os=-sim
-+ ;;
- none)
- basic_machine=none-none
- os=-none
-@@ -1029,6 +1166,9 @@
- romp)
- basic_machine=romp-ibm
- ;;
-+ mmix)
-+ basic_machine=mmix-knuth
-+ ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
-@@ -1045,13 +1185,10 @@
- we32k)
- basic_machine=we32k-att
- ;;
-- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
-+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
-- sh64)
-- basic_machine=sh64-unknown
-- ;;
-- sparc | sparcv8 | sparcv9 | sparcv9b)
-+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
- cydra)
-@@ -1120,23 +1257,28 @@
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-+ | -kopensolaris* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-+ | -openbsd* | -solidbsd* \
-+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-- | -chorusos* | -chorusrdb* \
-+ | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-+ | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-- | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
-+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
-@@ -1154,12 +1296,15 @@
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
-+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
-+ -linux-dietlibc)
-+ os=-linux-dietlibc
-+ ;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
-@@ -1172,6 +1317,9 @@
- -opened*)
- os=-openedition
- ;;
-+ -os400*)
-+ os=-os400
-+ ;;
- -wince*)
- os=-wince
- ;;
-@@ -1193,6 +1341,9 @@
- -atheos*)
- os=-atheos
- ;;
-+ -syllable*)
-+ os=-syllable
-+ ;;
- -386bsd)
- os=-bsd
- ;;
-@@ -1215,6 +1366,9 @@
- -sinix*)
- os=-sysv4
- ;;
-+ -tpf*)
-+ os=-tpf
-+ ;;
- -triton*)
- os=-sysv3
- ;;
-@@ -1251,6 +1405,12 @@
- -kaos*)
- os=-kaos
- ;;
-+ -zvmoe)
-+ os=-zvmoe
-+ ;;
-+ -dicos*)
-+ os=-dicos
-+ ;;
- -none)
- ;;
- *)
-@@ -1273,6 +1433,12 @@
- # system, and we'll never get to this point.
-
- case $basic_machine in
-+ score-*)
-+ os=-elf
-+ ;;
-+ spu-*)
-+ os=-elf
-+ ;;
- *-acorn)
- os=-riscix1.2
- ;;
-@@ -1282,8 +1448,8 @@
- arm*-semi)
- os=-aout
- ;;
-- c4x-* | tic4x-*)
-- os=-coff
-+ c4x-* | tic4x-*)
-+ os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
-@@ -1310,6 +1476,9 @@
- m68*-cisco)
- os=-aout
- ;;
-+ mep-*)
-+ os=-elf
-+ ;;
- mips*-cisco)
- os=-elf
- ;;
-@@ -1328,9 +1497,15 @@
- *-be)
- os=-beos
- ;;
-+ *-haiku)
-+ os=-haiku
-+ ;;
- *-ibm)
- os=-aix
- ;;
-+ *-knuth)
-+ os=-mmixware
-+ ;;
- *-wec)
- os=-proelf
- ;;
-@@ -1463,9 +1638,15 @@
- -mvs* | -opened*)
- vendor=ibm
- ;;
-+ -os400*)
-+ vendor=ibm
-+ ;;
- -ptx*)
- vendor=sequent
- ;;
-+ -tpf*)
-+ vendor=ibm
-+ ;;
- -vxsim* | -vxworks* | -windiss*)
- vendor=wrs
- ;;
-@@ -1490,7 +1671,7 @@
- esac
-
- echo $basic_machine$os
--exit 0
-+exit
-
- # Local variables:
- # eval: (add-hook 'write-file-hooks 'time-stamp)
-diff -Naur pvs4.2-orig/doc/language/language.tex pvs4.2-sbcl/doc/language/language.tex
---- pvs4.2-orig/doc/language/language.tex 2007-07-02 20:07:42.000000000 +0000
-+++ pvs4.2-sbcl/doc/language/language.tex 2009-03-24 18:56:17.000000000 +0000
-@@ -6,7 +6,7 @@
- \usepackage{makeidx}
- \usepackage{relsize}
- \usepackage{boxedminipage}
--\usepackage{fancyheadings}
-+\usepackage{fancyhdr}
- %\usepackage{../../pvs}
- \usepackage{url}
- \usepackage{../makebnf}
-diff -Naur pvs4.2-orig/doc/prover/prover.tex pvs4.2-sbcl/doc/prover/prover.tex
---- pvs4.2-orig/doc/prover/prover.tex 2007-07-02 20:07:42.000000000 +0000
-+++ pvs4.2-sbcl/doc/prover/prover.tex 2009-03-24 18:56:17.000000000 +0000
-@@ -1,7 +1,7 @@
- % Document Type: LaTeX
- % Master File: prover.tex
- \documentclass[12pt,twoside]{book}
--\usepackage{relsize,alltt,makeidx,url,boxedminipage,fancyheadings,tabularx}
-+\usepackage{relsize,alltt,makeidx,url,boxedminipage,fancyhdr,tabularx}
- %\usepackage{../../pvs}
- \usepackage{../makebnf}
- \usepackage[chapter]{tocbibind}
-diff -Naur pvs4.2-orig/doc/user-guide/user-guide.tex pvs4.2-sbcl/doc/user-guide/user-guide.tex
---- pvs4.2-orig/doc/user-guide/user-guide.tex 2007-07-02 20:07:42.000000000 +0000
-+++ pvs4.2-sbcl/doc/user-guide/user-guide.tex 2009-03-24 18:56:17.000000000 +0000
-@@ -7,7 +7,7 @@
- %\usepackage{showidx} % use for index debugging
- \usepackage{relsize}
- \usepackage{boxedminipage}
--\usepackage{fancyheadings}
-+\usepackage{fancyhdr}
- \usepackage{graphicx}
- \usepackage{../../pvs}
- \usepackage{url}
-diff -Naur pvs4.2-orig/emacs/emacs-src/ilisp/completer.el pvs4.2-sbcl/emacs/emacs-src/ilisp/completer.el
---- pvs4.2-orig/emacs/emacs-src/ilisp/completer.el 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/ilisp/completer.el 2009-03-24 18:56:17.000000000 +0000
-@@ -181,8 +181,8 @@
- (not (memq +ilisp-emacs-version-id+
- '(xemacs lucid-19 lucid-19-new)))
- )
-- (setq quit-flag nil
-- unread-command-char 7))))
-+ (setq quit-flag nil)
-+ (push 7 unread-command-events))))
-
- ;;;
- (defun completer-deleter (regexp choices &optional keep)
-diff -Naur pvs4.2-orig/emacs/emacs-src/ilisp/ilisp-acl.el pvs4.2-sbcl/emacs/emacs-src/ilisp/ilisp-acl.el
---- pvs4.2-orig/emacs/emacs-src/ilisp/ilisp-acl.el 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/ilisp/ilisp-acl.el 2009-03-24 18:56:17.000000000 +0000
-@@ -22,10 +22,10 @@
- (defun allegro-check-prompt (old new)
- "Compare the break level printed at the beginning of the prompt."
- (let* ((old-level (if (and old (eq 1 (string-match "[0-9]+" old)))
-- (string-to-int (substring old 1))
-+ (string-to-number (substring old 1))
- 0))
- (new-level (if (eq 1 (string-match "[0-9]+" new))
-- (string-to-int (substring new 1))
-+ (string-to-number (substring new 1))
- 0)))
- (<= new-level old-level)))
-
-diff -Naur pvs4.2-orig/emacs/emacs-src/ilisp/ilisp-chs.el pvs4.2-sbcl/emacs/emacs-src/ilisp/ilisp-chs.el
---- pvs4.2-orig/emacs/emacs-src/ilisp/ilisp-chs.el 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/ilisp/ilisp-chs.el 2009-03-24 18:56:17.000000000 +0000
-@@ -40,7 +40,7 @@
- (string-match "Break" old)
- (string-match "[0-9]+" old)))
- (old-level (if was-in
-- (string-to-int
-+ (string-to-number
- (substring old (match-beginning 0)
- (match-end 0)))
- 0))
-@@ -48,7 +48,7 @@
- (string-match "Break" new)
- (string-match "[0-9]+" new)))
- (new-level (if is-in
-- (string-to-int
-+ (string-to-number
- (substring new (match-beginning 0)
- (match-end 0)))
- 0)))
-diff -Naur pvs4.2-orig/emacs/emacs-src/ilisp/ilisp-def.el pvs4.2-sbcl/emacs/emacs-src/ilisp/ilisp-def.el
---- pvs4.2-orig/emacs/emacs-src/ilisp/ilisp-def.el 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/ilisp/ilisp-def.el 2009-03-24 18:56:17.000000000 +0000
-@@ -43,8 +43,8 @@
- ;;;
- (defmacro deflocal (variable default &optional documentation)
- "Define an ilisp local variable."
-- (` (progn (lisp-deflocal '(, variable))
-- (defvar (, variable) (, default) (, documentation)))))
-+ `(progn (lisp-deflocal ',variable)
-+ (defvar ,variable ,default ,documentation)))
-
- ;;;%%Simple customization
-
-diff -Naur pvs4.2-orig/emacs/emacs-src/ilisp/ilisp-dia.el pvs4.2-sbcl/emacs/emacs-src/ilisp/ilisp-dia.el
---- pvs4.2-orig/emacs/emacs-src/ilisp/ilisp-dia.el 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/ilisp/ilisp-dia.el 2009-03-24 18:56:17.000000000 +0000
-@@ -120,27 +120,26 @@
- (hook (read (format "%s-hook" dialect)))
- (program (read (format "%s-program" dialect)))
- (dialects (format "%s" dialect)))
-- (`
-- (progn
-- (defvar (, hook) nil (, (format "*Inferior %s hook." full-name)))
-- (defvar (, program) nil
-- (, (format "*Inferior %s default program." full-name)))
-- (defun (, setup) (buffer)
-- (, (format "Set up for interacting with %s." full-name))
-- (, (read (format "(setup-%s buffer)" parent)))
-- (,@ body)
-- (setq ilisp-program (or (, program) ilisp-program)
-- ilisp-dialect (cons '(, dialect) ilisp-dialect))
-- (run-hooks '(, (read (format "%s-hook" dialect)))))
-- (defun (, dialect) (&optional buffer program)
-- (, (format "Create an inferior %s. With prefix, prompt for buffer and program."
-- full-name))
-+ `(progn
-+ (defvar ,hook nil ,(format "*Inferior %s hook." full-name))
-+ (defvar ,program nil
-+ ,(format "*Inferior %s default program." full-name))
-+ (defun ,setup (buffer)
-+ ,(format "Set up for interacting with %s." full-name)
-+ ,(read (format "(setup-%s buffer)" parent))
-+ ,@body
-+ (setq ilisp-program (or ,program ilisp-program)
-+ ilisp-dialect (cons ',dialect ilisp-dialect))
-+ (run-hooks ',(read (format "%s-hook" dialect))))
-+ (defun ,dialect (&optional buffer program)
-+ ,(format "Create an inferior %s. With prefix, prompt for buffer and program."
-+ full-name)
- (interactive (list nil nil))
-- (ilisp-start-dialect (or buffer (, dialects))
-- program
-- '(, setup))
-- (setq (, program) ilisp-program))
-- (lisp-add-dialect (, dialects))))))
-+ (ilisp-start-dialect (or buffer ,dialects)
-+ program
-+ ',setup)
-+ (setq ,program ilisp-program))
-+ (lisp-add-dialect ,dialects))))
-
- ;;;%%ilisp
- (defun setup-ilisp (buffer)
-diff -Naur pvs4.2-orig/emacs/emacs-src/ilisp/ilisp-snd.el pvs4.2-sbcl/emacs/emacs-src/ilisp/ilisp-snd.el
---- pvs4.2-orig/emacs/emacs-src/ilisp/ilisp-snd.el 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/ilisp/ilisp-snd.el 2009-03-24 18:56:17.000000000 +0000
-@@ -409,16 +409,16 @@
- (comint-send
- (ilisp-process) binary
- t nil 'binary nil
-- (` (lambda (error wait message output last)
-+ `(lambda (error wait message output last)
- (if (or error
- (not (string-match "\"[^\"]*\"" output)))
- (progn
- (lisp-display-output output)
- (abort-commands-lisp "No binary"))
-- (setq (, var)
-+ (setq ,var
- (substring output
- (1+ (match-beginning 0))
-- (1- (match-end 0))))))))))))
-+ (1- (match-end 0)))))))))))
-
- ;;;
- (defun ilisp-done-init ()
-diff -Naur pvs4.2-orig/emacs/emacs-src/pvs-cmds.el pvs4.2-sbcl/emacs/emacs-src/pvs-cmds.el
---- pvs4.2-orig/emacs/emacs-src/pvs-cmds.el 2008-02-20 10:35:41.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/pvs-cmds.el 2009-03-24 18:56:17.000000000 +0000
-@@ -478,7 +478,7 @@
- (goto-char (point-min))
- (pop-to-buffer pbuf)
- (pvs-mode))
-- (error "%s is not in the prelude."))))))
-+ (error "%s is not in the prelude." fname))))))
-
- (defun get-prelude-file-and-region (theoryname)
- (let ((freg nil)
-@@ -768,7 +768,7 @@
- "Name of root file (CR for this one): ")
- (list (y-or-n-p "Include libraries? "))
- (list (read-from-minibuffer
-- (format "Mail to: " pvs-last-email-address)
-+ (format "Mail to: ")
- pvs-last-email-address))
- (list (read-string "CC: "))
- (list (read-string "Subject: "))))
-@@ -787,9 +787,9 @@
- (let* ((lkeymap (copy-keymap (current-local-map)))
- (file-string (pvs-dump-files-string pvs-file libraries-p)))
- (define-key lkeymap "\C-c\C-c"
-- (` (lambda ()
-- (interactive)
-- (pvs-mail-send-and-exit (, to) (, subject) (, file-string)))))
-+ `(lambda ()
-+ (interactive)
-+ (pvs-mail-send-and-exit ,to ,subject ,file-string)))
- (use-local-map lkeymap)))
-
- (defun pvs-mail-send-and-exit (to subject file-string)
-@@ -1435,8 +1435,8 @@
-
- (defun pvs-major-version-number ()
- (if *pvs-version-information*
-- (string-to-int (car *pvs-version-information*))
-- (string-to-int (pvs-send-and-wait "*pvs-version*" nil nil))))
-+ (string-to-number (car *pvs-version-information*))
-+ (string-to-number (pvs-send-and-wait "*pvs-version*" nil nil))))
-
- ;;; Replay
-
-diff -Naur pvs4.2-orig/emacs/emacs-src/pvs-ilisp.el pvs4.2-sbcl/emacs/emacs-src/pvs-ilisp.el
---- pvs4.2-orig/emacs/emacs-src/pvs-ilisp.el 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/pvs-ilisp.el 2009-03-24 18:56:17.000000000 +0000
-@@ -111,6 +111,7 @@
- (case (intern (getenv "PVSLISP"))
- (allegro (pvsallegro "pvs" nil))
- (cmulisp (pvscmulisp "pvs" nil))
-+ (sbclisp (pvssbclisp "pvs" nil))
- (t (error "Unknown lisp - %s" (getenv "PVSLISP"))))
- (save-excursion
- (set-buffer (ilisp-buffer))
-@@ -164,7 +165,7 @@
- (setq ilisp-binary-extension (pvs-cmulisp-binary-extension))
- (setq ilisp-init-binary-extension ilisp-binary-extension)
- (setq ilisp-load-inits nil)
-- (setq ilisp-program (format "%s -qq" (pvs-program)))
-+ (setq ilisp-program (format "%s -quiet -noinit" (pvs-program)))
- (setq comint-prompt-regexp
- "^\\([0-9]+\\]+\\|\\*\\|[-a-zA-Z0-9]*\\[[0-9]+\\]:\\) \\|Rule\\? \\|<GndEval> \\|<PVSio> \\|(Y or N)\\|(Yes or No)\\|Please enter")
- (setq comint-interrupt-regexp "^Interrupted at")
-@@ -173,6 +174,24 @@
- "^\\([0-9]+\\]+\\|\\*\\|[-a-zA-Z0-9]*\\[[0-9]+\\]:\\) ")
- (setq pvs-gc-end-regexp ";;; Finished GC"))
-
-+(defdialect pvssbclisp "pvs-sbclisp"
-+ cmulisp
-+ (pvs-comint-init)
-+ ;;(setq comint-send-newline nil)
-+ (setq ilisp-binary-extension (pvs-sbclisp-binary-extension))
-+ (setq ilisp-init-binary-extension ilisp-binary-extension)
-+ (setq ilisp-load-inits nil)
-+ (setq ilisp-program (format "%s --noinform --no-userinit" (pvs-program)))
-+ (setq ilisp-reset ":abort")
-+ (setq comint-prompt-regexp
-+ "^\\([0-9]+\\]+\\|\\*\\|[-a-zA-Z0-9]*\\[[0-9]+\\]:\\) \\|Rule\\? \\|<GndEval> \\|<PVSio> \\|(Y or N)\\|(Yes or No)\\|Please enter")
-+ (setq comint-interrupt-regexp "^ Interactive interrupt at")
-+ (setq comint-continue ":continue")
-+ (setq ilisp-error-regexp "^restarts (invokable by number or by possibly-abbreviated name):$")
-+ (setq pvs-top-regexp
-+ "^\\([0-9]+\\]+\\|\\*\\|[-a-zA-Z0-9]*\\[[0-9]+\\]:\\) ")
-+ (setq pvs-gc-end-regexp ";;; Finished GC"))
-+
- (defun pvs-allegro-binary-extension ()
- (let ((machine (getenv "PVSARCH")))
- (cond ((string-equal machine "sun4") ; Sun/Solaris
-@@ -193,6 +212,18 @@
- "ppcf")
- (t (error "Machine architecture %s not recognized" machine)))))
-
-+(defun pvs-sbclisp-binary-extension ()
-+ (let ((machine (getenv "PVSARCH")))
-+ (cond ((string-equal machine "sun4") ; Sun/Solaris
-+ "sparcs")
-+ ((string-equal machine "ix86") ; Intel/Linux
-+ "x86s")
-+ ((string-equal machine "ix86_64") ; Intel/Linux
-+ "x8664s")
-+ ((string-equal machine "powerpc") ; Mac
-+ "ppcs")
-+ (t (error "Machine architecture %s not recognized" machine)))))
-+
- (defun pvs-comint-init ()
- (setq ilisp-motd nil)
- (setq pvs-fix-error comint-fix-error)
-@@ -736,7 +767,7 @@
-
- (defun resize-info-buffer ()
- (unless (one-window-p t)
-- (let* ((maxsize (/ (screen-height) 2))
-+ (let* ((maxsize (/ (frame-height) 2))
- (cursize (1- (window-height)))
- (lines (real-number-of-lines))
- (size (min maxsize lines)))
-@@ -1108,11 +1139,6 @@
- (show-entry))
- (t (error "Unknown display type %s" type))))))
-
--(defun pvs-locate (out)
-- (apply 'display-file-at-location
-- (parse-pvs-message out)))
--
--
- (defun pvs-locate (output)
- (let* ((message (parse-pvs-message output))
- (dir (car message))
-diff -Naur pvs4.2-orig/emacs/emacs-src/pvs-load.el pvs4.2-sbcl/emacs/emacs-src/pvs-load.el
---- pvs4.2-orig/emacs/emacs-src/pvs-load.el 2008-07-07 08:03:45.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/pvs-load.el 2009-03-24 18:56:17.000000000 +0000
-@@ -238,7 +238,7 @@
- (insert "\n\nPlease check our website periodically for news of later versions")
- (insert "\nat http://pvs.csl.sri.com/")
- (insert "\n\n" (cadr (cdddr vers)) "\n" (cadr (cddddr vers)))
-- (insert-string "
-+ (insert "
- ----------
- Bug reports and suggestions for improvement should be sent to
- pvs-bugs@csl.sri.com
-diff -Naur pvs4.2-orig/emacs/emacs-src/pvs-prover.el pvs4.2-sbcl/emacs/emacs-src/pvs-prover.el
---- pvs4.2-orig/emacs/emacs-src/pvs-prover.el 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/pvs-prover.el 2009-03-24 18:56:17.000000000 +0000
-@@ -1043,7 +1043,7 @@
- (if (> indent 0)
- (while (and (>= (point) start)
- (progn (beginning-of-line)
-- (insert-string indstr)
-+ (insert indstr)
- (= (forward-line -1) 0))))))
- (when crs (insert "\n\n"))))
-
-@@ -1084,7 +1084,7 @@
- (pvs-bury-output)
- (let ((file (current-pvs-file)))
- (when (buffer-modified-p (get-file-buffer file))
-- (error "~a is not parsed" file))
-+ (error "%s is not parsed" file))
- (when (pvs-send-and-wait (format "(lisp (modify-declaration-at \"%s\" %d))"
- file (current-line-number))
- nil nil 'bool)
-@@ -1192,7 +1192,7 @@
- nil)
- ((and (stringp depth)
- (string-match "^[ \t]*[0-9]+[ \t]*$" depth))
-- (string-to-int depth))
-+ (string-to-number depth))
- (t (error "set-rewrite-depth: %s is not a number or nil"
- depth)))))
- (pvs-send (format "(setq *rewrite-print-depth* %s)" dep))))
-@@ -1221,7 +1221,7 @@
- nil)
- ((and (stringp length)
- (string-match "^[ \t]*[0-9]+[ \t]*$" length))
-- (string-to-int length))
-+ (string-to-number length))
- (t (error "set-rewrite-length: %s is not an integer or nil"
- length)))))
- (pvs-send (format "(setq *rewrite-print-length* %s)" len))))
-@@ -1242,7 +1242,7 @@
- nil)
- ((and (stringp depth)
- (string-match "^[ \t]*[0-9]+[ \t]*$" depth))
-- (string-to-int depth))
-+ (string-to-number depth))
- (t (error "set-print-depth: %s is not an integer" depth)))))
- (pvs-send (format "(setq *prover-print-depth* %s)"
- (when (plusp dep) dep)))))
-@@ -1264,7 +1264,7 @@
- nil)
- ((and (stringp length)
- (string-match "^[ \t]*[0-9]+[ \t]*$" length))
-- (string-to-int length))
-+ (string-to-number length))
- (t (error "set-print-length: %s is not an integer"
- length)))))
- (pvs-send (format "(setq *prover-print-length* %s)"
-@@ -1285,7 +1285,7 @@
- nil)
- ((and (stringp lines)
- (string-match "^[ \t]*[0-9]+[ \t]*$" lines))
-- (string-to-int lines))
-+ (string-to-number lines))
- (t (error "set-print-lines: %s is not an integer" lines)))))
- (pvs-send (format "(setq *prover-print-lines* %s)"
- (when (plusp dep) dep)))))
-@@ -2153,7 +2153,7 @@
- 1)
- ((and (stringp num)
- (string-match "^[ \t]*[0-9]+[ \t]*$" num))
-- (string-to-int num))
-+ (string-to-number num))
- (t (error "set-proof-backup-number: %s is not an integer"
- num)))))
- (pvs-send (format "(setq *number-of-proof-backups* %s)" n))))
-diff -Naur pvs4.2-orig/emacs/emacs-src/pvs-prover-helps.el pvs4.2-sbcl/emacs/emacs-src/pvs-prover-helps.el
---- pvs4.2-orig/emacs/emacs-src/pvs-prover-helps.el 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/pvs-prover-helps.el 2009-03-24 18:56:17.000000000 +0000
-@@ -244,7 +244,7 @@
- (setq ept (point))
- (setq def2arw (buffer-substring bpt ept)))
- (setq def2arw (read-from-minibuffer "Auto-rewrite: ")))
-- (end-of-buffer)
-+ (goto-char (point-max))
- (insert "(auto-rewrite " ?\" def2arw ?\" ")")
- (return-ilisp)))
-
-@@ -372,7 +372,7 @@
- (setq fnum (buffer-substring bpt ept)))
- (setq fnum (read-from-minibuffer
- "in formula [CR for default]# " ""))))
-- (end-of-buffer)
-+ (goto-char (point-max))
- (insert "(expand " ?\" def2expand ?\" " " fnum ")")
- (return-ilisp)))))
-
-@@ -701,7 +701,7 @@
- (setq expr (buffer-substring start end))
- (if (not (y-or-n-p (concat "Typepred for " expr)))
- (error "typepred aborted.")))
-- (end-of-buffer)
-+ (goto-char (point-max))
- (insert "(typepred " ?\" expr ?\" ")")
- (return-ilisp)))
-
-@@ -767,7 +767,7 @@
- (if editprfwin
- (set-window-point editprfwin (point))))
- (setq cmd (buffer-substring beg end))))
-- (end-of-buffer)
-+ (goto-char (point-max))
- (insert cmd)
- (return-ilisp)
- (hilit-next-prover-command)
-@@ -820,10 +820,10 @@
- (pvs-prover-goto-prev-step t))
- (hilit-next-prover-command)
- (switch-to-buffer pvsbuf)
-- (end-of-buffer)
-+ (goto-char (point-max))
- (switch-to-buffer editprfbuf)
- (pop-to-buffer pvsbuf)
-- (end-of-buffer))))
-+ (goto-char (point-max)))))
-
-
- ;;; pvs-prover-goto-next-step puts the cursor at the beginning of the next
-diff -Naur pvs4.2-orig/emacs/emacs-src/pvs-tcl.el pvs4.2-sbcl/emacs/emacs-src/pvs-tcl.el
---- pvs4.2-orig/emacs/emacs-src/pvs-tcl.el 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/pvs-tcl.el 2009-03-24 18:56:17.000000000 +0000
-@@ -94,7 +94,7 @@
- "PVS Error"))
- (t (comint-display-output
- (format "PVS was developed and tested for %s versions %s,\nbut you are using version %s.\nThis is unlikely to cause problems, as it is a later release."
-- program-name expected version program-name)
-+ program-name expected version)
- "PVS Warning"))))))
-
- (defun pvs-parse-version-numbers (vnum)
-diff -Naur pvs4.2-orig/emacs/emacs-src/pvs-utils.el pvs4.2-sbcl/emacs/emacs-src/pvs-utils.el
---- pvs4.2-orig/emacs/emacs-src/pvs-utils.el 2008-07-18 04:39:20.000000000 +0000
-+++ pvs4.2-sbcl/emacs/emacs-src/pvs-utils.el 2009-03-24 18:56:17.000000000 +0000
-@@ -238,7 +238,7 @@
- nil nil 'list)))
- (when fandp
- (cond ((not (file-exists-p (car fandp)))
-- (error "Theory ~a was in ~a which no longer exists"
-+ (error "Theory %s was in %s which no longer exists"
- theoryname (car fandp)))
- ((or (null (cdr fandp))
- (buffer-modified-p (find-file-noselect (car fandp))))
-@@ -990,13 +990,6 @@
- (error "Must specify a theory name")
- (list theory))))))
-
--(defun remove-duplicates (list)
-- (let ((nlist nil))
-- (dolist (e list)
-- (unless (member-equal e nlist)
-- (push e nlist)))
-- (nreverse nlist)))
--
- (defun current-theory ()
- (let ((file (current-pvs-file t)))
- (if file
-@@ -1235,13 +1228,6 @@
- (or (car (get cmd 'abbreviations))
- cmd))
-
--(defun remove-if (pred list)
-- (let ((nlist nil))
-- (dolist (e list)
-- (unless (funcall pred e)
-- (push e nlist)))
-- (nreverse nlist)))
--
- (defun add-final-newline ()
- (save-excursion
- (unless (equal (char-after (1- (point-max))) ?\n)
-@@ -1355,9 +1341,14 @@
- (setq pvs-reserved-words-regexp
- "\\bassuming\\b\\|\\baxiom\\b\\|\\baccept\\b\\|\\bchanges\\b\\|\\ball\\b\\|\\band\\b\\|\\barray\\b\\|\\bbegin\\b\\|\\bby\\b\\|\\bcase\\b\\|\\bdeclare\\b\\|\\bdefinition\\b\\|\\belse\\b\\|\\belsif\\b\\|\\bendif\\b\\|\\bendassuming\\b\\|\\bendcase\\b\\|\\bend\\b\\|\\bexists\\b\\|\\bexporting\\b\\|\\bexit\\b\\|\\bforall\\b\\|\\bfunction\\b\\|\\bformula\\b\\|\\bfrom\\b\\|\\bif\\b\\|\\biff\\b\\|\\bimplies\\b\\|\\bimporting\\b\\|\\bin\\b\\|\\bis\\b\\|\\blambda\\b\\|\\blemma\\b\\|\\bloop\\b\\|\\bmapping\\b\\|\\bmeasure\\b\\|\\bmodule\\b\\|\\bnot\\b\\|\\bnothing\\b\\|\\bof\\b\\|\\bonto\\b\\|\\bobligation\\b\\|\\bopspec\\b\\|\\bor\\b\\|\\bproof\\b\\|\\bprove\\b\\|\\brecursive\\b\\|\\bresult\\b\\|\\btheorem\\b\\|\\btheory\\b\\|\\busing\\b\\|\\bvar\\b\\|\\bvariable\\b\\|\\brecord\\b\\|\\bverify\\b\\|\\bwhere\\b\\|\\bthen\\b\\|\\btype\\b\\|\\bwhen\\b\\|\\bwhile\\b\\|\\bwith\\b\\|\\blet\\b\\|\\bsetvariable\\b\\|\\[#\\|#\\]\\|[(]#\\|#[)]")
-
-+(defmacro pvs-find-face (name)
-+ (if (featurep 'xemacs)
-+ `(find-face ,name)
-+ `(facep ,name)))
-+
- (defun highlight-pvs ()
- (interactive)
-- (unless (internal-find-face 'pvs-keyword)
-+ (unless (pvs-find-face 'pvs-keyword)
- (make-face 'pvs-keyword)
- (set-face-foreground 'pvs-keyword "Blue")
- (set-face-font 'pvs-keyword "*courier-bold-r-normal--12*"))
-@@ -1575,7 +1566,7 @@
- (defvar pvs-unexpected-output nil)
-
- (defmacro pvs-validate (file directory &rest body)
-- (` (let* ((logfile (concat default-directory (, file))))
-+ `(let* ((logfile (concat default-directory ,file)))
- (pvs-backup-logfile logfile)
- (let ((logbuf (find-file-noselect logfile t)))
- (unwind-protect
-@@ -1592,9 +1583,9 @@
- (default-directory default-directory))
- (pvs-message (pvs-version-string))
- (let ((pvs-disable-messages nil))
-- (change-context (, directory)))
-+ (change-context ,directory))
- (condition-case err
-- (progn (,@ body))
-+ (progn ,@body)
- (error (pvs-message "ERROR: Emacs: %s %s"
- (car err) (cdr err)))))
- (pvs-wait-for-it)
-@@ -1659,7 +1650,7 @@
- (pvs-message "NO BASELINE - using this run to create baseline.log")
- (copy-file (buffer-file-name) "baseline.log"))))
- (fset 'pvs-handler 'pvs-handler-orig)
-- (fset 'ask-user-about-lock 'ask-user-about-lock-orig))))))
-+ (fset 'ask-user-about-lock 'ask-user-about-lock-orig)))))
-
-
- ;;; This function provides the most basic form of test, removing bin
-diff -Naur pvs4.2-orig/emacs/go-pvs.el pvs4.2-sbcl/emacs/go-pvs.el
---- pvs4.2-orig/emacs/go-pvs.el 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/emacs/go-pvs.el 2009-03-24 18:56:17.000000000 +0000
-@@ -24,6 +24,7 @@
- ;; --------------------------------------------------------------------
-
- (setq debug-on-error t)
-+(setq inhibit-startup-screen t)
-
- (defconst pvs-emacs-system
- (cond ((or (string-match "XEmacs 21" (emacs-version))
-diff -Naur pvs4.2-orig/ess/box-defs.lisp pvs4.2-sbcl/ess/box-defs.lisp
---- pvs4.2-orig/ess/box-defs.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/box-defs.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -15,8 +15,8 @@
- ;;; Frank Pfenning (fp@cs.cmu.edu) ;;;
- ;;; ******************************************************************* ;;;
-
--(in-package :tools #+sbcl (:use :common-lisp :ergolisp))
--#-sbcl (use-package :ergolisp)
-+(in-package :tools)
-+(use-package :ergolisp)
-
- (export '(*plain-readtable*))
-
-diff -Naur pvs4.2-orig/ess/lang/ab-term/rel/af-dependency.lisp pvs4.2-sbcl/ess/lang/ab-term/rel/af-dependency.lisp
---- pvs4.2-orig/ess/lang/ab-term/rel/af-dependency.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/ab-term/rel/af-dependency.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -24,7 +24,7 @@
- ;;; 07-17-86 rln Initial development and release
- ;;; 07-22-87 rln Reimplementation
-
--(in-package 'analysis-facility)
-+(in-package :analysis-facility)
- (use-package '("AF-RUNTIME-LIB"))
-
- ;;; The variable *CODE* accumulates the code descriptors generated by SCHEDULE.
-diff -Naur pvs4.2-orig/ess/lang/ab-term/rel/af-runtime.lisp pvs4.2-sbcl/ess/lang/ab-term/rel/af-runtime.lisp
---- pvs4.2-orig/ess/lang/ab-term/rel/af-runtime.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/ab-term/rel/af-runtime.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -25,7 +25,12 @@
- ;;; 07-22-87 rln Initial development release.
- ;;;
-
--(in-package "AF-RUNTIME-LIB" :nicknames '(abrt afrt))
-+(eval-when (compile load eval)
-+ (unless (find-package "AF-RUNTIME-LIB")
-+ (make-package "AF-RUNTIME-LIB"
-+ :nicknames '("ABRT" "AFRT")
-+ :use '("COMMON-LISP"))))
-+(in-package "AF-RUNTIME-LIB")
-
- (export '(opcase argcase rt-delta-error rt-term-argn rt-term-args
- rt-symbol rt-ite rt-opt rt-function rt-ast
-diff -Naur pvs4.2-orig/ess/lang/ab-term/rel/af-structs.lisp pvs4.2-sbcl/ess/lang/ab-term/rel/af-structs.lisp
---- pvs4.2-orig/ess/lang/ab-term/rel/af-structs.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/ab-term/rel/af-structs.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -23,7 +23,7 @@
- ;;;
- ;;; 07-22-87 rln Initial development and release.
-
--(in-package 'analysis-facility)
-+(in-package :analysis-facility)
-
- ;;; A DP-EVAL structure describes an attribute which is defined by an expression.
- ;;; An expression always defines exactly one attribute.
-diff -Naur pvs4.2-orig/ess/lang/ab-term/rel/af-top.lisp pvs4.2-sbcl/ess/lang/ab-term/rel/af-top.lisp
---- pvs4.2-orig/ess/lang/ab-term/rel/af-top.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/ab-term/rel/af-top.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -29,7 +29,7 @@
- ;;; 07-22-87 rln Initial development release.
-
-
--(in-package 'analysis-facility :nicknames '(ab af))
-+(in-package :analysis-facility)
-
- (export '(ab ab-make help))
-
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/access-par.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/access-par.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/access-par.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/access-par.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -21,7 +21,7 @@
- ;;; Revised Scott Dietzen, Mon Oct 13 15:32:09 1986
-
-
--(in-package 'syntax-box) (use-package :ergolisp)
-+(in-package :syntax-box) (use-package :ergolisp)
-
-
-
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/aux-funs.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/aux-funs.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/aux-funs.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/aux-funs.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -17,7 +17,7 @@
- ;;; Scott Dietzen, Mon Oct 13 16:05:43 1986
-
-
--(in-package 'syntax-box) (use-package :ergolisp)
-+(in-package :syntax-box) (use-package :ergolisp)
-
-
- (defparameter *sb-package* (find-package :sb))
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/collapse.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/collapse.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/collapse.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/collapse.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -16,7 +16,7 @@
-
- ;;;; Basic Function: Collapse fragments into lisp functions
-
--(in-package 'syntax-box) (use-package :ergolisp)
-+(in-package :syntax-box) (use-package :ergolisp)
-
-
- ; The purpose of collapse is to take the fragments produced by process-grammar
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/flatten.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/flatten.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/flatten.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/flatten.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -17,7 +17,7 @@
-
- ;;;; Basic Function: Flatten Patterns
-
--(in-package 'syntax-box) (use-package :ergolisp)
-+(in-package :syntax-box) (use-package :ergolisp)
-
-
-
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/inter-phase.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/inter-phase.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/inter-phase.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/inter-phase.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -16,8 +16,8 @@
-
- ;;; Intermediate Phase.
-
--(in-package 'syntax-box) (use-package :ergolisp)
--(use-package '(sb-runtime))
-+(in-package :syntax-box) (use-package :ergolisp)
-+(use-package :sb-runtime)
-
- ;;; Understanding of the internal grammar term structure is essential to
- ;;; understanding this code (see documentation in access.lisp). @@@
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/lexer-gen.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/lexer-gen.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/lexer-gen.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/lexer-gen.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -31,7 +31,7 @@
- ;;; (Routines check-comment-char(s)-with-op(S))
-
-
--(in-package 'syntax-box) (use-package :ergolisp)
-+(in-package :syntax-box) (use-package :ergolisp)
-
-
-
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/look-ahead.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/look-ahead.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/look-ahead.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/look-ahead.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -9,9 +9,9 @@
- ;;; ******************************************************************* ;;;
-
-
--(in-package 'syntax-box) (use-package :ergolisp)
-+(in-package :syntax-box) (use-package :ergolisp)
-
--(use-package '(sb-runtime))
-+(use-package :sb-runtime)
-
-
-
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/new-rt-format.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/new-rt-format.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/new-rt-format.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/new-rt-format.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -13,7 +13,7 @@
-
- ;;; Scott Dietzen, Wed Aug 26 17:16:29 1987
-
--(in-package 'sb-runtime) (use-package :ergolisp)
-+(in-package :sb-runtime) (use-package :ergolisp)
-
- (export '(
- format-uterm
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/old-rt-format.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/old-rt-format.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/old-rt-format.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/old-rt-format.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -13,7 +13,7 @@
-
- ;;; Scott Dietzen, Wed Aug 26 17:16:29 1987
-
--(in-package 'sb-runtime) (use-package :ergolisp)
-+(in-package :sb-runtime) (use-package :ergolisp)
-
- (export '(
- format-uterm
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/old-rt-unp-structs.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/old-rt-unp-structs.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/old-rt-unp-structs.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/old-rt-unp-structs.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -13,7 +13,7 @@
-
- ;;; Scott Dietzen, Wed Aug 26 17:16:29 1987
-
--(in-package 'sb-runtime) (use-package :ergolisp)
-+(in-package :sb-runtime) (use-package :ergolisp)
-
- (export '(token-p make-token token-kind token-subkind
- token-value token-str-value
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/rt-lex.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/rt-lex.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/rt-lex.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/rt-lex.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -40,7 +40,7 @@
- ))
-
-
--(defconstant possible-single-char-operators
-+(defconstant-if-unbound possible-single-char-operators
- '(#\( #\) #\[ #\] #\{ #\} #\< #\> #\, #\; #\| #\^ #\# #\~ #\/
- #\! #\@ #\$ #\& #\_ #\- #\? #\% #\' #\: #\* #\+ #\` #\= #\\))
-
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/rt-term.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/rt-term.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/rt-term.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/rt-term.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -19,7 +19,7 @@
-
-
-
--(in-package "SB-RUNTIME" :nicknames '("RT-SB" "RTSB" "SB-RT" "SBRT"))
-+(in-package "SB-RUNTIME")
- (use-package :ergolisp)
-
- (use-package '("TERM" "OCC" "OPER"))
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/rt-unparse.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/rt-unparse.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/rt-unparse.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/rt-unparse.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -117,17 +117,17 @@
-
- ;;; Just so we don't repeatedly cons identical tokens.
-
--(defconstant ellipsis-token
-+(defconstant-if-unbound ellipsis-token
- (make-token :kind :lt :subkind :string :value "#"))
--(defconstant cr-token
-+(defconstant-if-unbound cr-token
- (make-token :kind :whitespace :subkind :cr))
--(defconstant unindent-token
-+(defconstant-if-unbound unindent-token
- (make-token :kind :whitespace :subkind :unindent))
--(defconstant tab-left-token
-+(defconstant-if-unbound tab-left-token
- (make-token :kind :whitespace :subkind :tab-left))
--(defconstant tab-right-token
-+(defconstant-if-unbound tab-right-token
- (make-token :kind :whitespace :subkind :tab-right))
--(defconstant untab-token
-+(defconstant-if-unbound untab-token
- (make-token :kind :whitespace :subkind :untab))
-
-
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/rt-unp-attr.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/rt-unp-attr.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/rt-unp-attr.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/rt-unp-attr.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -13,7 +13,7 @@
-
- ;;; Scott Dietzen, Tue Oct 6 15:32:22 1987
-
--(in-package 'sb-runtime) (use-package :ergolisp)
-+(in-package "SB-RUNTIME") (use-package :ergolisp)
-
-
- ;;; The following is a hack to avoid the problems inherent in the circularity
-@@ -42,38 +42,6 @@
-
-
-
--(defun memo-uterm (term unp-function &key (top-level? nil))
-- (if (or *disable-caching*
-- (and *disable-nested-caching*
-- (null top-level?)))
-- (funcall unp-function term)
-- (newattr::get-gsyn theuterm
-- term
-- (list unp-function
-- *unparse-style*
-- *no-escapes*
-- *sb-print-depth*
-- *sb-print-length*
-- *formatting-off*))))
--
--
--(defun memo-aw (uterm width indent-unit-width fontwidth fontheight)
-- (if *disable-caching*
-- (let* ((aw (make-aw :uterm uterm
-- :indent-unit-width indent-unit-width)))
-- (format-aw uterm aw width))
-- (newattr::get-gsyn theaw
-- (uterm-term uterm)
-- (list uterm
-- width
-- indent-unit-width
-- fontwidth
-- fontheight))))
--
--
--
--
--
- (newattr::defgcon uterm-args)
- (newattr::defgsyn theuterm uterm-args)
-
-@@ -105,3 +73,33 @@
- :indent-unit-width indent-unit-width)))
- (format-aw uterm aw width))))
-
-+
-+
-+
-+(defun memo-uterm (term unp-function &key (top-level? nil))
-+ (if (or *disable-caching*
-+ (and *disable-nested-caching*
-+ (null top-level?)))
-+ (funcall unp-function term)
-+ (newattr::get-gsyn theuterm
-+ term
-+ (list unp-function
-+ *unparse-style*
-+ *no-escapes*
-+ *sb-print-depth*
-+ *sb-print-length*
-+ *formatting-off*))))
-+
-+
-+(defun memo-aw (uterm width indent-unit-width fontwidth fontheight)
-+ (if *disable-caching*
-+ (let* ((aw (make-aw :uterm uterm
-+ :indent-unit-width indent-unit-width)))
-+ (format-aw uterm aw width))
-+ (newattr::get-gsyn theaw
-+ (uterm-term uterm)
-+ (list uterm
-+ width
-+ indent-unit-width
-+ fontwidth
-+ fontheight))))
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/rt-unp-structs.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/rt-unp-structs.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/rt-unp-structs.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/rt-unp-structs.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -13,7 +13,7 @@
-
- ;;; Scott Dietzen, Wed Aug 26 17:16:29 1987
-
--(in-package 'sb-runtime) (use-package :ergolisp)
-+(in-package "SB-RUNTIME") (use-package :ergolisp)
-
- (export '(token-p make-token token-kind token-subkind
- token-value token-str-value
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/sbrt-lang-def.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/sbrt-lang-def.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/sbrt-lang-def.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/sbrt-lang-def.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -2,7 +2,9 @@
- ;;; package SB-RUNTIME is seen. fp, Mon Jan 2 11:07:17 1989.
- #-gcl
- (defpackage :sb-runtime
-- #+sbcl (:use :common-lisp :ergolisp :oper :occ :term :sort :lang))
-+ #+sbcl (:nicknames "RT-SB" "RTSB" "SB-RT" "SBRT")
-+ #+sbcl (:use :common-lisp :ergolisp :oper :occ :term :sort :lang)
-+ #+sbcl (:shadowing-import-from :sb-int memq))
- (in-package :sb-runtime)
- #-sbcl (use-package :ergolisp)
- #-sbcl (use-package '(:oper :occ :term :sort :lang))
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/top.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/top.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/top.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/top.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -25,7 +25,7 @@
- ;;; Added calls to preprocessing phase.
-
-
--(in-package 'syntax-box) (use-package :ergolisp)
-+(in-package :syntax-box) (use-package :ergolisp)
-
- (export '(sb sb-make))
-
-diff -Naur pvs4.2-orig/ess/lang/sb-term/rel/unp-code-revise.lisp pvs4.2-sbcl/ess/lang/sb-term/rel/unp-code-revise.lisp
---- pvs4.2-orig/ess/lang/sb-term/rel/unp-code-revise.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/lang/sb-term/rel/unp-code-revise.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -14,7 +14,7 @@
- ;;; This code modifies unparser generator code.
- ;;; Scott Dietzen, Wed Nov 11 15:38:39 1987
-
--(in-package 'SB) (use-package :ergolisp)
-+(in-package :SB) (use-package :ergolisp)
-
-
- (defun unp-code-revision (routines)
-diff -Naur pvs4.2-orig/ess/sys/ergolisp/rel/dlambda.lisp pvs4.2-sbcl/ess/sys/ergolisp/rel/dlambda.lisp
---- pvs4.2-orig/ess/sys/ergolisp/rel/dlambda.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/sys/ergolisp/rel/dlambda.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -26,7 +26,7 @@
- ;; This is a macro so that setf will work for declare-constructor
- `(gethash ,constr *constructors-table* :no-info))
-
--(defconstant *reserved-constrs* '(:as)
-+(defconstant-if-unbound *reserved-constrs* '(:as)
- "List of symbols that may not be used as constructors.")
-
- (defmacro defreconstr (constr argcnt &key equal)
-diff -Naur pvs4.2-orig/ess/sys/tools/rel/box-system.lisp pvs4.2-sbcl/ess/sys/tools/rel/box-system.lisp
---- pvs4.2-orig/ess/sys/tools/rel/box-system.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/sys/tools/rel/box-system.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -190,15 +190,11 @@
- (when lisp-compiler
- (when boot
- (load source-file))
-- (if readtable
-- (let ((*readtable* readtable))
-- (compile-file source-file :output-file compiled-file
-- #+(or lucid allegro) :messages #+(or lucid allegro) messages
-- #+(or cmu sbcl) :progress #+(or cmu sbcl) messages
-- ))
-+ (let ((*readtable* (if readtable readtable *readtable*))
-+ #+sbcl (*compiler-progress* messages))
- (compile-file source-file :output-file compiled-file
- #+(or lucid allegro) :messages #+(or lucid allegro) messages
-- #+(or cmu sbcl) :progress #+(or cmu sbcl) messages
-+ #+cmu :progress #+cmu messages
- ))
- )
- ;; #+kcl (rename-file (merge-pathnames ".o" source-file) compiled-file)
-@@ -249,6 +245,8 @@
- (multiple-value-bind (junk1 junk2 result junk4)
- (run-program "cc" :arguments arguments)
- result)
-+ #+sbcl
-+ (sb-ext:process-exit-code (sb-ext:run-program "cc" arguments))
- #+allegro
- (excl:run-shell-command
- (format nil "cc ~{ ~a~}" arguments))))
-@@ -390,8 +388,8 @@
- ;;; all source files are .lisp, so we need only one set.
- ;;; Recommend not changing the source extension. -fp
-
--(defconstant *lisp-source-extension* "lisp")
--(defconstant *lisp-compiled-extension*
-+(defconstant-if-unbound *lisp-source-extension* "lisp")
-+(defconstant-if-unbound *lisp-compiled-extension*
- #+(and allegro sparc) "fasl" ; Sun4
- #+(and allegro rios) "rfasl" ; PowerPC/RS6000
- #+(and allegro hpux) "hfasl" ; HP 9000
-@@ -421,14 +419,14 @@
- for this implementation of Lisp in the file sys/tools/rel/box-system.lisp.
- Right now it is assumed to be \"bin\".")
-
--(defconstant *lisp-source-suffix-string*
-+(defconstant-if-unbound *lisp-source-suffix-string*
- (concatenate 'string "." *lisp-source-extension*))
-
--(defconstant *lisp-compiled-suffix-string*
-+(defconstant-if-unbound *lisp-compiled-suffix-string*
- (concatenate 'string "." *lisp-compiled-extension*))
-
--(defconstant *lisp-source-extension-pathname*
-+(defconstant-if-unbound *lisp-source-extension-pathname*
- (make-pathname :type *lisp-source-extension*))
-
--(defconstant *lisp-compiled-extension-pathname*
-+(defconstant-if-unbound *lisp-compiled-extension-pathname*
- (make-pathname :type *lisp-compiled-extension*))
-diff -Naur pvs4.2-orig/ess/sys/tools/rel/print-utils.lisp pvs4.2-sbcl/ess/sys/tools/rel/print-utils.lisp
---- pvs4.2-orig/ess/sys/tools/rel/print-utils.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/sys/tools/rel/print-utils.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -8,6 +8,7 @@
- (defpackage :print-utils #+sbcl (:use :common-lisp :ergolisp))
- (in-package :print-utils) #-sbcl (use-package :ergolisp)
-
-+#-sbcl
- (export '(lisp::print-struct lisp::writing-readably)
- :lisp)
- (export '(print-struct writing-readably))
-diff -Naur pvs4.2-orig/ess/sys/tools/rel/regression-test.lisp pvs4.2-sbcl/ess/sys/tools/rel/regression-test.lisp
---- pvs4.2-orig/ess/sys/tools/rel/regression-test.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/sys/tools/rel/regression-test.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -19,8 +19,8 @@
- (defvar *regression-testing-p* nil)
-
- (defun regression-test (&key (name "Anonymous test")
-- form (form-predicate #'identity) script endp)
-- (declare (special name script endp))
-+ form (form-predicate #'identity) script donep)
-+ (declare (special name script donep))
- (let ((*regression-testing-p* t))
- (catch 'script-ended
- (let ((formval (if (functionp form) (funcall form) (eval form))))
-@@ -43,13 +43,13 @@
- (cadr (car script)))
-
- (defun move-script ()
-- (declare (special name script endp))
-+ (declare (special name script donep))
- (when (null script)
-- (if endp
-+ (if donep
- (throw 'script-ended nil)
- (error "Regression test ~s fell off of end of script." name)))
- (pop script)
-- (when (and (null script) endp) (throw 'script-ended nil))
-+ (when (and (null script) donep) (throw 'script-ended nil))
- (values))
-
- (defmacro regression-test-only (key &body body)
-@@ -164,7 +164,7 @@
- :name "Regressible-error should succeed."
- :form '(regressible-error :test "Error message ~s." 'foo)
- :script '((:test "Error message FOO."))
-- :endp t)
-+ :donep t)
-
- #+regression
- (regression-test
-diff -Naur pvs4.2-orig/ess/term/language/rel/languages.lisp pvs4.2-sbcl/ess/term/language/rel/languages.lisp
---- pvs4.2-orig/ess/term/language/rel/languages.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/term/language/rel/languages.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -85,18 +85,18 @@
-
-
-
--(defconstant standard-use-packages
-+(defconstant-if-unbound standard-use-packages
- '("ERGOLISP" "OPER" "OCC" "TERM" "SORT" "SB-RUNTIME" "LANG" "NEWATTR")
- "The standard packages used by SB output files.")
-
--(defconstant standard-use-languages
-+(defconstant-if-unbound standard-use-languages
- '("LEXICAL-TERMINALS")
- "The standard languages used by SB output files.")
-
-
--(defconstant gen-src-file-ext "lisp")
-+(defconstant-if-unbound gen-src-file-ext "lisp")
-
--(defconstant per-gen-src-file-ext
-+(defconstant-if-unbound per-gen-src-file-ext
- (concatenate 'string "." gen-src-file-ext))
-
-
-diff -Naur pvs4.2-orig/ess/term/trep/rel/attr-prims.lisp pvs4.2-sbcl/ess/term/trep/rel/attr-prims.lisp
---- pvs4.2-orig/ess/term/trep/rel/attr-prims.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/term/trep/rel/attr-prims.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -19,7 +19,11 @@
- ;;; features from the terms, so it is the default method for storing
- ;;; attributes.
-
--(in-package "TERM" :nicknames '("GTERM")) (use-package :ergolisp)
-+(eval-when (compile load eval)
-+ (unless (find-package "TERM")
-+ (make-package "TERM" :nicknames '("GTERM")
-+ :use '(:cl-user :common-lisp :ergolisp))))
-+(in-package "TERM")
-
- (export '(attr-clear-one attr-clear-all))
-
-diff -Naur pvs4.2-orig/ess/term/trep/rel/gterm.lisp pvs4.2-sbcl/ess/term/trep/rel/gterm.lisp
---- pvs4.2-orig/ess/term/trep/rel/gterm.lisp 2007-07-02 20:07:41.000000000 +0000
-+++ pvs4.2-sbcl/ess/term/trep/rel/gterm.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -29,7 +29,11 @@
- ;;; instead of a real operator.
- ;;;
-
--(in-package :term :nicknames '(:gterm)) (use-package :ergolisp)
-+(eval-when (compile load eval)
-+ (unless (find-package "TERM")
-+ (make-package "TERM" :nicknames '("GTERM")
-+ :use '(:cl-user :common-lisp :ergolisp))))
-+(in-package "TERM")
-
- (export '(term termp mk-term ds-term term-op term-args
- term-attr set-term-attr))
-diff -Naur pvs4.2-orig/install-sh pvs4.2-sbcl/install-sh
---- pvs4.2-orig/install-sh 2007-07-02 20:07:43.000000000 +0000
-+++ pvs4.2-sbcl/install-sh 2009-03-24 18:56:17.000000000 +0000
-@@ -1,7 +1,7 @@
- #!/bin/sh
- # install - install a program, script, or datafile
-
--scriptversion=2005-11-07.23
-+scriptversion=2006-12-25.00
-
- # This originates from X11R5 (mit/util/scripts/install.sh), which was
- # later released in X11R6 (xc/config/util/install.sh) with the
-@@ -39,52 +39,68 @@
- # when there is no Makefile.
- #
- # This script is compatible with the BSD install script, but was written
--# from scratch. It can only install one file at a time, a restriction
--# shared with many OS's install programs.
-+# from scratch.
-+
-+nl='
-+'
-+IFS=" "" $nl"
-
- # set DOITPROG to echo to test this script
-
- # Don't use :- since 4.3BSD and earlier shells don't like it.
--doit="${DOITPROG-}"
-+doit=${DOITPROG-}
-+if test -z "$doit"; then
-+ doit_exec=exec
-+else
-+ doit_exec=$doit
-+fi
-
--# put in absolute paths if you don't have them in your path; or use env. vars.
-+# Put in absolute file names if you don't have them in your path;
-+# or use environment vars.
-
--mvprog="${MVPROG-mv}"
--cpprog="${CPPROG-cp}"
--chmodprog="${CHMODPROG-chmod}"
--chownprog="${CHOWNPROG-chown}"
--chgrpprog="${CHGRPPROG-chgrp}"
--stripprog="${STRIPPROG-strip}"
--rmprog="${RMPROG-rm}"
--mkdirprog="${MKDIRPROG-mkdir}"
-+chgrpprog=${CHGRPPROG-chgrp}
-+chmodprog=${CHMODPROG-chmod}
-+chownprog=${CHOWNPROG-chown}
-+cmpprog=${CMPPROG-cmp}
-+cpprog=${CPPROG-cp}
-+mkdirprog=${MKDIRPROG-mkdir}
-+mvprog=${MVPROG-mv}
-+rmprog=${RMPROG-rm}
-+stripprog=${STRIPPROG-strip}
-+
-+posix_glob='?'
-+initialize_posix_glob='
-+ test "$posix_glob" != "?" || {
-+ if (set -f) 2>/dev/null; then
-+ posix_glob=
-+ else
-+ posix_glob=:
-+ fi
-+ }
-+'
-
--posix_glob=
- posix_mkdir=
-
--# Symbolic mode for testing mkdir with directories.
--# It is the same as 755, but also tests that "u+" works.
--test_mode=u=rwx,g=rx,o=rx,u+wx
--
- # Desired mode of installed file.
- mode=0755
-
--# Desired mode of newly created intermediate directories.
--# It is empty if not known yet.
--intermediate_mode=
--
-+chgrpcmd=
- chmodcmd=$chmodprog
- chowncmd=
--chgrpcmd=
--stripcmd=
-+mvcmd=$mvprog
- rmcmd="$rmprog -f"
--mvcmd="$mvprog"
-+stripcmd=
-+
- src=
- dst=
- dir_arg=
--dstarg=
-+dst_arg=
-+
-+copy_on_change=false
- no_target_directory=
-
--usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-+usage="\
-+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 [OPTION]... -t DIRECTORY SRCFILES...
- or: $0 [OPTION]... -d DIRECTORIES...
-@@ -94,81 +110,86 @@
- In the 4th, create DIRECTORIES.
-
- Options:
---c (ignored)
---d create directories instead of installing files.
---g GROUP $chgrpprog installed files to GROUP.
---m MODE $chmodprog installed files to MODE.
---o USER $chownprog installed files to USER.
---s $stripprog installed files.
---t DIRECTORY install into DIRECTORY.
---T report an error if DSTFILE is a directory.
----help display this help and exit.
----version display version info and exit.
-+ --help display this help and exit.
-+ --version display version info and exit.
-+
-+ -c (ignored)
-+ -C install only if different (preserve the last data modification time)
-+ -d create directories instead of installing files.
-+ -g GROUP $chgrpprog installed files to GROUP.
-+ -m MODE $chmodprog installed files to MODE.
-+ -o USER $chownprog installed files to USER.
-+ -s $stripprog installed files.
-+ -t DIRECTORY install into DIRECTORY.
-+ -T report an error if DSTFILE is a directory.
-
- Environment variables override the default commands:
-- CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
-+ RMPROG STRIPPROG
- "
-
--while test -n "$1"; do
-+while test $# -ne 0; do
- case $1 in
-- -c) shift
-- continue;;
-+ -c) ;;
-
-- -d) dir_arg=true
-- shift
-- continue;;
-+ -C) copy_on_change=true;;
-+
-+ -d) dir_arg=true;;
-
- -g) chgrpcmd="$chgrpprog $2"
-- shift
-- shift
-- continue;;
-+ shift;;
-
- --help) echo "$usage"; exit $?;;
-
- -m) mode=$2
-- shift
-- shift
-- continue;;
-+ case $mode in
-+ *' '* | *' '* | *'
-+'* | *'*'* | *'?'* | *'['*)
-+ echo "$0: invalid mode: $mode" >&2
-+ exit 1;;
-+ esac
-+ shift;;
-
- -o) chowncmd="$chownprog $2"
-- shift
-- shift
-- continue;;
--
-- -s) stripcmd=$stripprog
-- shift
-- continue;;
--
-- -t) dstarg=$2
-- shift
-- shift
-- continue;;
--
-- -T) no_target_directory=true
-- shift
-- continue;;
-+ shift;;
-+
-+ -s) stripcmd=$stripprog;;
-+
-+ -t) dst_arg=$2
-+ shift;;
-+
-+ -T) no_target_directory=true;;
-
- --version) echo "$0 $scriptversion"; exit $?;;
-
-- *) # When -d is used, all remaining arguments are directories to create.
-- # When -t is used, the destination is already specified.
-- test -n "$dir_arg$dstarg" && break
-- # Otherwise, the last argument is the destination. Remove it from $@.
-- for arg
-- do
-- if test -n "$dstarg"; then
-- # $@ is not empty: it contains at least $arg.
-- set fnord "$@" "$dstarg"
-- shift # fnord
-- fi
-- shift # arg
-- dstarg=$arg
-- done
-+ --) shift
- break;;
-+
-+ -*) echo "$0: invalid option: $1" >&2
-+ exit 1;;
-+
-+ *) break;;
- esac
-+ shift
- done
-
--if test -z "$1"; then
-+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
-+ # When -d is used, all remaining arguments are directories to create.
-+ # When -t is used, the destination is already specified.
-+ # Otherwise, the last argument is the destination. Remove it from $@.
-+ for arg
-+ do
-+ if test -n "$dst_arg"; then
-+ # $@ is not empty: it contains at least $arg.
-+ set fnord "$@" "$dst_arg"
-+ shift # fnord
-+ fi
-+ shift # arg
-+ dst_arg=$arg
-+ done
-+fi
-+
-+if test $# -eq 0; then
- if test -z "$dir_arg"; then
- echo "$0: no input file specified." >&2
- exit 1
-@@ -178,13 +199,38 @@
- exit 0
- fi
-
--test -n "$dir_arg" || trap '(exit $?); exit' 1 2 13 15
-+if test -z "$dir_arg"; then
-+ trap '(exit $?); exit' 1 2 13 15
-+
-+ # Set umask so as not to create temps with too-generous modes.
-+ # However, 'strip' requires both read and write access to temps.
-+ case $mode in
-+ # Optimize common cases.
-+ *644) cp_umask=133;;
-+ *755) cp_umask=22;;
-+
-+ *[0-7])
-+ if test -z "$stripcmd"; then
-+ u_plus_rw=
-+ else
-+ u_plus_rw='% 200'
-+ fi
-+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
-+ *)
-+ if test -z "$stripcmd"; then
-+ u_plus_rw=
-+ else
-+ u_plus_rw=,u+rw
-+ fi
-+ cp_umask=$mode$u_plus_rw;;
-+ esac
-+fi
-
- for src
- do
- # Protect names starting with `-'.
- case $src in
-- -*) src=./$src ;;
-+ -*) src=./$src;;
- esac
-
- if test -n "$dir_arg"; then
-@@ -202,22 +248,22 @@
- exit 1
- fi
-
-- if test -z "$dstarg"; then
-+ if test -z "$dst_arg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
-- dst=$dstarg
-+ dst=$dst_arg
- # Protect names starting with `-'.
- case $dst in
-- -*) dst=./$dst ;;
-+ -*) dst=./$dst;;
- esac
-
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- if test -n "$no_target_directory"; then
-- echo "$0: $dstarg: Is a directory" >&2
-+ echo "$0: $dst_arg: Is a directory" >&2
- exit 1
- fi
- dstdir=$dst
-@@ -230,14 +276,25 @@
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
-- X"$dst" : 'X\(/\)' \| \
-- . : '\(.\)' 2>/dev/null ||
-+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
-- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-- /^X\(\/\/\)$/{ s//\1/; q; }
-- /^X\(\/\).*/{ s//\1/; q; }
-- s/.*/./; q'
-+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-+ s//\1/
-+ q
-+ }
-+ /^X\(\/\/\)[^/].*/{
-+ s//\1/
-+ q
-+ }
-+ /^X\(\/\/\)$/{
-+ s//\1/
-+ q
-+ }
-+ /^X\(\/\).*/{
-+ s//\1/
-+ q
-+ }
-+ s/.*/./; q'
- `
-
- test -d "$dstdir"
-@@ -250,83 +307,131 @@
- if test $dstdir_status != 0; then
- case $posix_mkdir in
- '')
-- posix_mkdir=false
-- if $mkdirprog -m $test_mode -p -- / >/dev/null 2>&1; then
-- posix_mkdir=true
-- else
-- # Remove any dirs left behind by ancient mkdir implementations.
-- rmdir ./-m "$test_mode" ./-p ./-- 2>/dev/null
-- fi ;;
-- esac
--
-- if
-- $posix_mkdir && {
-+ # Create intermediate dirs using mode 755 as modified by the umask.
-+ # This is like FreeBSD 'install' as of 1997-10-28.
-+ umask=`umask`
-+ case $stripcmd.$umask in
-+ # Optimize common cases.
-+ *[2367][2367]) mkdir_umask=$umask;;
-+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-+
-+ *[0-7])
-+ mkdir_umask=`expr $umask + 22 \
-+ - $umask % 100 % 40 + $umask % 20 \
-+ - $umask % 10 % 4 + $umask % 2
-+ `;;
-+ *) mkdir_umask=$umask,go-w;;
-+ esac
-
- # With -d, create the new directory with the user-specified mode.
-- # Otherwise, create it using the same intermediate mode that
-- # mkdir -p would use when creating intermediate directories.
-- # POSIX says that this mode is "$(umask -S),u+wx", so use that
-- # if umask -S works.
--
-+ # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
-- mkdir_mode=$mode
-+ mkdir_mode=-m$mode
- else
-- case $intermediate_mode in
-- '')
-- if umask_S=`(umask -S) 2>/dev/null`; then
-- intermediate_mode=$umask_S,u+wx
-- else
-- intermediate_mode=$test_mode
-- fi ;;
-- esac
-- mkdir_mode=$intermediate_mode
-+ mkdir_mode=
- fi
-
-- $mkdirprog -m "$mkdir_mode" -p -- "$dstdir"
-- }
-+ posix_mkdir=false
-+ case $umask in
-+ *[123567][0-7][0-7])
-+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
-+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-+ ;;
-+ *)
-+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-+
-+ if (umask $mkdir_umask &&
-+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-+ then
-+ if test -z "$dir_arg" || {
-+ # Check for POSIX incompatibilities with -m.
-+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-+ # other-writeable bit of parent directory when it shouldn't.
-+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
-+ case $ls_ld_tmpdir in
-+ d????-?r-*) different_mode=700;;
-+ d????-?--*) different_mode=755;;
-+ *) false;;
-+ esac &&
-+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-+ }
-+ }
-+ then posix_mkdir=:
-+ fi
-+ rmdir "$tmpdir/d" "$tmpdir"
-+ else
-+ # Remove any dirs left behind by ancient mkdir implementations.
-+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-+ fi
-+ trap '' 0;;
-+ esac;;
-+ esac
-+
-+ if
-+ $posix_mkdir && (
-+ umask $mkdir_umask &&
-+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
-+ )
- then :
- else
-
-- # mkdir does not conform to POSIX, or it failed possibly due to
-- # a race condition. Create the directory the slow way, step by
-- # step, checking for races as we go.
-+ # The umask is ridiculous, or mkdir does not conform to POSIX,
-+ # or it failed possibly due to a race condition. Create the
-+ # directory the slow way, step by step, checking for races as we go.
-
- case $dstdir in
-- /*) pathcomp=/ ;;
-- -*) pathcomp=./ ;;
-- *) pathcomp= ;;
-+ /*) prefix='/';;
-+ -*) prefix='./';;
-+ *) prefix='';;
- esac
-
-- case $posix_glob in
-- '')
-- if (set -f) 2>/dev/null; then
-- posix_glob=true
-- else
-- posix_glob=false
-- fi ;;
-- esac
-+ eval "$initialize_posix_glob"
-
- oIFS=$IFS
- IFS=/
-- $posix_glob && set -f
-+ $posix_glob set -f
- set fnord $dstdir
- shift
-- $posix_glob && set +f
-+ $posix_glob set +f
- IFS=$oIFS
-
-+ prefixes=
-+
- for d
- do
-- test "x$d" = x && continue
-+ test -z "$d" && continue
-
-- pathcomp=$pathcomp$d
-- if test ! -d "$pathcomp"; then
-- $mkdirprog "$pathcomp"
-- # Don't fail if two instances are running concurrently.
-- test -d "$pathcomp" || exit 1
-+ prefix=$prefix$d
-+ if test -d "$prefix"; then
-+ prefixes=
-+ else
-+ if $posix_mkdir; then
-+ (umask=$mkdir_umask &&
-+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-+ # Don't fail if two instances are running concurrently.
-+ test -d "$prefix" || exit 1
-+ else
-+ case $prefix in
-+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-+ *) qprefix=$prefix;;
-+ esac
-+ prefixes="$prefixes '$qprefix'"
-+ fi
- fi
-- pathcomp=$pathcomp/
-+ prefix=$prefix/
- done
-- obsolete_mkdir_used=true
-+
-+ if test -n "$prefixes"; then
-+ # Don't fail if two instances are running concurrently.
-+ (umask $mkdir_umask &&
-+ eval "\$doit_exec \$mkdirprog $prefixes") ||
-+ test -d "$dstdir" || exit 1
-+ obsolete_mkdir_used=true
-+ fi
- fi
- fi
-
-@@ -334,7 +439,7 @@
- { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
- { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
-- test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dst"; } || exit 1
-+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
- else
-
- # Make a couple of temp file names in the proper directory.
-@@ -345,7 +450,7 @@
- trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-
- # Copy the file name to the temp name.
-- $doit $cpprog "$src" "$dsttmp" &&
-+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
-
- # and set any options; do chmod last to preserve setuid bits.
- #
-@@ -353,41 +458,54 @@
- # ignore errors from any of these, just make sure not to ignore
- # errors from the above "$doit $cpprog $src $dsttmp" command.
- #
-- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-- && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-- && { test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dsttmp"; } &&
--
-- # Now rename the file to the real destination.
-- { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
-- || {
-- # The rename failed, perhaps because mv can't rename something else
-- # to itself, or perhaps because mv is so ancient that it does not
-- # support -f.
--
-- # Now remove or move aside any old file at destination location.
-- # We try this two ways since rm can't unlink itself on some
-- # systems and the destination file might be busy for other
-- # reasons. In this case, the final cleanup might fail but the new
-- # file should still install successfully.
-- {
-- if test -f "$dst"; then
-- $doit $rmcmd -f "$dst" 2>/dev/null \
-- || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
-- && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
-- || {
-- echo "$0: cannot unlink or rename $dst" >&2
-- (exit 1); exit 1
-- }
-- else
-- :
-- fi
-- } &&
--
-- # Now rename the file to the real destination.
-- $doit $mvcmd "$dsttmp" "$dst"
-- }
-- } || exit 1
-+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
-+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
-+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
-+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-+
-+ # If -C, don't bother to copy if it wouldn't change the file.
-+ if $copy_on_change &&
-+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
-+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-+
-+ eval "$initialize_posix_glob" &&
-+ $posix_glob set -f &&
-+ set X $old && old=:$2:$4:$5:$6 &&
-+ set X $new && new=:$2:$4:$5:$6 &&
-+ $posix_glob set +f &&
-+
-+ test "$old" = "$new" &&
-+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
-+ then
-+ rm -f "$dsttmp"
-+ else
-+ # Rename the file to the real destination.
-+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
-+
-+ # The rename failed, perhaps because mv can't rename something else
-+ # to itself, or perhaps because mv is so ancient that it does not
-+ # support -f.
-+ {
-+ # Now remove or move aside any old file at destination location.
-+ # We try this two ways since rm can't unlink itself on some
-+ # systems and the destination file might be busy for other
-+ # reasons. In this case, the final cleanup might fail but the new
-+ # file should still install successfully.
-+ {
-+ test ! -f "$dst" ||
-+ $doit $rmcmd -f "$dst" 2>/dev/null ||
-+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-+ } ||
-+ { echo "$0: cannot unlink or rename $dst" >&2
-+ (exit 1); exit 1
-+ }
-+ } &&
-+
-+ # Now rename the file to the real destination.
-+ $doit $mvcmd "$dsttmp" "$dst"
-+ }
-+ fi || exit 1
-
- trap '' 0
- fi
-diff -Naur pvs4.2-orig/Makefile.in pvs4.2-sbcl/Makefile.in
---- pvs4.2-orig/Makefile.in 2009-03-24 18:55:34.000000000 +0000
-+++ pvs4.2-sbcl/Makefile.in 2009-03-24 18:56:17.000000000 +0000
-@@ -90,18 +90,18 @@
- endif
- endif
-
--# ifneq ($(SBCL_HOME),)
--# # Check that the given SBCL_HOME works
--# SBCLISPEXE = $(SBCL_HOME)/bin/lisp
--# ifeq ($(shell if [ -x "$(SBCLISPEXE)" ]; then echo OK; fi),OK)
--# SBCLVERSION = $(shell $(SBCL_HOME)/bin/lisp -batch -eval '(progn (format t "~a" (lisp-implementation-version)) (terpri) (quit))')
--# $(warning "SBCL Version $(SBCLVERSION)")
--# sbcl-devel += $(bindir)/devel/$(SYSTEM)-sbclisp
--# sbcl-rt += $(bindir)/runtime/$(SYSTEM)-sbclisp
--# else
--# $(error "$(SBCLISPEXE) is not executable")
--# endif
--# endif
-+ifneq ($(SBCLISP_HOME),)
-+# Check that the given SBCLISP_HOME works
-+SBCLISPEXE = $(SBCLISP_HOME)/bin/sbcl
-+ifeq ($(shell if [ -x "$(SBCLISPEXE)" ]; then echo OK; fi),OK)
-+SBCLVERSION = $(shell $(SBCLISPEXE) --version)
-+$(warning "$(SBCLVERSION)")
-+sbcl-devel += $(bindir)/devel/$(SYSTEM)-sbclisp
-+sbcl-rt += $(bindir)/runtime/$(SYSTEM)-sbclisp
-+else
-+$(error "$(SBCLISPEXE) is not executable")
-+endif
-+endif
-
-
- LOAD-FOREIGN-EXTENSION=so
-@@ -342,6 +342,7 @@
- src/tex-support.lisp \
- src/raw-api.lisp
-
-+sbcllisp += src/utils/file-utils-sbcl.lisp
- cmulisp += src/utils/file-utils-cmu.lisp
- allegrolisp += src/utils/file-utils.lisp
-
-@@ -372,6 +373,7 @@
-
- bddlisp = BDD/bdd.lisp BDD/mu.lisp
- allegrolisp += BDD/bdd-allegro.lisp BDD/mu-allegro.lisp
-+sbcllisp += BDD/bdd-sbcl.lisp BDD/mu-sbcl.lisp
- cmulisp += BDD/bdd-cmu.lisp BDD/mu-cmu.lisp
-
- PVSiolisp = src/PVSio/pvs-lib.lisp src/PVSio/defattach.lisp \
-@@ -423,6 +425,7 @@
- groundevallisp := $(patsubst %,$(PVSPATH)%,$(groundevallisp))
- inst-by-unif-lisp := $(patsubst %,$(PVSPATH)%,$(inst-by-unif-lisp))
- allegrolisp := $(patsubst %,$(PVSPATH)%,$(allegrolisp))
-+sbcllisp := $(patsubst %,$(PVSPATH)%,$(sbcllisp))
- cmulisp := $(patsubst %,$(PVSPATH)%,$(cmulisp))
- endif
-
-@@ -437,16 +440,16 @@
- .PHONY : all devel runtime parser emacs prelude-files-and-regions etags
-
- ifneq ($(buildcmds),)
--ifeq ($(CMULISP_HOME)$(ALLEGRO_HOME),)
--$(error "Must set CMULISP_HOME or ALLEGRO_HOME")
-+ifeq ($(SBCLISP_HOME)$(CMULISP_HOME)$(ALLEGRO_HOME),)
-+$(error "Must set SBCLISP_HOME, CMULISP_HOME, or ALLEGRO_HOME")
- endif
- endif
-
- all : devel runtime prelude-files-and-regions $(emacs-elc) etags
-
--devel : $(allegro-devel) $(cmulisp-devel)
-+devel : $(allegro-devel) $(sbcl-devel) $(cmulisp-devel)
-
--runtime : $(allegro-rt) $(cmulisp-rt)
-+runtime : $(allegro-rt) $(sbcl-rt) $(cmulisp-rt)
-
- parser : pvs-parser-out
-
-@@ -454,8 +457,8 @@
-
- etags : $(PVSPATH)TAGS
-
--$(PVSPATH)TAGS : $(lisp-files) $(allegrolisp) $(cmulisp) $(pvs-emacs-src)
-- $(ETAGS) $(lisp-files) $(allegrolisp) $(cmulisp) $(pvs-emacs-src)
-+$(PVSPATH)TAGS : $(lisp-files) $(allegrolisp) $(sbcllisp) $(cmulisp) $(pvs-emacs-src)
-+ $(ETAGS) $(lisp-files) $(allegrolisp) $(sbcllisp) $(cmulisp) $(pvs-emacs-src)
-
- fileutils = \
- $(PVSPATH)src/utils/$(PLATFORM)/file_utils.$(LOAD-FOREIGN-EXTENSION) \
-@@ -472,6 +475,56 @@
- # Here are the rules for building the PVS grammar, pvs-methods file, and
- # devel and runtime images.
-
-+ifneq ($(SBCLISP_HOME),)
-+
-+ifeq ($(ALLEGRO_HOME),) # Build these with Allegro, if available
-+$(PVSPATH)src/pvs-lexer.lisp : $(pvs-parser-in)
-+ @echo "******* Creating parser"
-+ $(SBCLISPEXE) --load src/make-pvs-parser
-+
-+$(PVSPATH)src/pvs-methods.lisp : $(PVSPATH)src/make-pvs-methods.lisp \
-+ $(PVSPATH)src/defcl.lisp \
-+ $(PVSPATH)src/classes-expr.lisp \
-+ $(PVSPATH)src/classes-decl.lisp
-+ @echo "******* Creating pvs-methods.lisp"
-+ $(SBCLISPEXE) --eval "(defvar *pvs-path* \"$(PVSPATH)\")" \
-+ --load src/make-pvs-methods.lisp
-+endif
-+
-+$(sbcl-devel) $(sbcl-rt) : $(image-deps) \
-+ $(pvs-make-files) $(ess) $(ff-files) \
-+ $(lisp-files) $(sbcllisp) \
-+ $(PVSPATH)lib/prelude.pvs $(PVSPATH)lib/prelude.prf
-+ $(MKDIR) -p $(subst $(SYSTEM)-sbclisp,,$@)
-+ @echo "******* Compiling PVS files in Steel Bank Common Lisp (SBCL)"
-+ $(SBCLISPEXE) --eval '(require :sb-posix)' \
-+ --eval '(require :sb-md5)' \
-+ --eval '(load "pvs.system" :verbose t)' \
-+ --eval "(let ((*load-pvs-prelude* nil)) \
-+ (mk:operate-on-system :pvs :compile))" \
-+ --eval '(quit)'
-+ cp $(PVSPATH)src/utils/$(PLATFORM)/b64 $(bindir)
-+ @echo "******* Building PVS image $@"
-+ $(SBCLISPEXE) --eval '(require :sb-posix)' \
-+ --eval '(require :sb-md5)' \
-+ --eval '(load "pvs.system" :verbose t)' \
-+ --eval "(unwind-protect \
-+ (mk:operate-on-system :pvs :compile) \
-+ (save-lisp-and-die \"$@.core\" \
-+ :toplevel (function startup-pvs) \
-+ ))"
-+ -rm $(PVSPATH)BDD/$(PLATFORM)/bdd-sbcl.*
-+ cp $(SBCLISPEXE) $(subst $(SYSTEM)-sbclisp,,$@)
-+ cp $(PVSPATH)BDD/$(PLATFORM)/mu.$(LOAD-FOREIGN-EXTENSION) $(subst $(SYSTEM)-sbclisp,,$@)
-+ cp $(PVSPATH)BDD/bdd-sbcl.lisp $(PVSPATH)BDD/mu-sbcl.lisp $(subst $(SYSTEM)-sbclisp,,$@)
-+ cp $(PVSPATH)src/WS1S/$(PLATFORM)/ws1s.$(LOAD-FOREIGN-EXTENSION) $(subst $(SYSTEM)-sbclisp,,$@)
-+ cp $(PVSPATH)src/WS1S/lisp/dfa-foreign-sbcl.lisp $(subst $(SYSTEM)-sbclisp,,$@)
-+ cp $(PVSPATH)src/utils/$(PLATFORM)/b64 $(bindir)
-+ echo "#!/bin/sh" > $@
-+ echo "sbcl --core \`dirname \$$0\`/\`basename \$$0\`.core \$$*" >> $@
-+ chmod a+x $@
-+endif
-+
- ifneq ($(CMULISP_HOME),)
-
- ifeq ($(ALLEGRO_HOME),) # Build these with Allegro, if available
-@@ -621,7 +674,7 @@
-
- faslexts = fasl,rfasl,hfasl,lfasl,mfasl,nfasl,sbin,obin,rbin,mbin,x86f,ppcf,sparcf,x8664s,x86s,ppcs,sparcs,clfasl,wfasl,err
-
--platforms = ix86-Linux,ix86-MacOSX,powerpc-MacOSX,powerpc-MacOSX,sun4-SunOS5
-+platforms = ix86-Linux,ix86_64-Linux,ix86-MacOSX,powerpc-MacOSX,powerpc-MacOSX,sun4-SunOS5
- # HT: Need to put a comma in a variable, because a literal
- # comma cannot appear in a makefile function argument.
- comma:= ,
-diff -Naur pvs4.2-orig/pvs-config.lisp pvs4.2-sbcl/pvs-config.lisp
---- pvs4.2-orig/pvs-config.lisp 2008-07-20 08:40:19.000000000 +0000
-+++ pvs4.2-sbcl/pvs-config.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -99,7 +99,7 @@
-
- #+sbcl
- (defun bye (&optional (exit-status 0))
-- (sb-unix:unix-exit exit-status))
-+ (quit :unix-status exit-status))
-
- (defun pvs-version-and-quit ()
- (format t "PVS Version ~a" (eval (find-symbol (string :*pvs-version*) :pvs)))
-diff -Naur pvs4.2-orig/pvs.in pvs4.2-sbcl/pvs.in
---- pvs4.2-orig/pvs.in 2008-07-20 08:48:14.000000000 +0000
-+++ pvs4.2-sbcl/pvs.in 2009-03-24 18:56:17.000000000 +0000
-@@ -11,7 +11,7 @@
- # -version | --version prints the PVS version
- # -emacs emacsref emacs, xemacs, alias, or pathname
- # -load-after efile loads emacs file name after PVS emacs files
--# -lisp name lisp image name - allegro or cmulisp
-+# -lisp name lisp image name - allegro, cmulisp, or sbclisp
- # -runtime use the runtime image (devel is default, if there)
- # -decision-procedures set the default decision procedures (ics or shostak)
- # -force-decision-procedures forces the decision procedures to be used
-@@ -42,10 +42,10 @@
- # PVSVERBOSE - corresponds to the -v argument
- #
- # The following environment variables are used by PVS, and are set below:
--# PVSPATH pvs system path - this should not normally be set by the user
--# PVSARCH sun4 or ix86
-+# PVSPATH pvs system path - this should not normally be set by the user
-+# PVSARCH sun4, ix86, ix86_64, or powerpc
- #
--# The PVS binary paths are appended to the front of the PATH variable
-+# The PVS binary paths are appended to the front of the PATH variable
- # --------------------------------------------------------------------
- # PVS
- # Copyright (C) 2006, SRI International. All Rights Reserved.
-@@ -98,7 +98,8 @@
- case $2 in
- allegro) PVSLISP=allegro;;
- cmulisp) PVSLISP=cmulisp;;
-- *) echo "Only allegro and cmulisp are currently available"
-+ sbclisp) PVSLISP=sbclisp;;
-+ *) echo "Only allegro, cmulisp, and sbclisp are currently available"
- exit 1;;
- esac
- shift;;
-@@ -170,7 +171,7 @@
- -version | --version show the PVS version number
- -emacs emacsref emacs, xemacs, alias, or pathname
- -load-after efile loads emacs file after PVS emacs files
-- -lisp name lisp image name (allegro or cmulisp)
-+ -lisp name lisp image name (allegro, cmulisp, or sbclisp)
- -runtime use the runtime image
- -decision-procedures set default decision procedures (ics or shostak)
- -force-decision-procedures forces the decision procedures (ics or shostak)
-@@ -198,13 +199,17 @@
- case $opsys in
- SunOS) majvers=`uname -r | cut -d"." -f1`
- if [ $majvers = 4 ]
-- then echo "PVS 3.3 only runs under Mac OS X, Linux, FreeBSD, or Solaris"; exit 1
-+ then echo "PVS 4.2 only runs under Mac OS X, Linux, FreeBSD, or Solaris"; exit 1
- fi
- PVSARCH=sun4;;
- Linux) # If Linux, we need to determine the Redhat version to use.
- opsys=Linux
- majvers=
-- PVSARCH=ix86
-+ case `uname -m` in
-+ x86) PVSARCH=ix86 ;;
-+ x86_64) PVSARCH=ix86_64 ;;
-+ *) echo "PVS 4.2 only runs on Intel Linux"; exit 1
-+ esac
- # Allegro does not work with Linux's New Posix Thread Library (NPTL)
- # used in newer Red Hat kernels and 2.6 kernels. This will force
- # the old thread-implementation.
-@@ -215,7 +220,11 @@
- ;;
- FreeBSD) opsys=Linux
- majvers=
-- PVSARCH=ix86
-+ case `uname -m` in
-+ x86) PVSARCH=ix86 ;;
-+ x86_64) PVSARCH=ix86_64 ;;
-+ *) echo "PVS 4.2 only runs on Intel Linux"; exit 1
-+ esac
- # Allegro does not work with Linux's New Posix Thread Library (NPTL)
- # used in newer Red Hat kernels and 2.6 kernels. This will force
- # the old thread-implementation.
-@@ -233,13 +242,13 @@
- #majvers=`uname -r | cut -d"." -f1`
- majvers=
- ;;
-- *) echo "PVS 3.3 only runs under Solaris, Linux, FreeBSD (linux-enabled), or Mac (Darwin 7.4)"; exit 1
-+ *) echo "PVS 4.2 only runs under Solaris, Linux, FreeBSD (linux-enabled), or Mac (Darwin 7.4)"; exit 1
- esac
-
- binpath=$PVSPATH/bin/$PVSARCH-$opsys${majvers}
-
--if [ -n "$PVSLISP" -a "$PVSLISP" != "allegro" -a "$PVSLISP" != "cmulisp" ]
-- then echo "ERROR: PVSLISP must be unset, or set to 'allegro' or 'cmulisp'"
-+if [ -n "$PVSLISP" -a "$PVSLISP" != "allegro" -a "$PVSLISP" != "cmulisp" -a "$PVSLISP" != "sbclisp" ]
-+ then echo "ERROR: PVSLISP must be unset, or set to 'allegro', 'cmulisp', or 'sbclisp'"
- exit 1
- fi
-
-@@ -252,6 +261,10 @@
- then PVSLISP=cmulisp
- elif [ -x $binpath/runtime/pvs-cmulisp ]
- then PVSLISP=cmulisp
-+ elif [ -x $binpath/devel/pvs-sbclisp ]
-+ then PVSLISP=sbclisp
-+ elif [ -x $binpath/runtime/pvs-sbclisp ]
-+ then PVSLISP=sbclisp
- else echo "No executable available in $binpath"
- exit 1
- fi
-@@ -292,6 +305,16 @@
- do flags="$flags -load $lf"; done
- fi
- ;;
-+ sbclisp)
-+ noinit="--noinform --no-userinit"
-+ evalflag="--eval"
-+ if [ -n "$lisploadfiles" ]
-+ then
-+ flags="$flags --eval (pvs::pvs-init)"
-+ for lf in $lisploadfiles
-+ do flags="$flags --load $lf"; done
-+ fi
-+ ;;
- esac
-
- PVSPATCHLEVEL=${PVSPATCHLEVEL:-2}
-diff -Naur pvs4.2-orig/pvsio.in pvs4.2-sbcl/pvsio.in
---- pvs4.2-orig/pvsio.in 2007-11-09 20:39:43.000000000 +0000
-+++ pvs4.2-sbcl/pvsio.in 2009-03-24 18:56:17.000000000 +0000
-@@ -22,7 +22,7 @@
- -T|--timing print timing information for each evaluation
- -v|--version print PVSio version
- -V|--verbose print typechecking information
-- -l|--lisp PVS lisp version [allegro,cmulisp]
-+ -l|--lisp PVS lisp version [allegro,cmulisp,sbclisp]
- <file>@<theory>:<main> load <theory> from <file>.pvs, evaluate <main>,
- and exit
-
-@@ -42,7 +42,8 @@
- case $2 in
- allegro) PVSLISP='-lisp allegro';;
- cmulisp) PVSLISP='-lisp cmulisp';;
-- *) echo "Only allegro and cmulisp are currently available"
-+ sbclisp) PVSLISP='-lisp sbclisp';;
-+ *) echo "Only allegro, cmulisp, and sbclisp are currently available"
- exit 1;;
- esac
- shift;;
-diff -Naur pvs4.2-orig/pvs-sbcl.spec pvs4.2-sbcl/pvs-sbcl.spec
---- pvs4.2-orig/pvs-sbcl.spec 1970-01-01 00:00:00.000000000 +0000
-+++ pvs4.2-sbcl/pvs-sbcl.spec 2009-03-24 18:56:17.000000000 +0000
-@@ -0,0 +1,131 @@
-+Name: pvs-sbcl
-+Version: 4.2
-+Release: 1%{?dist}
-+Summary: The PVS Verification System, SBCL build
-+
-+Group: Applications/Engineering
-+License: GPLv2+
-+URL: http://pvs.csl.sri.com/
-+Source0: http://pvs.csl.sri.com/download-open/pvs-%{version}-source.tgz
-+Source1: http://pvs.csl.sri.com/doc/pvs-prelude.pdf
-+Source2: http://pvs.csl.sri.com/doc/interpretations.pdf
-+Source3: http://pvs.csl.sri.com/papers/csl-97-2/csl-97-2.ps.gz
-+Source4: http://pvs.csl.sri.com/papers/csl-93-9/csl-93-9.ps.gz
-+Patch0: pvs-4.2-sbcl.patch
-+Patch1: pvs-4.2-unused.patch
-+Patch2: pvs-4.2-64bit.patch
-+Patch3: pvs-4.2-mona.patch
-+Patch4: pvs-4.2-config.patch
-+Patch5: pvs-4.2-typo.patch
-+Patch6: pvs-4.2-emacs.patch
-+Patch7: pvs-4.2-latex.patch
-+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-+
-+BuildRequires: sbcl, texinfo-tex, texlive-latex, emacs-el, xemacs-devel
-+Requires: sbcl, texlive-latex
-+Provides: pvs = %{version}-%{release}, pvsio = %{version}-%{release}
-+
-+%description
-+PVS is a verification system: that is, a specification language integrated
-+with support tools and a theorem prover. It is intended to capture the
-+state-of-the-art in mechanized formal methods and to be sufficiently rugged
-+that it can be used for significant applications. PVS is a research
-+prototype: it evolves and improves as we develop or apply new capabilities,
-+and as the stress of real use exposes new requirements.
-+
-+%prep
-+%setup -q -c
-+cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
-+
-+# Enable support for building PVS with sbcl
-+%patch0 -p1
-+
-+# Get rid of an unused variable warning
-+%patch1 -p1
-+
-+# Enable building on 64-bit platforms
-+%patch2 -p1
-+
-+# Enable use of a system-installed Mona
-+%patch3 -p1
-+
-+# Update config.sub and config.guess so they'll recognize amd64- systems
-+%patch4 -p1
-+
-+# Fix a few typographical errors that result in miscompilations
-+%patch5 -p1
-+
-+# Modernize the Emacs interface
-+%patch6 -p1
-+
-+# Use the fancyhdr package instead of the obsolete fancyheadings package.
-+# Also don't try to make Emacs kill an already dead process.
-+%patch7 -p1
-+
-+%build
-+./configure CFLAGS="$RPM_OPT_FLAGS -fPIC"
-+make SBCLISP_HOME=/usr PVSPATH=`pwd`/
-+
-+# Now that we're done building, we don't want the devel version
-+rm -fr bin/*/devel
-+
-+# We also don't want the useless copy of the sbcl binary
-+rm -f bin/*/runtime/sbcl
-+
-+# Run it once to force Lisp compilation of the native interfaces
-+bin/relocate > /dev/null
-+echo -e '(sb-ext:quit :recklessly-p t)' | ./pvs -raw
-+
-+# Get rid of some emacs save files and CVS control files
-+find . -name .cvsignore -o -name \*~ | xargs rm -f
-+
-+# Get rid of some temporary files we no longer need
-+rm -f doc/release-notes/pvs-release-notes.{pg,ky,tp,fn,cp,vr}
-+
-+# Build the documentation
-+make -C doc/language
-+mv doc/language/language.pdf pvs-language-reference.pdf
-+
-+make -C doc/prover
-+mv doc/prover/prover.pdf pvs-prover-guide.pdf
-+
-+rm -f doc/release-notes/pvs-release-notes.pdf
-+make -C doc/release-notes pvs-release-notes.pdf
-+
-+make -C doc/user-guide
-+mv doc/user-guide/user-guide.pdf pvs-system-guide.pdf
-+
-+# Mimic the effects of the relocate script for the installed location
-+sed -i -e "s,^PVSPATH=.*$,PVSPATH=%{_datadir}/pvs," pvs
-+sed -i -e "s,^PVSPATH=.*$,PVSPATH=%{_datadir}/pvs," pvsio
-+
-+%install
-+rm -rf $RPM_BUILD_ROOT
-+mkdir -p $RPM_BUILD_ROOT%{_bindir}
-+mkdir -p $RPM_BUILD_ROOT%{_datadir}/pvs/doc/release-notes
-+mkdir -p $RPM_BUILD_ROOT%{_datadir}/texmf/tex/latex/pvs
-+cp -a bin emacs lib pvs-tex.sub wish $RPM_BUILD_ROOT%{_datadir}/pvs
-+cp -a doc/release-notes/pvs-release-notes.info $RPM_BUILD_ROOT%{_datadir}/pvs/doc/release-notes
-+cp -a pvs.sty $RPM_BUILD_ROOT%{_datadir}/texmf/tex/latex/pvs
-+cp -a pvs pvsio $RPM_BUILD_ROOT%{_bindir}
-+
-+# We don't need the relocate script
-+rm -f $RPM_BUILD_ROOT%{_datadir}/pvs/bin/relocate
-+
-+%clean
-+rm -rf $RPM_BUILD_ROOT
-+
-+%post -p /usr/bin/mktexlsr
-+
-+%postun -p /usr/bin/mktexlsr
-+
-+%files
-+%defattr(-,root,root,-)
-+%doc *.pdf *.ps.gz LICENSE NOTICES README doc/PVSio-2.d.pdf Examples
-+%{_bindir}/pvs*
-+%{_datadir}/pvs
-+%{_datadir}/texmf/tex/latex/pvs
-+
-+%changelog
-+* Fri Jan 23 2009 Jerry James <loganjerry@gmail.com> - 4.2-1
-+- Initial package, based on cmulisp package
-diff -Naur pvs4.2-orig/pvs.system pvs4.2-sbcl/pvs.system
---- pvs4.2-orig/pvs.system 2007-09-20 05:19:31.000000000 +0000
-+++ pvs4.2-sbcl/pvs.system 2009-03-24 18:56:17.000000000 +0000
-@@ -25,6 +25,16 @@
- ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- ;; --------------------------------------------------------------------
-
-+(in-package :common-lisp)
-+
-+(#-(or cmu sbcl) progn
-+ #+cmu ext:without-package-locks
-+ #+sbcl sb-ext:without-package-locks
-+ (defmacro defconstant-if-unbound (name value &optional doc)
-+ `(defconstant ,name (if (boundp ',name) (symbol-value ',name) ,value)
-+ ,@(when doc (list doc))))
-+ (export 'defconstant-if-unbound))
-+
- (in-package :cl-user)
-
- #+allegro
-@@ -46,9 +56,11 @@
- #+sbcl
- (defun startup-pvs ()
- (in-package :pvs)
-- ;; Can't directly call (pvs::pvs-init)
-- (apply (find-symbol (string :pvs-init) :pvs) nil)
-- )
-+ ;; Turn off compiler warnings
-+ (handler-bind ((sb-ext:compiler-note #'muffle-warning))
-+ ;; Can't directly call (pvs::pvs-init)
-+ (apply (find-symbol (string :pvs-init) :pvs) nil)
-+ (sb-impl::toplevel-init)))
-
- #+allegro
- (eval-when (eval load)
-@@ -59,12 +71,17 @@
- excl:*enclose-printer-errors* nil
- *print-pretty* t))
-
-+#+sbcl
-+(eval-when (eval load)
-+ (setq *compile-verbose* nil)
-+ (setq *compile-print* nil))
-+
- (eval-when (eval load)
- ;; This sets *pvs-path* and sets *pvs-binary-type*
- (load "pvs-config.lisp")
- #+allegro (chdir *pvs-path*))
-
--(defpackage :ilisp)
-+(defpackage :ilisp (:nicknames :ILISP) (:use :common-lisp #+:CMU :conditions))
- (defpackage :bvec)
-
- (unless (find-package :make)
-@@ -181,7 +198,11 @@
- (load (format nil "~a/src/xp" *pvs-path*))
- #+gcl
- (load (format nil "~a/src/xp-code" *pvs-path*))
-- (apply (find-symbol :install :xp) :package :pvs nil))
-+ #-sbcl
-+ (apply (find-symbol :install :xp) :package :pvs nil)
-+ #+sbcl
-+ (apply (find-symbol "INSTALL" (find-package :xp))
-+ :package :pvs nil))
- #-(or cmu sbcl)
- (load (format nil "~a/ess/dist-ess.lisp" *pvs-path*))
- #-gcl
-@@ -215,6 +236,7 @@
- (let* ((platform #+(and sun4 sunos4) "sun4-SunOS4"
- #+(and sun4 (not sunos4)) "sun4-SunOS5"
- #+(and x86 (not macosx)) "ix86-Linux"
-+ #+(and x86-64 (not macosx)) "ix86_64-Linux"
- #+(and macosx powerpc) "powerpc-MacOSX"
- #+(and macosx x86) "ix86-MacOSX")
- (utilpath (concatenate 'string
-@@ -281,7 +303,9 @@
- :components ((:file "hashfn")
- #+allegro
- (:file "file-utils")
-- #+(or cmu sbcl)
-+ #+sbcl
-+ (:file "file-utils-sbcl")
-+ #+cmu
- (:file "file-utils-cmu")))
- (:module language
- :source-pathname "src/"
-diff -Naur pvs4.2-orig/src/abstraction/abstract.lisp pvs4.2-sbcl/src/abstraction/abstract.lisp
---- pvs4.2-orig/src/abstraction/abstract.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/abstraction/abstract.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -27,7 +27,7 @@
- ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- ;; --------------------------------------------------------------------
-
--(in-package 'pvs)
-+(in-package :pvs)
-
-
- (defvar *abs-cache+* nil)
-diff -Naur pvs4.2-orig/src/classes-decl.lisp pvs4.2-sbcl/src/classes-decl.lisp
---- pvs4.2-orig/src/classes-decl.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/classes-decl.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -141,7 +141,7 @@
- type-name type-name? type-value types update-expr using-hash
- var-decl visible?))
- #+(or cmu sbcl)
--(ext:without-package-locks
-+(#-sbcl ext:without-package-locks #+sbcl sb-ext:without-package-locks
- (defgeneric class (x))
- (defgeneric (setf class) (x y))
- (defgeneric keyword (x))
-@@ -338,6 +338,9 @@
- ;;; unparser. The type is set by the typechecker to the canonical value
- ;;; of the declared-type.
-
-+(
-+ #-sbcl progn
-+ #+sbcl sb-ext:without-package-locks
- (defcl declaration (syntax)
- (newline-comment :restore-as nil)
- (id :type (or symbol number) :parse t :restore-as nil)
-@@ -353,6 +356,7 @@
- (semi :parse t :restore-as nil)
- (tcc-form :fetch-as nil :ignore t)
- (typecheck-time :restore-as nil))
-+)
-
- ;;; declared-type-string keeps the string of the declared type for
- ;;; creating the pvs context - see create-declaration-entry
-diff -Naur pvs4.2-orig/src/classes-expr.lisp pvs4.2-sbcl/src/classes-expr.lisp
---- pvs4.2-orig/src/classes-expr.lisp 2007-10-11 00:11:41.000000000 +0000
-+++ pvs4.2-sbcl/src/classes-expr.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -35,7 +35,7 @@
- propositional-application))
-
- #+(or cmu sbcl)
--(ext:without-package-locks
-+(#-sbcl ext:without-package-locks #+sbcl sb-ext:without-package-locks
- (defgeneric type (x))
- (defgeneric (setf type) (x y))
- (defgeneric number (x))
-@@ -45,7 +45,7 @@
-
- #+(or cmu sbcl)
- ;; This is actually defined in utils, but convenient to add here
--(ext:without-package-locks
-+(#-sbcl ext:without-package-locks #+sbcl sb-ext:without-package-locks
- (defgeneric condition (x)))
-
- ;;; Provide a class on which to hang syntactic information
-@@ -172,8 +172,13 @@
- ;; When an extraction-expr is used as a conversion
- (defcl extraction-conversion (extraction-application))
-
-+#-sbcl
- (defcl number-expr (expr)
- (number :type integer :parse t :restore-as nil))
-+#+sbcl
-+(sb-ext:without-package-locks
-+ (defcl number-expr (expr)
-+ (number :type integer :parse t :restore-as nil)))
-
- ;; This is for integers of the form xxx.000, where the fractional part is
- ;; all zeros. We keep it as a number expr, but store the number of zeros so
-@@ -529,10 +534,17 @@
- ;;; resolution. The inclusions are the predicates which will become
- ;;; TCCs if that particular resolution is chosen.
-
-+#-sbcl
- (defcl resolution ()
- (declaration :restore-as nil)
- module-instance
- type)
-+#+sbcl
-+(sb-ext:without-package-locks
-+ (defcl resolution ()
-+ (declaration :restore-as nil)
-+ module-instance
-+ type))
-
- ;(defcl judgement-resolution (resolution)
- ; judgement-type
-diff -Naur pvs4.2-orig/src/context.lisp pvs4.2-sbcl/src/context.lisp
---- pvs4.2-orig/src/context.lisp 2008-05-11 20:34:50.000000000 +0000
-+++ pvs4.2-sbcl/src/context.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -402,8 +402,9 @@
- subdir))
- (multiple-value-bind (result err)
- (ignore-lisp-errors #+allegro (excl:make-directory subdir)
-- #+(or cmu sbcl)
-- (unix:unix-mkdir (namestring subdir) #o777))
-+ #+cmu (unix:unix-mkdir (namestring subdir) #o777)
-+ #+sbcl
-+ (sb-unix:unix-mkdir (namestring subdir) #o777))
- (cond (result (pvs-message "Created directory ~a" subdir)
- t)
- (t (pvs-message "Error creating ~a: ~a" subdir err)
-@@ -534,7 +535,7 @@
-
- #+(or cmu sbcl)
- (defun md5-file (file)
-- (let ((digest (md5:md5sum-file file))
-+ (let ((digest (#+cmu md5:md5sum-file #+sbcl sb-md5:md5sum-file file))
- (sum 0))
- (loop for x across digest
- do (setq sum (+ (* sum 256) x)))
-diff -Naur pvs4.2-orig/src/datatype.lisp pvs4.2-sbcl/src/datatype.lisp
---- pvs4.2-orig/src/datatype.lisp 2008-05-11 20:36:59.000000000 +0000
-+++ pvs4.2-sbcl/src/datatype.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -203,7 +203,8 @@
- (checksum-ok? (and adt-ce
- file-exists?
- (equal #+allegro (excl:md5-file adt-path)
-- #-allegro (md5:md5sum-file adt-path)
-+ #+sbcl (sb-md5:md5sum-file adt-path)
-+ #-(or allegro sbcl) (md5:md5sum-file adt-path)
- (ce-md5sum adt-ce)))))
- (unless (and file-exists?
- ce
-diff -Naur pvs4.2-orig/src/defcl.lisp pvs4.2-sbcl/src/defcl.lisp
---- pvs4.2-orig/src/defcl.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/defcl.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -51,11 +51,13 @@
- (defmacro defcl (name classes &rest args)
- (setf args (mapcar #'(lambda (a) (if (consp a) a (list a))) args))
- `(progn ,@(mapcar #'(lambda (a)
-- #+allegro `(declaim (ftype (function
-+ #+(or allegro sbcl)
-+ `(declaim (ftype (function
- (t)
- ,(cadr (member :type a)))
- ,(car a)))
-- #-allegro `(proclaim '(function ,(car a) (t)
-+ #-(or allegro sbcl)
-+ `(proclaim '(function ,(car a) (t)
- ,(cadr (member :type a)))))
- (remove-if-not #'(lambda (a) (member :type a))
- args))
-diff -Naur pvs4.2-orig/src/defsystem.lisp pvs4.2-sbcl/src/defsystem.lisp
---- pvs4.2-orig/src/defsystem.lisp 2007-07-06 19:08:53.000000000 +0000
-+++ pvs4.2-sbcl/src/defsystem.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -4796,7 +4796,7 @@
- :loader #+:lucid #'load-foreign-files
- #+:allegro #'load
- #+(or :cmu :scl) #'alien:load-foreign
-- #+:sbcl #'sb-alien:load-foreign
-+ #+:sbcl #'sb-alien:load-shared-object
- #+(and :lispworks :unix (not :linux) (not :macosx)) #'link-load:read-foreign-modules
- #+(and :lispworks :unix (or :linux :macosx)) #'fli:register-module
- #+(and :lispworks :win32) #'fli:register-module
-diff -Naur pvs4.2-orig/src/globals.lisp pvs4.2-sbcl/src/globals.lisp
---- pvs4.2-orig/src/globals.lisp 2008-07-17 18:12:19.000000000 +0000
-+++ pvs4.2-sbcl/src/globals.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -346,7 +346,9 @@
- (pprint-indent :block 0)
- (loop (pprint-exit-if-list-exhausted)
- (write (pprint-pop) :stream stream :escape nil :pretty nil
-- :pprint-dispatch nil)
-+ :pprint-dispatch #-sbcl nil
-+ #+sbcl (sb-pretty::make-pprint-dispatch-table)
-+ )
- (pprint-exit-if-list-exhausted)
- (pprint-newline :mandatory stream)))))
-
-@@ -385,6 +387,7 @@
-
- (defvar *use-default-dp?* nil)
- (defvar *prover-print-lines* nil)
-+#-sbcl
- (defvar *print-lines* nil)
-
- (defvar *substit-dont-simplify* nil)
-diff -Naur pvs4.2-orig/src/groundeval/eval-utils.lisp pvs4.2-sbcl/src/groundeval/eval-utils.lisp
---- pvs4.2-orig/src/groundeval/eval-utils.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/groundeval/eval-utils.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -68,14 +68,14 @@
- (defmethod print-object ((obj eval-info) stream)
- (if *debugging-print-object*
- (call-next-method)
-- (format stream "~@<#<eval-info ~2I~_~:0Iinternal: ~W~:@_external: ~W>~:>"
-+ (format stream "~@<#<eval-info ~2I~_~0:Iinternal: ~W~:@_external: ~W>~:>"
- (internal obj) (external obj))))
-
- (defmethod print-object ((obj eval-defn-info) stream)
- (if *debugging-print-object*
- (call-next-method)
- (format stream
-- "~@<#<eval-defn-info ~2I~_~:0Iunary: ~W~:@_multiary: ~W~:@_destructive: ~W>~:>"
-+ "~@<#<eval-defn-info ~2I~_~0:Iunary: ~W~:@_multiary: ~W~:@_destructive: ~W>~:>"
- (unary obj) (multiary obj) (destructive obj))))
-
- (defmethod print-object ((obj eval-defn) stream)
-diff -Naur pvs4.2-orig/src/groundeval/ground-expr.lisp pvs4.2-sbcl/src/groundeval/ground-expr.lisp
---- pvs4.2-orig/src/groundeval/ground-expr.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/groundeval/ground-expr.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -29,7 +29,7 @@
- ; -- no free variables
- ;
-
--(in-package 'pvs)
-+(in-package :pvs)
-
- (defun ground-expr? (expr)
- (assert (type expr))
-diff -Naur pvs4.2-orig/src/groundeval/pvs2clean.lisp pvs4.2-sbcl/src/groundeval/pvs2clean.lisp
---- pvs4.2-orig/src/groundeval/pvs2clean.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/groundeval/pvs2clean.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -138,7 +138,7 @@
-
- (defmethod pvs2clean* ((expr projection-application) bindings livevars)
- (let* ((ll (length (exprs expr)))
-- (dummy (gentemp 'ddd))
-+ (dummy (gentemp "DDD"))
- (match-list (pvs2clean_tuple (matchlist (index expr) ll dummy)))
- (expr-list (pvs2clean* expr bindings livevars)))
- `(let ,match-list = ,expr-list in ,dummy)))
-@@ -177,7 +177,7 @@
- (updateable-free-formal-vars operator)
- livevars))))
- (if (clean-updateable? (type operator))
-- (format nil "(pvsSelect ~a ~a)"
-+ (format nil "(pvsSelect ~a ~a ~a)"
- clean-op clean-arg
- (mk-clean-funcall clean-op
- (list clean-arg))))))))
-@@ -375,6 +375,7 @@
- livevars))))))
- (if else-part
- (format nil "~a ~% _ -> ~a"
-+ selections-clean
- (pvs2clean* (expression else-part) bindings livevars))
- selections-clean)))
-
-diff -Naur pvs4.2-orig/src/groundeval/pvseval-update.lisp pvs4.2-sbcl/src/groundeval/pvseval-update.lisp
---- pvs4.2-orig/src/groundeval/pvseval-update.lisp 2007-12-01 23:04:01.000000000 +0000
-+++ pvs4.2-sbcl/src/groundeval/pvseval-update.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -47,7 +47,7 @@
- (if (special-variable-p id)
- (let ((lid (gethash id *lisp-id-hash*)))
- (or lid
-- (let ((new-lid (intern (gensym (string id)))))
-+ (let ((new-lid (intern (symbol-name (gensym (string id))))))
- (setf (gethash id *lisp-id-hash*) new-lid)
- new-lid)))
- id))
-@@ -1779,7 +1779,7 @@
- :if-exists
- (if supersede? :supersede :append)
- :if-does-not-exist :create)
-- (when supersede? (format output "(in-package 'PVS)~%"))
-+ (when supersede? (format output "(in-package :pvs)~%"))
- (print-lisp-defns-to-output (get-theory theory) output))
- (print-lisp-defns-to-output (get-theory theory) nil)))
-
-diff -Naur pvs4.2-orig/src/groundeval/static-update.lisp pvs4.2-sbcl/src/groundeval/static-update.lisp
---- pvs4.2-orig/src/groundeval/static-update.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/groundeval/static-update.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -42,7 +42,7 @@
- ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- ;; --------------------------------------------------------------------
-
--(in-package 'pvs)
-+(in-package :pvs)
-
- (defmethod updateable? ((texpr tupletype))
- (updateable? (types texpr)))
-diff -Naur pvs4.2-orig/src/ground-prover/prglobals.lisp pvs4.2-sbcl/src/ground-prover/prglobals.lisp
---- pvs4.2-orig/src/ground-prover/prglobals.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/ground-prover/prglobals.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -46,7 +46,7 @@
- (defconstant true 'true )
- (defconstant false 'false )
-
--(defconstant primtypealist
-+(defconstant-if-unbound primtypealist
- '((true . bool)
- (false . bool)
- (and . bool)
-@@ -139,16 +139,16 @@
-
- ;;; the following special declarations are rather offensive:
-
--(proclaim '(special const sum u s eq lit var coef product ineqpot ))
-+(proclaim '(special const sum u s #-sbcl eq lit var coef product ineqpot ))
-
-
- ;;; the following (til end-of-file) are taken from prpp:
-
--(defconstant *infixlist* ;temporary list of infixes
-+(defconstant-if-unbound *infixlist* ;temporary list of infixes
- '(equal nequal lessp greaterp lesseq lesseqp greatereq greatereqp
- PLUS MINUS TIMES DIVIDE DIFFERENCE) )
-
--(defconstant precedence-alist
-+(defconstant-if-unbound precedence-alist
- '((iff 1)
- (implies 2)
- (or 3)
-diff -Naur pvs4.2-orig/src/ground-prover/prmacros.lisp pvs4.2-sbcl/src/ground-prover/prmacros.lisp
---- pvs4.2-orig/src/ground-prover/prmacros.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/ground-prover/prmacros.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -55,21 +55,21 @@
- (defun prerr (&rest args)
- (apply #'error args))
-
--(defconstant *truecons* '(true))
-+(defconstant-if-unbound *truecons* '(true))
-
--(defconstant *eqarithrels* '(greatereqp lesseqp))
-+(defconstant-if-unbound *eqarithrels* '(greatereqp lesseqp))
-
- (defconstant *ifops* nil ;;'(if if*)
- )
-
--(defconstant *boolconstants* '(false true))
-+(defconstant-if-unbound *boolconstants* '(false true))
-
--(defconstant *arithrels* '(lessp lesseqp greaterp greatereqp))
-+(defconstant-if-unbound *arithrels* '(lessp lesseqp greaterp greatereqp))
-
--(defconstant *arithops* '(PLUS TIMES DIFFERENCE MINUS))
-+(defconstant-if-unbound *arithops* '(PLUS TIMES DIFFERENCE MINUS))
-
--(defconstant *boolops* '(and or implies not ;;if
-- iff))
-+(defconstant-if-unbound *boolops* '(and or implies not ;;if
-+ iff))
-
- (defmacro singleton? (obj)
- `(and (consp ,obj) (null (cdr ,obj))))
-diff -Naur pvs4.2-orig/src/ground-prover/process.lisp pvs4.2-sbcl/src/ground-prover/process.lisp
---- pvs4.2-orig/src/ground-prover/process.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/ground-prover/process.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -729,7 +729,7 @@
- ; (set (setsolve atf))
- (tuple (tupsolve atf))
- (array (arraysolve atf))
-- (t (error "No solver for type " (prtype (arg1 atf))))
-+ (t (error "No solver for type ~a" (prtype (arg1 atf))))
- )))))
-
- ; ------------------------------------------------------------------
-@@ -808,7 +808,7 @@
- ; (set (setnsolve atf))
- (tuple (tupnsolve atf))
- (array (arraynsolve atf))
-- (t (error "No nsolve for type "
-+ (t (error "No nsolve for type ~a"
- (or (prtype (arg1 atf)) (prtype (arg2 atf))) ))
- )))))
-
-diff -Naur pvs4.2-orig/src/interface/pvs-emacs.lisp pvs4.2-sbcl/src/interface/pvs-emacs.lisp
---- pvs4.2-orig/src/interface/pvs-emacs.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/interface/pvs-emacs.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -66,11 +66,15 @@
- *noninteractive-timeout*
- ,(not (and (listp form)
- (memq (car form) *prover-invoking-commands*))))
-- #-(or multiprocessing mp) nil
-+ #-(or multiprocessing mp sbcl) nil
- #+(or multiprocessing mp)
- (mp:with-timeout (*noninteractive-timeout*
- (format t "Timed out!"))
- ,form)
-+ #+sbcl
-+ (sb-ext:with-timeout *noninteractive-timeout*
-+ (handler-case ,form
-+ (sb-ext:timeout () (format t "Timed out!"))))
- ,form))
- (string (error)
- (with-output-to-string (string)
-@@ -94,7 +98,7 @@
- ;;; This replaces ilisp-restore in pvs-init
- (defun pvs-ilisp-restore ()
- "Restore the old result history."
-- (declare (special / // + ++ * **))
-+ #-sbcl (declare (special / // + ++ * **))
- (setq // (pop *old-result*)
- ** (first //)
- / (pop *old-result*)
-@@ -105,7 +109,7 @@
- nil)
-
- (defun pvs-ilisp-save ()
-- (declare (special / // /// + ++ +++))
-+ #-sbcl (declare (special / // /// + ++ +++))
- (unless *old-result*
- (setq *old-result* (list /// // +++ ++))))
-
-@@ -546,7 +550,8 @@
- (t (cons (char string pos) result))))
- (coerce (nreverse result) 'string)))
-
--(#+(or cmu sbcl) ext:without-package-locks
-+(#+cmu ext:without-package-locks
-+ #+sbcl sb-ext:without-package-locks
- #-(or cmu sbcl) progn
- (defun parse-error (obj message &rest args)
- ;;(assert (or *in-checker* *current-file*))
-@@ -606,7 +611,8 @@
- (defvar *type-error-argument* nil)
- (defvar *skip-all-conversion-checks* nil)
-
--(#+(or cmu sbcl) ext:without-package-locks
-+(#+cmu ext:without-package-locks
-+ #+sbcl sb-ext:without-package-locks
- #-(or cmu sbcl) progn
- (defun type-error (obj message &rest args)
- (let ((errmsg (type-error-for-conversion obj message args)))
-diff -Naur pvs4.2-orig/src/linked-hash-table.lisp pvs4.2-sbcl/src/linked-hash-table.lisp
---- pvs4.2-orig/src/linked-hash-table.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/linked-hash-table.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -51,7 +51,7 @@
- (if (memq test '(eq eql equal equalp))
- (make-hash-table :test test :size size :rehash-size rehash-size
- :rehash-threshold rehash-threshold
-- :weak-p weak-keys)
-+ #-sbcl :weak-p #+sbcl :weakness weak-keys)
- (make-pvs-hash-table
- :strong-eq? (eq test 'strong-tc-eq)
- :weak-p weak-keys
-@@ -77,6 +77,8 @@
- :weak-keys (excl:hash-table-weak-keys ht))
- #-allegro
- (let* ((test (hash-table-test ht))
-+ (weakp #+sbcl (sb-ext:hash-table-weakness ht)
-+ #-sbcl (lisp::hash-table-weak-p ht))
- (newht
- (if (memq test '(eq eql equal equalp))
- (make-hash-table
-@@ -84,13 +86,14 @@
- :size size
- :rehash-size rehash-size
- :rehash-threshold rehash-threshold
-- :weak-p (lisp::hash-table-weak-p ht))
-+ #-sbcl :weak-p #+sbcl :weakness weakp)
- (make-pvs-hash-table :strong-eq? (eq test 'strong-tc-eq)
-- :weak-keys? (lisp::hash-table-weak-p ht)
-+ :weak-keys? weakp
- :size size
- :rehash-size rehash-size
- :rehash-threshold rehash-threshold
-- :table (lisp::hash-table-table ht)))))
-+ :table #-sbcl (lisp::hash-table-table ht)
-+ #+sbcl (sb-impl::hash-table-table ht)))))
- (declare (inline maphash))
- (maphash #'(lambda (x y) (setf (gethash x newht) y))
- ht)
-diff -Naur pvs4.2-orig/src/make-pvs-methods.lisp pvs4.2-sbcl/src/make-pvs-methods.lisp
---- pvs4.2-orig/src/make-pvs-methods.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/make-pvs-methods.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -33,8 +33,11 @@
- ;; This sets *pvs-path* and sets *pvs-binary-type*
- (load "pvs-config.lisp"))
-
--(defpackage pvs (:use #+lucid :lucid-common-lisp :lisp
-- #-(or gcl cmu sbcl) :clos #+(or gcl cmu sbcl) :pcl))
-+(defpackage pvs (:use #+lucid :lucid-common-lisp #-sbcl :lisp #+sbcl :cl
-+ #-(or gcl cmu sbcl) :clos #+(or gcl cmu) :pcl
-+ #+sbcl :sb-pcl)
-+ #+sbcl (:shadowing-import-from :sb-int memq)
-+ #+sbcl (:export memq))
-
- (in-package :pvs)
- (import '(cl-user:*pvs-path*))
-diff -Naur pvs4.2-orig/src/metering.lisp pvs4.2-sbcl/src/metering.lisp
---- pvs4.2-orig/src/metering.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/metering.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -288,7 +288,7 @@
- ;;; to seconds.
-
- (progn
-- #-(or cmu allegro)
-+ #-(or sbcl cmu allegro)
- (eval-when (compile eval)
- (warn
- "You may want to supply implementation-specific get-time functions."))
-@@ -302,6 +302,12 @@
- ;;; The get-cons macro is called to find the total number of bytes
- ;;; consed since the beginning of time.
-
-+#+sbcl
-+(defmacro get-cons ()
-+ "The get-cons macro is called to find the total number of bytes
-+ consed since the beginning of time."
-+ '(sb-ext:get-bytes-consed))
-+
- #+:cmu
- (defmacro get-cons ()
- "The get-cons macro is called to find the total number of bytes
-@@ -312,7 +318,7 @@
- #+:lcl3.0
- (defmacro get-cons () `(gc-size))
-
--#-(or :cmu :lcl3.0)
-+#-(or sbcl :cmu :lcl3.0)
- (progn
- (eval-when (compile eval)
- (warn "No consing will be reported unless a get-cons function is ~
-@@ -326,6 +332,12 @@
- ;;; arguments. The function Required-Arguments returns two values: the first
- ;;; is the number of required arguments, and the second is T iff there are any
- ;;; non-required arguments (e.g. &optional, &rest, &key).
-+#+sbcl
-+(defun required-arguments (name)
-+ (multiple-value-bind (min max)
-+ (sb-kernel:fun-type-nargs (sb-kernel:ctype-of (symbol-function name)))
-+ (values (or min 0) (or (null max) (> max min)))))
-+
- #+cmu
- (progn
- #-new-compiler
-@@ -387,7 +399,7 @@
-
-
-
--#-(or :cmu :lcl3.0 (and :allegro (not :coral)))
-+#-(or sbcl :cmu :lcl3.0 (and :allegro (not :coral)))
- (progn
- (eval-when (compile eval)
- (warn
-diff -Naur pvs4.2-orig/src/pp-html.lisp pvs4.2-sbcl/src/pp-html.lisp
---- pvs4.2-orig/src/pp-html.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/pp-html.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -611,7 +611,8 @@
- (when (eq ans :auto)
- (setq *force-dirs* t)))))
- #+allegro (excl:make-directory dir)
-- #+(or cmu sbcl) (unix:unix-mkdir dir #o777)
-+ #+cmu (unix:unix-mkdir dir #o777)
-+ #+sbcl (sb-unix:unix-mkdir dir #o777)
- (pvs-message "Directory ~a created" dir))
- (t (html-pvs-error "Directory ~a not created" dir))))))
-
-diff -Naur pvs4.2-orig/src/prover/checker-macros.lisp pvs4.2-sbcl/src/prover/checker-macros.lisp
---- pvs4.2-orig/src/prover/checker-macros.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/prover/checker-macros.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -55,7 +55,7 @@
- (defvar *printproofstate* nil)
- (defvar *in-checker* nil)
- (defvar *in-apply* nil)
--(defvar *please-interrupt* nil)
-+(defvar *please-interrupt* #-sbcl nil #+sbcl t)
- (defvar *assert-bindings* nil)
- (defvar *modsubst* nil)
- (defvar *proving-tcc* nil)
-@@ -143,9 +143,11 @@
- (defvar *module-context*)
- ;;(defvar *current-theory*)
- (defvar *ps* nil)
--(defvar * '*)
--(defvar + '+)
--(defvar - '-)
-+(#+sbcl sb-ext:without-package-locks
-+ #-sbcl progn
-+ (defvar * '*)
-+ (defvar + '+)
-+ (defvar - '-))
- (defvar *macro-names* nil)
- (defvar *subst-type-hash* ;;used in assert-sformnums
- ;;(make-pvs-hash-table)
-@@ -177,14 +179,22 @@
- (defmacro with-interrupts-deferred (&body form)
- `(let ((excl::*without-interrupts* t)) ,@form))
-
--#+(or cmu sbcl)
-+#+cmu
- (defmacro with-interrupts-allowed (&body form)
- `(system:with-interrupts ,@form))
-
--#+(or cmu sbcl)
-+#+cmu
- (defmacro with-interrupts-deferred (&body form)
- `(system:without-interrupts ,@form))
-
-+#+sbcl
-+(defmacro with-interrupts-allowed (&body form)
-+ `(sb-sys:with-interrupts ,@form))
-+
-+#+sbcl
-+(defmacro with-interrupts-deferred (&body form)
-+ `(sb-sys:without-interrupts ,@form))
-+
-
-
- ;;; KCL does not really have the equivalent to the following - punt for now.
-diff -Naur pvs4.2-orig/src/prover/eproofcheck.lisp pvs4.2-sbcl/src/prover/eproofcheck.lisp
---- pvs4.2-orig/src/prover/eproofcheck.lisp 2008-01-14 11:12:56.000000000 +0000
-+++ pvs4.2-sbcl/src/prover/eproofcheck.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -210,9 +210,15 @@
- (and *noninteractive*
- *noninteractive-timeout*))
- (let ((timeout (or *proof-timeout* *noninteractive-timeout*)))
-+ #-sbcl
- (mp:with-timeout (timeout (pvs-message "Interrupted: ~a sec timeout"
- timeout))
-- (call-next-method)))
-+ (call-next-method))
-+ #+sbcl
-+ (sb-ext:with-timeout timeout
-+ (handler-case (call-next-method)
-+ (sb-ext:timeout ()
-+ (pvs-message "Interrupted: ~a sec timeout" timeout)))))
- (call-next-method)))
-
- (defmethod prove-decl ((decl formula-decl) &key strategy context)
-@@ -3446,7 +3452,7 @@
- (values 'X nil nil))
- ((and (or (digit-char-p (char strlbl 0))
- (char= (char strlbl 0) #\-))
-- (every #'digit-char-p (subseq strlbl) 1))
-+ (every #'digit-char-p (subseq strlbl 1)))
- (error-format-if
- "~%Label cannot be an integer"))
- (t
-diff -Naur pvs4.2-orig/src/prover/rules.lisp pvs4.2-sbcl/src/prover/rules.lisp
---- pvs4.2-orig/src/prover/rules.lisp 2008-01-16 04:53:29.000000000 +0000
-+++ pvs4.2-sbcl/src/prover/rules.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -334,9 +334,15 @@
- (init-time (get-internal-run-time))
- (result (let ((*in-apply* ps))
- (if timeout
-+ #-sbcl
- (mp:with-timeout (timeout nil)
- (prove* newps)
- newps)
-+ #+sbcl
-+ (sb-ext:with-timeout timeout
-+ (handler-case
-+ (progn (prove* newps) newps)
-+ (sb-ext:timeout () nil)))
- (prove* newps))))
- (end-time (/ (- (get-internal-run-time) init-time)
- internal-time-units-per-second)))
-diff -Naur pvs4.2-orig/src/prover/translate-to-yices.lisp pvs4.2-sbcl/src/prover/translate-to-yices.lisp
---- pvs4.2-orig/src/prover/translate-to-yices.lisp 2007-09-07 20:02:37.000000000 +0000
-+++ pvs4.2-sbcl/src/prover/translate-to-yices.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -910,6 +910,13 @@
- :input "//dev//null"
- :output out
- :error-output :output)
-+ #+sbcl
-+ (sb-ext:run-program
-+ (format nil "~a ~a" *yices-call* (namestring file))
-+ nil
-+ :input "//dev//null"
-+ :output out
-+ :error out)
- #+cmu
- (extensions:run-program
- (format nil "~a ~a" *yices-call* (namestring file))
-diff -Naur pvs4.2-orig/src/pvs.lisp pvs4.2-sbcl/src/pvs.lisp
---- pvs4.2-orig/src/pvs.lisp 2008-07-19 20:29:49.000000000 +0000
-+++ pvs4.2-sbcl/src/pvs.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -102,19 +102,21 @@
- (let ((exepath (car (make::split-string
- (environment-variable "LD_LIBRARY_PATH") :item #\:))))
- (pushnew exepath *pvs-directories*)
-- (ext:load-foreign (format nil "~a/mu.~a" exepath
-+ (#+cmu ext:load-foreign #+sbcl sb-alien:load-shared-object
-+ (format nil "~a/mu.~a" exepath
- #+darwin "dylib"
- #-darwin "so"))
-- (ext:load-foreign (format nil "~a/ws1s.~a" exepath
-+ (#+cmu ext:load-foreign #+sbcl sb-alien:load-shared-object
-+ (format nil "~a/ws1s.~a" exepath
- #+darwin "dylib"
- #-darwin "so"))
- ;; Have no idea what is going on here, but if you leave this out,
- ;; bdd-cmu gives a compile error.
-- (fmakunbound 'bdd_cofactor_neg_)
-- (lf "bdd-cmu")
-- (lf "mu-cmu")
-+ #+cmu (fmakunbound 'bdd_cofactor_neg_)
-+ #+cmu (lf "bdd-cmu") #+sbcl (lf "bdd-sbcl")
-+ #+cmu (lf "mu-cmu") #+sbcl (lf "mu-sbcl")
- (bdd_init)
-- (lf "dfa-foreign-cmu"))
-+ #+cmu (lf "dfa-foreign-cmu") #+sbcl (lf "dfa-foreign-sbcl"))
- (setq *started-with-minus-q*
- (or dont-load-user-lisp
- (let ((mq (environment-variable "PVSMINUSQ")))
-diff -Naur pvs4.2-orig/src/restore-theories.lisp pvs4.2-sbcl/src/restore-theories.lisp
---- pvs4.2-orig/src/restore-theories.lisp 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/restore-theories.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -27,7 +27,7 @@
- ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- ;; --------------------------------------------------------------------
-
--(in-package 'pvs)
-+(in-package :pvs)
-
- ;;; Restores the state of the system from information provided in the
- ;;; context. The context has the form
-diff -Naur pvs4.2-orig/src/store-object.lisp pvs4.2-sbcl/src/store-object.lisp
---- pvs4.2-orig/src/store-object.lisp 2007-10-13 21:30:22.000000000 +0000
-+++ pvs4.2-sbcl/src/store-object.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -301,8 +301,8 @@
- (ensure-vector-size *store-object-store* *store-object-store-size* size)
- (with-open-file (f file :direction :input
- :element-type '(unsigned-byte 32))
-- (lisp:read-sequence *store-object-store* f
-- :start 0 :end size))
-+ (cl:read-sequence *store-object-store* f
-+ :start 0 :end size))
- (when reverse-endian
- (dotimes (i size)
- (setf (object-store i)
-diff -Naur pvs4.2-orig/src/tex-support.lisp pvs4.2-sbcl/src/tex-support.lisp
---- pvs4.2-orig/src/tex-support.lisp 2008-03-11 22:53:37.000000000 +0000
-+++ pvs4.2-sbcl/src/tex-support.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -532,7 +532,7 @@
- (when (and *report-mode*
- (loop for sf in neg-s-forms
- thereis (memq sf par-sforms)))
-- (format stream "~% & $\\vdots$ \\\\" *prover-indent*)))
-+ (format stream "~%~VT & $\\vdots$ \\\\" *prover-indent*)))
- (t (format stream "\\strut\\\\")))
- (format stream "\\hline~%")
- (cond (pos-s-forms
-diff -Naur pvs4.2-orig/src/utils/file-utils-sbcl.lisp pvs4.2-sbcl/src/utils/file-utils-sbcl.lisp
---- pvs4.2-orig/src/utils/file-utils-sbcl.lisp 1970-01-01 00:00:00.000000000 +0000
-+++ pvs4.2-sbcl/src/utils/file-utils-sbcl.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -0,0 +1,66 @@
-+;; --------------------------------------------------------------------
-+;; PVS
-+;; Copyright (C) 2008, SRI International. All Rights Reserved.
-+
-+;; This program is free software; you can redistribute it and/or
-+;; modify it under the terms of the GNU General Public License
-+;; as published by the Free Software Foundation; either version 2
-+;; of the License, or (at your option) any later version.
-+
-+;; This program is distributed in the hope that it will be useful,
-+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+;; GNU General Public License for more details.
-+
-+;; You should have received a copy of the GNU General Public License
-+;; along with this program; if not, write to the Free Software
-+;; Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-+;; 02110-1301, USA.
-+;; --------------------------------------------------------------------
-+
-+(in-package :pvs)
-+(require :sb-posix)
-+(export '(file-exists-p directory-p read-permission? write-permission?
-+ file-write-time get-file-info))
-+
-+(defun remove-backslashes (string)
-+ (declare (type string string))
-+ (sb-impl::remove-backslashes string 0 (length string)))
-+
-+(defun file-exists-p (file)
-+ (handler-case
-+ (zerop
-+ (sb-posix:access
-+ (remove-backslashes (namestring (merge-pathnames file)))
-+ sb-posix:f-ok))
-+ (sb-posix:syscall-error () nil)))
-+
-+(defun directory-p (dir)
-+ (handler-case
-+ (let ((filestring (namestring (merge-pathnames dir))))
-+ (when (sb-posix:s-isdir (sb-posix:stat-mode (sb-posix:stat filestring)))
-+ ;; Needs to end with a slash!!!
-+ (pathname (if (char= (char filestring (1- (length filestring))) #\/)
-+ filestring
-+ (concatenate 'string filestring "/")))))
-+ (sb-posix:syscall-error () nil)))
-+
-+(defun read-permission? (file)
-+ (handler-case (zerop (sb-posix:access file sb-posix:r-ok))
-+ (sb-posix:syscall-error () nil)))
-+
-+(defun write-permission? (file)
-+ (handler-case (zerop (sb-posix:access file sb-posix:w-ok))
-+ (sb-posix:syscall-error () nil)))
-+
-+(defconstant u1970 (encode-universal-time 0 0 0 1 1 1970 0))
-+
-+(defun file-write-time (file)
-+ (handler-case (+ u1970 (sb-posix:stat-mtime (sb-posix:stat file)))
-+ (sb-posix:syscall-error () nil)))
-+
-+(defun get-file-info (file)
-+ (handler-case
-+ (let ((stat (sb-posix:stat file)))
-+ (list (sb-posix:stat-dev stat) (sb-posix:stat-ino stat)))
-+ (sb-posix:syscall-error () nil)))
-diff -Naur pvs4.2-orig/src/utils/hashfn.lisp pvs4.2-sbcl/src/utils/hashfn.lisp
---- pvs4.2-orig/src/utils/hashfn.lisp 2007-10-11 00:14:03.000000000 +0000
-+++ pvs4.2-sbcl/src/utils/hashfn.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -56,7 +56,7 @@
- ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- ;; --------------------------------------------------------------------
-
--(in-package 'pvs)
-+(in-package :pvs)
-
- ;(declaim (function pvs-sxhash* (T list) (integer 0 65535)))
-
-@@ -64,7 +64,7 @@
- ;(defun tc-eq (x y &optional bindings)
- ; (tc-eq* x y bindings))
-
--(defconstant pvs-sxhash-byte (byte #+allegro 24 #-allegro 29 0))
-+(defconstant-if-unbound pvs-sxhash-byte (byte #+allegro 24 #-allegro 29 0))
-
- (defconstant pvs-max-hashnum (1- (expt 2 #+allegro 24 #-allegro 29)))
-
-@@ -104,7 +104,7 @@
- (declare (ignore bindings))
- (the positive-fixnum (sxhash x)))
-
--(defconstant nil-sxhash (sxhash nil))
-+(defconstant-if-unbound nil-sxhash (sxhash nil))
-
- (defmethod pvs-sxhash* ((x null) bindings)
- (declare (ignore bindings))
-diff -Naur pvs4.2-orig/src/utils/ix86_64-Linux/Makefile pvs4.2-sbcl/src/utils/ix86_64-Linux/Makefile
---- pvs4.2-orig/src/utils/ix86_64-Linux/Makefile 1970-01-01 00:00:00.000000000 +0000
-+++ pvs4.2-sbcl/src/utils/ix86_64-Linux/Makefile 2009-03-24 18:56:17.000000000 +0000
-@@ -0,0 +1,23 @@
-+LD = gcc
-+LDFLAGS = -shared -L./
-+CC=gcc
-+CFLAGS=-fPIC
-+WFLAGS=-Wall
-+VPATH=..
-+
-+obj=file_utils.o
-+
-+.SUFFIXES:
-+.SUFFIXES: .c .o
-+.c.o : ; $(CC) $(XCFLAGS) ${WFLAGS} ${CFLAGS} -c $< -o $@
-+
-+all : file_utils.so b64
-+
-+file_utils.so: ${obj}
-+ $(LD) ../utils-ld-table $(LDFLAGS) -o file_utils.so ${obj} -lc
-+
-+b64: ../b64.c
-+ $(CC) -o ./b64 ../b64.c
-+
-+clean :
-+ rm -f *.o *.a *.so b64
-diff -Naur pvs4.2-orig/src/utils.lisp pvs4.2-sbcl/src/utils.lisp
---- pvs4.2-orig/src/utils.lisp 2008-07-17 10:35:11.000000000 +0000
-+++ pvs4.2-sbcl/src/utils.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -137,11 +137,12 @@
- (let* ((test (hash-table-test ht))
- (size (hash-table-count ht))
- (weak? #+allegro (excl:hash-table-weak-keys ht)
-- #+(or cmu sbcl) (lisp::hash-table-weak-p ht))
-+ #+cmu (lisp::hash-table-weak-p ht)
-+ #+sbcl (sb-ext:hash-table-weakness ht))
- (new-ht (if (memq test '(eq eql equal equalp))
- (make-hash-table
- :test test :size size
-- #+allegro :weak-keys #+(or cmu sbcl) :weak-p weak?)
-+ #+allegro :weak-keys #+cmu :weak-p #+sbcl :weakness weak?)
- (make-pvs-hash-table :strong-eq? (eq test 'strong-tc-eq)
- :size size
- :weak-keys? weak?))))
-@@ -279,7 +280,8 @@
- #+(and allegro (version>= 6) (not (version>= 7)))
- (excl::variable-special-p obj nil)
- #+(and allegro (not (version>= 6))) (clos::variable-special-p obj nil)
-- #+(or cmu sbcl) (eq (extensions:info variable kind obj) :special)
-+ #+cmu (eq (extensions:info variable kind obj) :special)
-+ #+sbcl (sb-walker:var-globally-special-p obj)
- #+harlequin-common-lisp (system:declared-special-p obj)
- #-(or lucid kcl allegro harlequin-common-lisp cmu sbcl)
- (error "Need to handle special variables for this version of lisp")
-@@ -310,14 +312,22 @@
- (namestring (working-directory))))
- nil)
-
--#+(or gcl cmu sbcl)
-+#+(or gcl cmu)
- (defun working-directory ()
- (pathname (nth-value 1 (unix:unix-current-directory))))
-
--#+(or gcl cmu sbcl)
-+#+(or gcl cmu)
- (defun set-working-directory (dir)
- (unix:unix-chdir (namestring dir)))
-
-+#+sbcl
-+(defun working-directory ()
-+ (make-pathname :directory (sb-posix:getcwd)))
-+
-+#+sbcl
-+(defun set-working-directory (dir)
-+ (sb-posix:chdir dir))
-+
- #+allegro
- (defun working-directory ()
- (excl:current-directory))
-@@ -334,10 +344,14 @@
- (defun environment-variable (string)
- (sys:getenv string))
-
--#+(or cmu sbcl)
-+#+cmu
- (defun environment-variable (string)
- (tools:getenv string))
-
-+#+sbcl
-+(defun environment-variable (string)
-+ (sb-posix:getenv string))
-+
- #+harlequin-common-lisp
- (defun environment-variable (string)
- ;; This didn't work before
-@@ -370,13 +384,20 @@
- :show-cmd nil
- :output-stream (open "/dev/null" :direction :output
- :if-exists :append)))
--#+(or cmu sbcl)
-+#+cmu
- (defun chmod (prot file)
- (extensions:run-program
- "chmod"
- (list prot (namestring file))
- :output nil :error nil :wait nil))
-
-+#+sbcl
-+(defun chmod (prot file)
-+ (sb-ext:run-program
-+ "chmod"
-+ (list prot (namestring file))
-+ :output nil :error nil :wait nil))
-+
- #+gcl
- (defun chmod (prot file)
- (system (format nil "chmod ~a ~a" prot (namestring file))))
-@@ -605,11 +626,12 @@
-
- (defun shortpath (directory)
- (or (gethash directory *shortpath-directories*)
-- (let* ((dirlist (pathname-directory
-+ (let* ((realdir (namestring (truename directory)))
-+ (dirlist (pathname-directory
- (directory-p
-- (#+allegro excl:pathname-resolve-symbolic-links
-- #+(or cmu sbcl) unix:unix-resolve-links
-- (namestring (truename directory))))))
-+ #+allegro (excl:pathname-resolve-symbolic-links realdir)
-+ #+cmu (unix:unix-resolve-links realdir)
-+ #-(or allegro cmu) realdir)))
- (file-info (get-file-info directory))
- (result (if (eq (car dirlist) :absolute)
- (shortpath* (reverse (cdr dirlist)) file-info)
-@@ -2915,10 +2937,14 @@
- (defun direct-superclasses (class)
- (slot-value class 'pcl:class-direct-superclasses))
-
--#+(or cmu sbcl)
-+#+cmu
- (defun direct-superclasses (class)
- (class-direct-superclasses class))
-
-+#+sbcl
-+(defun direct-superclasses (class)
-+ (sb-mop:class-direct-superclasses class))
-+
- (defun types-of (obj)
- (let ((types nil))
- (labels ((tof (type)
-@@ -3225,7 +3251,7 @@
- (when (compiled-function-p #'pvs-gc-after-hook)
- (setf excl:*gc-after-hook* #'pvs-gc-after-hook)))
-
--#+(or cmu sbcl)
-+#+cmu
- (eval-when (load)
- (setf extensions:*gc-verbose* nil))
-
-@@ -4022,7 +4048,8 @@
- (every #'(lambda (slot)
- (let ((name (slot-value slot
- '#+allegro excl::name
-- #+(or cmu sbcl) pcl::name)))
-+ #+cmu pcl::name
-+ #+sbcl sb-pcl::name)))
- (equals (slot-value x name) (slot-value y name))))
- slots)))
-
-@@ -4059,8 +4086,12 @@
- #-(or allegro cmu sbcl)
- (error "Need a hash-table for tc-eq for this lisp"))
-
--#+(or cmu sbcl)
-+#+cmu
- (extensions:define-hash-table-test 'tc-eq-test #'tc-eq #'pvs-sxhash)
--#+(or cmu sbcl)
-+#+cmu
- (extensions:define-hash-table-test 'strong-tc-eq-test
- #'strong-tc-eq #'pvs-sxhash)
-+#+sbcl
-+(sb-int:define-hash-table-test 'tc-eq-test #'tc-eq #'pvs-sxhash)
-+#+sbcl
-+(sb-int:define-hash-table-test 'strong-tc-eq-test #'strong-tc-eq #'pvs-sxhash)
-diff -Naur pvs4.2-orig/src/WS1S/ix86_64-Linux/Makefile pvs4.2-sbcl/src/WS1S/ix86_64-Linux/Makefile
---- pvs4.2-orig/src/WS1S/ix86_64-Linux/Makefile 1970-01-01 00:00:00.000000000 +0000
-+++ pvs4.2-sbcl/src/WS1S/ix86_64-Linux/Makefile 2009-03-24 18:56:40.000000000 +0000
-@@ -0,0 +1,64 @@
-+ifneq (,)
-+This makefile requires GNU Make.
-+endif
-+
-+BDD = ../mona/BDD
-+DFA = ../mona/DFA
-+UTILS = ../mona/Mem
-+INCLUDES = -I$(BDD) -I$(DFA) -I$(UTILS)
-+LD = gcc
-+LDFLAGS = -shared -L./
-+CC = gcc
-+CFLAGS += -fPIC -D_POSIX_SOURCE -DSYSV $(INCLUDES)
-+XCFLAGS = -O
-+SHELL = /bin/sh
-+VPATH = ..:../mona/BDD:../mona/DFA:../mona/Mem
-+
-+obj = analyze.o prefix.o product.o \
-+ quotient.o basic.o external.o \
-+ makebasic.o minimize.o printdfa.o \
-+ project.o dfa.o \
-+ bdd.o bdd_double.o bdd_external.o \
-+ bdd_manager.o hash.o bdd_dump.o \
-+ bdd_trace.o bdd_cache.o \
-+ dlmalloc.o mem.o \
-+ ws1s_extended_interface.o
-+
-+.SUFFIXES:
-+.SUFFIXES: .c .o
-+.c.o : ; $(CC) $(XCFLAGS) ${CFLAGS} -c $< -o $@
-+
-+all : ws1s.so
-+
-+ws1s_extended_interface.o : ../ws1s_extended_interface.c
-+ $(CC) $(XCFLAGS) ${CFLAGS} -c $< -o $@
-+
-+ws1s.so : ${obj}
-+ $(LD) ../ws1s-ld-table $(LDFLAGS) -o ws1s.so ${obj}
-+
-+bdd.o: bdd.c bdd.h bdd_internal.h
-+bdd_double.o: bdd_double.c bdd.h bdd_internal.h
-+bdd_external.o: bdd_external.c bdd_external.h mem.h
-+bdd_manager.o: bdd_manager.c bdd.h bdd_internal.h
-+hash.o: hash.c mem.h hash.h
-+bdd_dump.o: bdd_dump.c bdd_dump.h
-+bdd_trace.o: bdd_trace.c bdd.h bdd_internal.h
-+bdd_cache.o: bdd_cache.c bdd.h bdd_internal.h
-+
-+analyze.o: analyze.c dfa.h mem.h
-+prefix.o: prefix.c dfa.h mem.h
-+product.o: product.c dfa.h bdd.h hash.h mem.h
-+quotient.o: quotient.c dfa.h hash.h mem.h
-+basic.o: basic.c dfa.h mem.h
-+external.o: external.c dfa.h bdd_external.h mem.h
-+makebasic.o: makebasic.c dfa.h bdd_internal.h
-+minimize.o: minimize.c dfa.h hash.h mem.h
-+printdfa.o: printdfa.c dfa.h mem.h
-+project.o: project.c dfa.h hash.h mem.h
-+dfa.o: dfa.c dfa.h bdd.h hash.h mem.h
-+
-+dlmalloc.o: dlmalloc.c dlmalloc.h
-+mem.o: mem.c dlmalloc.h
-+
-+clean :
-+ rm -f *.o *.a *.so
-diff -Naur pvs4.2-orig/src/WS1S/ix86-Linux/Makefile pvs4.2-sbcl/src/WS1S/ix86-Linux/Makefile
---- pvs4.2-orig/src/WS1S/ix86-Linux/Makefile 2007-07-02 20:07:40.000000000 +0000
-+++ pvs4.2-sbcl/src/WS1S/ix86-Linux/Makefile 2009-03-24 18:56:17.000000000 +0000
-@@ -14,15 +14,7 @@
- SHELL = /bin/sh
- VPATH = ..:../mona/BDD:../mona/DFA:../mona/Mem
-
--obj = analyze.o prefix.o product.o \
-- quotient.o basic.o external.o \
-- makebasic.o minimize.o printdfa.o \
-- project.o dfa.o \
-- bdd.o bdd_double.o bdd_external.o \
-- bdd_manager.o hash.o bdd_dump.o \
-- bdd_trace.o bdd_cache.o \
-- dlmalloc.o mem.o \
-- ws1s_extended_interface.o
-+obj = ws1s_table.o ws1s_extended_interface.o
-
- .SUFFIXES:
- .SUFFIXES: .c .o
-@@ -34,7 +26,7 @@
- $(CC) $(XCFLAGS) ${CFLAGS} -c $< -o $@
-
- ws1s.so : ${obj}
-- $(LD) ../ws1s-ld-table $(LDFLAGS) -o ws1s.so ${obj}
-+ $(CC) -shared $(CFLAGS) -o ws1s.so ${obj}
-
- bdd.o: bdd.c bdd.h bdd_internal.h
- bdd_double.o: bdd_double.c bdd.h bdd_internal.h
-diff -Naur pvs4.2-orig/src/WS1S/lisp/dfa-foreign-sbcl.lisp pvs4.2-sbcl/src/WS1S/lisp/dfa-foreign-sbcl.lisp
---- pvs4.2-orig/src/WS1S/lisp/dfa-foreign-sbcl.lisp 1970-01-01 00:00:00.000000000 +0000
-+++ pvs4.2-sbcl/src/WS1S/lisp/dfa-foreign-sbcl.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -0,0 +1,275 @@
-+;; --------------------------------------------------------------------
-+;; PVS
-+;; Copyright (C) 2006, SRI International. All Rights Reserved.
-+
-+;; This program is free software; you can redistribute it and/or
-+;; modify it under the terms of the GNU General Public License
-+;; as published by the Free Software Foundation; either version 2
-+;; of the License, or (at your option) any later version.
-+
-+;; This program is distributed in the hope that it will be useful,
-+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+;; GNU General Public License for more details.
-+
-+;; You should have received a copy of the GNU General Public License
-+;; along with this program; if not, write to the Free Software
-+;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+;; --------------------------------------------------------------------
-+
-+(in-package :pvs)
-+
-+;; Structure of a DFA in foreign space
-+(sb-alien:define-alien-type nil
-+ (sb-alien:struct mona-dfa
-+ (bddm (* t)) ; Manager of BDD nodes
-+ (ns (integer 32)) ; Number of states
-+ (q (* t)) ; Transition array
-+ (s (integer 32)) ; Start State
-+ (f (* (integer 32))))) ; State Status Array
-+
-+;; Predefined basic automata
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaTrue" mona-true) ; true
-+ (* (sb-alien:struct mona-dfa)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaFalse" mona-false) ; false
-+ (* (sb-alien:struct mona-dfa)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaConst" mona-const) ; p_i = n
-+ (* (sb-alien:struct mona-dfa))
-+ (n (integer 32)) (i (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaLess" mona-less) ; p_i < p_j
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaLesseq" mona-lesseq) ; p_i <= p_j
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaPlus1" mona-plus1) ; p_i = p_j + n
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)) (n (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaMinus1" mona-minus1) ; p_i = p_i - p_j
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaEq1" mona-eq1) ; p_i = p_j
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaEq2" mona-eq2) ; P_i = P_j
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaPlus2" mona-plus2) ; P_i = P_j + 1
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaMinus2" mona-minus2) ; P_i = P_j - 1
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaPlusModulo1" mona-plusmodulo1) ; p_i = p_j + 1 % p_k
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)) (k (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaMinusModulo1" mona-minusmodulo1) ; p_i = p_j - 1 % p_k
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)) (k (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaEmpty" mona-empty) ; P_i = empty
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaIn" mona-in) ; p_i in P_j recognizes <X,X>(<0,X>+)<1,1>(<X,X>*)
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaSubset" mona-subset) ; P_i sub P_j
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaUnion" mona-union) ; P_i = P_j union P_k
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)) (k (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaInter" mona-intersection) ; P_i = P_j inter P_k
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)) (k (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaSetminus" mona-difference) ; P_i = P_j \ P_k
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)) (k (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaMax" mona-max) ; p_i = max(P_j)
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaMin" mona-min) ; p_i = min(P_j)
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (j (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaBoolvar" mona-boolvar) ; b_i
-+ (* (sb-alien:struct mona-dfa))
-+ (b (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaPresbConst" mona-presburger-const) ; P_i = pconst(n)
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)) (n (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaSingleton" mona-singleton) ; singleton(P_i)
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaFirstOrder" mona-first-order) ; recognizes 0*1+
-+ (* (sb-alien:struct mona-dfa))
-+ (i (integer 32)))
-+
-+
-+;; Automaton operations
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaFree" mona-free!)
-+ sb-alien:void
-+ (a (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaNegation" mona-negation!)
-+ sb-alien:void
-+ (a (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaRestrict" mona-restrict!)
-+ sb-alien:void
-+ (a (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaUnrestrict" mona-unrestrict!)
-+ sb-alien:void
-+ (a (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaCopy" mona-copy)
-+ (* (sb-alien:struct mona-dfa))
-+ (a (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaProduct" mona-product)
-+ (* (sb-alien:struct mona-dfa))
-+ (a1 (* (sb-alien:struct mona-dfa)))
-+ (a2 (* (sb-alien:struct mona-dfa)))
-+ (mode (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaPrefixClose" mona-prefix-close!)
-+ sb-alien:void
-+ (a (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaConjunction" mona-conjunction)
-+ (* (sb-alien:struct mona-dfa))
-+ (a1 (* (sb-alien:struct mona-dfa))) (a2 (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaDisjunction" mona-disjunction)
-+ (* (sb-alien:struct mona-dfa))
-+ (a1 (* (sb-alien:struct mona-dfa))) (a2 (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaImplication" mona-implication)
-+ (* (sb-alien:struct mona-dfa))
-+ (a1 (* (sb-alien:struct mona-dfa))) (a2 (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaIff" mona-iff)
-+ (* (sb-alien:struct mona-dfa))
-+ (a1 (* (sb-alien:struct mona-dfa))) (a2 (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaStatus" mona-status)
-+ (integer 32)
-+ (a (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaProject" mona-project)
-+ ; projects away track var_index from a and
-+ ; determinizes the resulting automaton
-+ (* (sb-alien:struct mona-dfa))
-+ (a (* (sb-alien:struct mona-dfa))) (index (sb-alien:unsigned 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaRightQuotient" mona-right-quotient!)
-+ sb-alien:void
-+ (a (* (sb-alien:struct mona-dfa))) (index (sb-alien:unsigned 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaMinimize" mona-minimize) ; Minimization
-+ (* (sb-alien:struct mona-dfa))
-+ (a (* (sb-alien:struct mona-dfa))))
-+
-+
-+;; Analysis and printing
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaMakeExample" mona-make-example)
-+ sb-alien:c-string
-+ (a (* (sb-alien:struct mona-dfa)))
-+ (kind (integer 32))
-+ (num (integer 32))
-+ (indices (array (sb-alien:unsigned 32))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaAnalyze" mona-analyze)
-+ sb-alien:void
-+ (a (* (sb-alien:struct mona-dfa)))
-+ (num (integer 32))
-+ (names (array sb-alien:c-string))
-+ (indices (array sb-alien:unsigned))
-+ (orders (array sb-alien:char))
-+ (treestyle (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaPrintVitals" mona-print-vitals)
-+ sb-alien:void
-+ (a (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaPrint" mona-print)
-+ sb-alien:void
-+ (a (* (sb-alien:struct mona-dfa)))
-+ (num (integer 32))
-+ (names (array sb-alien:c-string))
-+ (indices (array (sb-alien:unsigned 32))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaPrintGraphviz" mona-print-graphviz)
-+ sb-alien:void
-+ (a (* (sb-alien:struct mona-dfa)))
-+ (num (integer 32))
-+ (indices (array (sb-alien:unsigned 32))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaPrintVerbose" mona-print-verbose)
-+ sb-alien:void
-+ (a (* (sb-alien:struct mona-dfa))))
-+
-+(sb-alien:define-alien-routine ("ws1s___bdd_size" bdd-size)
-+ (sb-alien:unsigned 32)
-+ (bbdm (* t)))
-+
-+
-+;; Constructing Automata Explicitly
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaSetup" mona-setup)
-+ sb-alien:void
-+ (s (integer 32))
-+ (len (integer 32))
-+ (indices (array (integer 32))))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaAllocExceptions" mona-alloc-exceptions)
-+ sb-alien:void
-+ (n (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaStoreException" mona-store-exception)
-+ sb-alien:void
-+ (s (integer 32)) (path sb-alien:c-string))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaStoreState" mona-store-state)
-+ sb-alien:void
-+ (s (integer 32)))
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaBuild" mona-build)
-+ (* (sb-alien:struct mona-dfa))
-+ (statuses (array sb-alien:char)))
-+
-+;; Exporting
-+
-+(sb-alien:define-alien-routine ("ws1s___dfaExport" mona-export)
-+ (integer 32)
-+ (a (* (sb-alien:struct mona-dfa)))
-+ (filename sb-alien:c-string)
-+ (num (integer 32))
-+ (names (array sb-alien:c-string))
-+ (orders (array sb-alien:char)))
-diff -Naur pvs4.2-orig/src/WS1S/lisp/symtab.lisp pvs4.2-sbcl/src/WS1S/lisp/symtab.lisp
---- pvs4.2-orig/src/WS1S/lisp/symtab.lisp 2007-07-02 20:07:39.000000000 +0000
-+++ pvs4.2-sbcl/src/WS1S/lisp/symtab.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -81,7 +81,7 @@
- (let* ((free (symtab-freevars symtab))
- (size (length free))
- (offsets (make-array size :element-type 'fixnum))
-- (fvars (make-array size :element-type 'string))
-+ (fvars (make-array size :element-type 'string :initial-element ""))
- (types (make-string size))
- (i 0))
- (mapc #'(lambda (bndng)
-diff -Naur pvs4.2-orig/src/WS1S/lisp/ws1s-strategy.lisp pvs4.2-sbcl/src/WS1S/lisp/ws1s-strategy.lisp
---- pvs4.2-orig/src/WS1S/lisp/ws1s-strategy.lisp 2007-07-02 20:07:39.000000000 +0000
-+++ pvs4.2-sbcl/src/WS1S/lisp/ws1s-strategy.lisp 2009-03-24 18:56:17.000000000 +0000
-@@ -193,7 +193,7 @@
- (loop* 0 (emptyset-operator))))
-
- (defun ws1s-automaton-output (p num fvars offsets)
-- (format t "~2%Free vars:~2%" fvars)
-+ (format t "~2%Free vars:~{ ~s~}~2%" fvars)
- (dfa-print p num fvars offsets)
- (format t "~%"))
-
diff --git a/sci-mathematics/pvs/pvs-4.2-r1.ebuild b/sci-mathematics/pvs/pvs-4.2-r1.ebuild
deleted file mode 100644
index 42333c210..000000000
--- a/sci-mathematics/pvs/pvs-4.2-r1.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: Exp $
-
-inherit eutils
-
-DESCRIPTION="PVS is a verification system written in Common Lisp"
-HOMEPAGE="http://pvs.csl.sri.com/"
-SRC_URI="http://pvs.csl.sri.com/download-open/${P}-source.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-
-IUSE="doc"
-
-RDEPEND="|| ( app-editors/emacs app-editors/xemacs )
- !x86? ( dev-lisp/sbcl ) x86? ( dev-lisp/cmucl )"
-
-DEPEND="${RDEPEND}
- doc? ( app-text/texlive
- app-text/ghostscript-gpl )"
-
-src_unpack() {
- unpack ${A}
- epatch "${FILESDIR}/pvs-4.2-patch-make"
- epatch "${FILESDIR}/pvs-4.2-patch-bddp"
- case $(tc-arch ${CTARGET}) in
- "x86")
- ;;
- *)
- epatch "${FILESDIR}/pvs-4.2-patch-sbcl"
- ;;
- esac
- ln -s ../sum.tex ./doc/user-guide/sum.tex
- emake -C doc/release-notes clean
- rm doc/release-notes/pvs-release-notes.pdf
-}
-
-src_compile() {
- econf || die "econf failed"
- case $(tc-arch ${CTARGET}) in
- "x86")
- CMULISP_HOME="/usr" emake || die "emake failed"
- ;;
- *)
- SBCLISP_HOME="/usr" emake -j1 || die "emake failed"
- ;;
- esac
- bin/relocate && ./pvsio no_test
-
- if use doc; then
- emake -j1 -C doc/language || die "emake language doc failed"
- emake -j1 -C doc/prover || die "emake prover doc failed"
- emake -j1 -C doc/release-notes || die "emake release-notes doc failed"
- emake -j1 -C doc/user-guide || die "emake user-guide doc failed"
- fi
-}
-
-src_install() {
- rm -R bin/relocate emacs/emacs19
- mkdir tex
- mv pvs-tex.sub pvs.sty tex/
- mv Examples examples
- mkdir -p "${D}"/usr/share/pvs
- mv bin emacs examples lib tex wish "${D}"/usr/share/pvs/
- sed -i -e "s,^PVSPATH=.*$,PVSPATH=/usr/share/pvs," pvs
- sed -i -e "s,^PVSPATH=.*$,PVSPATH=/usr/share/pvs," pvsio
- cp pvs pvsio "${D}"/usr/share/pvs/
- dobin pvs pvsio
- dodoc INSTALL LICENSE NOTICES README
-
- if use doc; then
- mv doc/PVSio-2.d.pdf pvsio-reference-manual.pdf
- mv doc/language/language.pdf pvs-language-reference.pdf
- mv doc/prover/prover.pdf pvs-prover-guide.pdf
- mv doc/release-notes/pvs-release-notes.pdf pvs-release-notes.pdf
- mv doc/user-guide/user-guide.pdf pvs-system-guide.pdf
- dodoc pvsio-reference-manual.pdf pvs-language-reference.pdf \
- pvs-prover-guide.pdf pvs-release-notes.pdf pvs-system-guide.pdf
- fi
-}
-
diff --git a/sci-mathematics/pvs/pvs-4.2.ebuild b/sci-mathematics/pvs/pvs-4.2.ebuild
index 2b7446960..4671b9bcd 100644
--- a/sci-mathematics/pvs/pvs-4.2.ebuild
+++ b/sci-mathematics/pvs/pvs-4.2.ebuild
@@ -10,24 +10,46 @@ SRC_URI="http://pvs.csl.sri.com/download-open/${P}-source.tgz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~x86"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-IUSE=""
+IUSE="doc"
-RDEPEND="dev-lisp/cmucl
- || ( app-editors/emacs app-editors/xemacs )"
+RDEPEND="|| ( app-editors/emacs app-editors/xemacs )
+ !x86? ( dev-lisp/sbcl ) x86? ( dev-lisp/cmucl )"
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+ doc? ( app-text/texlive
+ app-text/ghostscript-gpl )"
src_unpack() {
unpack ${A}
- epatch "${FILESDIR}/pvs-4.2-patch-make"
+
+ EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" epatch
+
+ ln -s ../sum.tex ./doc/user-guide/sum.tex
+ emake -C doc/release-notes clean
+ rm doc/release-notes/pvs-release-notes.pdf
}
src_compile() {
econf || die "econf failed"
- CMULISP_HOME="/usr" emake || die "emake failed"
- bin/relocate && ./pvsio test
+ case $(tc-arch ${CTARGET}) in
+ "x86")
+ CMULISP_HOME="/usr" emake || die "emake failed"
+ ;;
+ *)
+ SBCLISP_HOME="/usr" emake -j1 || die "emake failed"
+ ;;
+ esac
+ bin/relocate && ./pvsio no_test
+
+ if use doc; then
+ emake -j1 -C doc/language || die "emake language doc failed"
+ emake -j1 -C doc/prover || die "emake prover doc failed"
+ emake -j1 -C doc/release-notes || die "emake release-notes doc failed"
+ emake -j1 -C doc/user-guide || die "emake user-guide doc failed"
+ fi
}
src_install() {
@@ -41,6 +63,16 @@ src_install() {
sed -i -e "s,^PVSPATH=.*$,PVSPATH=/usr/share/pvs," pvsio
cp pvs pvsio "${D}"/usr/share/pvs/
dobin pvs pvsio
- dodoc INSTALL LICENSE NOTICES README
+ dodoc INSTALL LICENSE NOTICES README
+
+ if use doc; then
+ mv doc/PVSio-2.d.pdf pvsio-reference-manual.pdf
+ mv doc/language/language.pdf pvs-language-reference.pdf
+ mv doc/prover/prover.pdf pvs-prover-guide.pdf
+ mv doc/release-notes/pvs-release-notes.pdf pvs-release-notes.pdf
+ mv doc/user-guide/user-guide.pdf pvs-system-guide.pdf
+ dodoc pvsio-reference-manual.pdf pvs-language-reference.pdf \
+ pvs-prover-guide.pdf pvs-release-notes.pdf pvs-system-guide.pdf
+ fi
}
diff --git a/sci-mathematics/why/Manifest b/sci-mathematics/why/Manifest
index 0138a2c23..1ffc5a70f 100644
--- a/sci-mathematics/why/Manifest
+++ b/sci-mathematics/why/Manifest
@@ -1,2 +1,4 @@
-DIST why-2.17.tar.gz 2506291 RMD160 97cad17d196eabef8a64e8881661bdb8ecbab75d SHA1 930e577f12849f204f49cf10147ee9c646d169df SHA256 39186ca1e20712eeecb0c4330b8998c70b1c11e93279039a79a053da5393aed5
-EBUILD why-2.17.ebuild 1170 RMD160 7a71fbe7793aefdf7c1a5061fbcaaca9130b142e SHA1 dbb5017c0e9e49620368aa31f8dbabe271fb603a SHA256 07c420f238e9a5977ad9b5d45797240e01b54ff03d72aea2cc5c1d51a4341265
+AUX why-2.19-jessie_lib.patch 1631 RMD160 b3975a252f539a04b079b6e973332136fde464cb SHA1 2ba2c2956354c896904d0c9a2e1d6079fbb56027 SHA256 aaff9f7648438d54eec0b1e9f0ff4828aaa26558ee7d847190d7a3d6e0c4abbc
+AUX why-2.19-sandbox.patch 3025 RMD160 b8b1b178b09a7b6eda9c8aeac7f5013650fb6c84 SHA1 6bd5e80aa79a6a36d89a114696da716b92aa60df SHA256 121b67a2b46139b93be9af293615a6a04e06a00323096e8b2317a7116bbf5d84
+DIST why-2.19.tar.gz 2622629 RMD160 d1e3a099226a42b039672161ada63270e6274b46 SHA1 6139699168c6aab76d42e02029ba4c51cf2a8130 SHA256 f5eef288c25744f1c7725c1c733b3129a74cde6cf08eaa57b9705115d75499a3
+EBUILD why-2.19.ebuild 1251 RMD160 06d27855255d3d9d6e64439e09ec07bd85f7f8f3 SHA1 e9a00f666946205726522a29545645e474660bd0 SHA256 ab65ace2cae729b5a739b81bd3190a7b3453d6848d9413cc2680537fe641566c
diff --git a/sci-mathematics/why/files/why-2.19-jessie_lib.patch b/sci-mathematics/why/files/why-2.19-jessie_lib.patch
new file mode 100644
index 000000000..5a312a4ff
--- /dev/null
+++ b/sci-mathematics/why/files/why-2.19-jessie_lib.patch
@@ -0,0 +1,43 @@
+diff -Naur why-2.19-orig/Makefile.in why-2.19-ptch/Makefile.in
+--- why-2.19-orig/Makefile.in 2009-06-23 12:09:43.000000000 +0000
++++ why-2.19-ptch/Makefile.in 2009-09-04 16:11:28.000000000 +0000
+@@ -147,8 +147,10 @@
+
+ ifeq ($(OCAMLBEST),opt)
+ JCLIB=jc/jc.cmo jc/jc.cmx
++JCLD=jc/jc.cmi jc/jc.o
+ else
+ JCLIB=jc/jc.cmo
++JCLD=jc/jc.cmi
+ endif
+
+ all: $(BINARY) $(WHYCONFIG) check $(CADUCEUS) $(JESSIE) $(KRAKATOA) coq-@COQ@ pvs-@PVS@ $(TOOLS) gwhy-@LABLGTK2@ $(JCLIB) $(REGTEST)
+@@ -276,15 +278,15 @@
+
+ # jessie
+ JCCML_EXPORT = src/lib.ml src/rc.ml src/loc.ml src/pp.ml src/option_misc.ml \
+- jc/jc_type_var.ml jc/output.ml \
++ jc/jc_type_var.ml jc/jc_env.ml jc/output.ml \
+ jc/jc_common_options.ml jc/jc_stdlib.ml \
+- jc/jc_envset.ml jc/jc_region.ml jc/jc_fenv.ml \
++ jc/jc_envset.ml jc/jc_region.ml jc/jc_ast.ml jc/jc_fenv.ml \
+ jc/jc_constructors.ml \
+ jc/jc_pervasives.ml jc/jc_iterators.ml \
+ jc/jc_output_misc.ml jc/jc_poutput.ml jc/jc_output.ml jc/jc_noutput.ml
+ JCCMO_EXPORT = $(JCCML_EXPORT:.ml=.cmo)
+ JCCMX_EXPORT = $(JCCML_EXPORT:.ml=.cmx)
+-JCCMI_EXPORT = jc/jc_ast.cmi jc/jc_env.cmi $(JCCML_EXPORT:.ml=.cmi)
++JCCMI_EXPORT = $(JCCML_EXPORT:.ml=.cmi)
+
+ JCCMO = src/version.cmo \
+ @ATPCMO@ $(JCCMO_EXPORT) \
+@@ -744,7 +746,8 @@
+ mkdir -p $(LIBDIR)/why/why
+ cp -f $(PRELUDE) $(LIBDIR)/why/why
+ mkdir -p $(LIBDIR)/caduceus/why
+-# ??? cp -f $(JCLIB) $(JCCMI_EXPORT) $(LIBDIR)
++ mkdir -p $(LIBDIR)/ocaml/jessie
++ cp -f $(JCLIB) $(JCLD) $(JCCMI_EXPORT) $(LIBDIR)/ocaml/jessie
+ cp -f lib/why/caduceus.why $(LIBDIR)/caduceus/why
+ cp -f lib/why/caduceus_arith.why $(LIBDIR)/caduceus/why
+ mkdir -p $(LIBDIR)/caduceus/coq
diff --git a/sci-mathematics/why/files/why-2.19-sandbox.patch b/sci-mathematics/why/files/why-2.19-sandbox.patch
new file mode 100644
index 000000000..3ec92830a
--- /dev/null
+++ b/sci-mathematics/why/files/why-2.19-sandbox.patch
@@ -0,0 +1,75 @@
+diff -Naur why-2.19-orig/Makefile.in why-2.19-ptch/Makefile.in
+--- why-2.19-orig/Makefile.in 2009-06-23 12:09:43.000000000 +0000
++++ why-2.19-ptch/Makefile.in 2009-09-04 14:43:22.000000000 +0000
+@@ -777,9 +777,9 @@
+ cp -f $(VO7) $(LIBDIR)/why/coq7
+ install-coq-v8:
+ if test -w $(COQLIB) ; then \
+- mkdir -p $(COQLIB)/user-contrib ; \
+- cp -f $(V8FILES) $(COQLIB)/user-contrib ; \
+- cp -f $(VO8) $(COQLIB)/user-contrib ; \
++ mkdir -p $(DESTDIR)/$(COQLIB)/user-contrib ; \
++ cp -f $(V8FILES) $(DESTDIR)/$(COQLIB)/user-contrib ; \
++ cp -f $(VO8) $(DESTDIR)/$(COQLIB)/user-contrib ; \
+ else \
+ echo "Cannot copy to Coq standard library. Add $(LIBDIR)/why/coq to Coq include path." ;\
+ mkdir -p $(LIBDIR)/why/coq ;\
+@@ -788,18 +788,18 @@
+
+ install-pvs-no:
+ install-pvs-yes: $(PVSFILES)
+- mkdir -p $(PVSLIB)/why
+- cp $(PVSFILES) $(PVSFILES:.pvs=.prf) $(PVSLIB)/why
+- cp lib/pvs/top.pvs lib/pvs/pvscontext.el $(PVSLIB)/why
++ mkdir -p $(DESTDIR)/$(PVSLIB)/why
++ cp $(PVSFILES) $(PVSFILES:.pvs=.prf) $(DESTDIR)/$(PVSLIB)/why
++ cp lib/pvs/top.pvs lib/pvs/pvscontext.el $(DESTDIR)/$(PVSLIB)/why
+ @echo "====== Compiling PVS theories, this may take some time ======"
+- (cd $(PVSLIB)/why ; @PVSC@ -batch -l pvscontext.el -q -v 2 > top.out)
++ (cd $(DESTDIR)/$(PVSLIB)/why ; @PVSC@ -batch -l pvscontext.el -q -v 2 > top.out)
+ @echo "====== Done compiling PVS theories ======"
+
+ install-mizar-no:
+ install-mizar-yes:
+- mkdir -p @MIZARLIB@/mml/dict
+- cp lib/mizar/why.miz @MIZARLIB@/mml
+- cp lib/mizar/dict/why.voc @MIZARLIB@/mml/dict
++ mkdir -p $(DESTDIR)/@MIZARLIB@/mml/dict
++ cp lib/mizar/why.miz $(DESTDIR)/@MIZARLIB@/mml
++ cp lib/mizar/dict/why.voc $(DESTDIR)/@MIZARLIB@/mml/dict
+
+ local-install: $(BINARY) $(WHYCONFIG) $(CADUCEUS) $(JESSIE) bin/gwhy.$(OCAMLBEST) byte bin/gwhy.byte
+ cp $(BINARY) $$HOME/bin/why
+@@ -817,15 +817,15 @@
+ # cp -f $(WHY2HTML) $$HOME/bin/$$OSTYPE/why2html
+ # cp -f $(DP) $$HOME/bin/$$OSTYPE/dp
+ # cp -f $(RVMERGE) $$HOME/bin/$$OSTYPE/rv_merge
+-# # mkdir -p $(COQLIB)/contrib7/why
+-# # cp -f $(VO7) $(VFILES) $(COQLIB)/contrib7/why
+-# # mkdir -p $(COQLIB)/contrib/why
+-# # cp -f $(VO8) $(VFILES) $(COQLIB)/contrib/why
+-# mkdir -p $(PVSLIB)/why
+-# cp $(PVSFILES) $(PVSLIB)/why
+-# mkdir -p $(MIZFILES)/mml/dict
+-# cp lib/mizar/why.miz $(MIZFILES)/mml
+-# cp lib/mizar/dict/why.voc $(MIZFILES)/mml/dict
++# # mkdir -p $(DESTDIR)/$(COQLIB)/contrib7/why
++# # cp -f $(VO7) $(VFILES) $(DESTDIR)/$(COQLIB)/contrib7/why
++# # mkdir -p $(DESTDIR)/$(COQLIB)/contrib/why
++# # cp -f $(VO8) $(VFILES) $(DESTDIR)/$(COQLIB)/contrib/why
++# mkdir -p $(DESTDIR)/$(PVSLIB)/why
++# cp $(PVSFILES) $(DESTDIR)/$(PVSLIB)/why
++# mkdir -p $(DESTDIR)/$(MIZFILES)/mml/dict
++# cp lib/mizar/why.miz $(DESTDIR)/$(MIZFILES)/mml
++# cp lib/mizar/dict/why.voc $(DESTDIR)/$(MIZFILES)/mml/dict
+ # mkdir -p $$HOME/man/man1
+ # cp -f doc/*.1 $$HOME/man/man1
+
+@@ -1119,7 +1119,6 @@
+ rm -f $(GENERATED)
+ make -C atp clean
+ make -C doc clean
+- make -C examples-v7 clean
+ make -C examples clean
+
+ dist-clean:: clean
diff --git a/sci-mathematics/why/why-2.17.ebuild b/sci-mathematics/why/why-2.19.ebuild
index b3c67f892..353650be8 100644
--- a/sci-mathematics/why/why-2.17.ebuild
+++ b/sci-mathematics/why/why-2.19.ebuild
@@ -2,6 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: Exp $
+inherit autotools eutils
+
DESCRIPTION="Why is a software verification platform."
HOMEPAGE="http://why.lri.fr/"
SRC_URI="http://why.lri.fr/download/${P}.tar.gz"
@@ -10,7 +12,7 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-IUSE="apron coq doc gappa gtk pff pvs"
+IUSE="apron coq doc examples gappa gtk pff pvs"
RDEPEND="apron? ( sci-mathematics/apron )
coq? ( sci-mathematics/coq )
@@ -20,22 +22,25 @@ RDEPEND="apron? ( sci-mathematics/apron )
DEPEND="${RDEPEND}
>=dev-lang/ocaml-3.09
- gtk? ( >=dev-ml/lablgtk-2.6 )"
+ >=dev-ml/ocamlgraph-1.1
+ gtk? ( >=dev-ml/lablgtk-2.12 )"
src_unpack() {
unpack ${A}
cd ${S}
-
- sed -i Makefile.in \
- -e "s/\$(COQLIB)/\$(DESTDIR)\/\$(COQLIB)/g" \
- -e "s/-w \$(DESTDIR)\/\$(COQLIB)/-w \$(COQLIB)/g" \
- -e "s/\$(PVSLIB)\/why/\$(DESTDIR)\$(PVSLIB)\/why/g"
+
+ epatch "${FILESDIR}/${P}-sandbox.patch"
+
+ mv jc/jc_ast.mli jc/jc_ast.ml
+ mv jc/jc_env.mli jc/jc_env.ml
+ epatch "${FILESDIR}/${P}-jessie_lib.patch"
+
+ eautoreconf
}
src_compile(){
econf $(use_enable apron) || die "econf failed"
- #Makfile need a fix to enable parallel building
- emake -j1 DESTDIR="/" || die "emake failed"
+ emake DESTDIR="/" || die "emake failed"
}
src_install(){
@@ -46,5 +51,10 @@ src_install(){
if use doc; then
dodoc doc/manual.ps
fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples examples-c
+ fi
}