From bae0681d2bc742841f936248775290df67876748 Mon Sep 17 00:00:00 2001 From: Andy Keep Date: Wed, 20 Mar 2019 22:26:29 -0400 Subject: [PATCH 01/12] Start on release notes. - added library-search-handler, compile-whole-library, and improved packaging to the release notes. release_notes/release_notes.stex original commit: 4740211242cf7f010fd66a7c15cf71aea098956c --- LOG | 3 ++ release_notes/release_notes.stex | 53 ++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/LOG b/LOG index 9276d1dd6d..7f65723c53 100644 --- a/LOG +++ b/LOG @@ -1204,3 +1204,6 @@ compile.ss - minor build and new-release updates checkin, newrelease, Makefile.in, Makefile-workarea.in +- added library-search-handler, compile-whole-library, and improved + packaging to the release notes. + release_notes/release_notes.stex diff --git a/release_notes/release_notes.stex b/release_notes/release_notes.stex index ab54a07326..d7cbc9d59f 100644 --- a/release_notes/release_notes.stex +++ b/release_notes/release_notes.stex @@ -58,6 +58,29 @@ Online versions of both books can be found at %----------------------------------------------------------------------------- \section{Functionality Changes}\label{section:functionality} +\subsection{Improved packaging support (9.5.1)} + +The Chez Scheme \scheme{Makefile} has been enhanced with new targets for +creating binary packages for Unix-like operating systems. +The \scheme{create-tarball} target generates a binary tarball package for +distribution, the \scheme{create-rpm} target generates a Linux RPM package, and +the \scheme{create-pkg} target generates a macOS package file. + +\subsection{Library search handler (9.5.1)} + +The new \scheme{library-search-handler} parameter controls how library source +or object code is located when \scheme{import}, \scheme{compile-whole-program}, +or \scheme{compile-whole-library} are used to load a library. +The value of the \scheme{library-search-handler} parameter must be a procedure +expecting four arguments: the \var{who} argument is a symbol that provides +context in \scheme{import-notify} messages, the \var{library} argument is the +name of the desired library, the \var{directories} is a list of source and +object directory pairs in the form returned by \scheme{library-directories}, +and the \var{extensions} parameter is a list of source and object extension +pairs in the form returned by \scheme{library-extensions}. +The default vaue of the \scheme{library-search-handler} is the newly exposed +\scheme{default-library-search-handler} procedure. + \subsection{Ftype guardians (9.5.1)} Applications that manage memory outside the Scheme heap can leverage @@ -1640,6 +1663,36 @@ in fasl files does not generally make sense. %----------------------------------------------------------------------------- \section{Bug Fixes}\label{section:bugfixes} +\subsection{Unbound object resulting from libraries combined with \protect\scheme{compile-whole-library} (9.5.1)} + +A bug in \scheme{compile-whole-library} that allowed the invoke code for a +library included in the combined library body to be executed without first +invoking its binary library dependencies has been fixed. +This bug could arise when a member of a combined library was invoked without +invoking the requirements of the other libraries it was combined with. For +instance, consider the case where libraries \scheme{(A)} and \scheme{(B)} are +combined and \scheme{(B)} has dependencies on library \scheme{(A)} and binary +library \scheme{(C)}. +One possible sort order of this graph is \scheme{(C)}, \scheme{(A)}, +\scheme{(B)}, where the invoke code for \scheme{(A)} and \scheme{(B)} are +combined into a single block of invoke code. If library \scheme{(A)} is +invoked first, it will implicitly cause the invoke code for \scheme{(B)} to be +invoked without invoking the code for \scheme{(C)}. +We address this by adding explicit dependencies between \scheme{(A)} and all +the binary libraries that precede it and all of the other libraries clustered +with \scheme{(A)} and \scheme{(A)}, such that no matter which library clustered +with \scheme{(A)} is invoked firts, \scheme{(A)} will be invoked, causing all +binary libraries that precede \scheme{(A)} to be invoked. +It is also possible for a similar problem to exist between clusters, where +invoking a later cluster may invoke an earlier cluster without invoking the +binary dependencies for the earlier cluster. +We address this issue by adding an invoke requirement between each cluster and +the first library in the cluster that precedes it. +These extended invoke requirements are also added to the import requirements +for each library, and the dependency graph is enhanced with import requirement +links to ensure these are taken into account during the topological sort. + + \subsection{Automatic recompilation and missing include files (9.5.1)} A bug in automatic recompilation involving missing include files From b2cecd2c0f300ffcda871e9c47cd2b27d182d3f9 Mon Sep 17 00:00:00 2001 From: dyb Date: Thu, 21 Mar 2019 14:30:49 -0700 Subject: [PATCH 02/12] 9.5.2 changes: - updated version to 9.5.2 bintar/Makefile rpm/Makefile pkg/Makefile BUILDING NOTICE makefiles/Mf-install.in makefiles/Makefile-csug.in scheme.1.in c/Makefile.a6nt c/Makefile.i3nt c/Makefile.ta6nt c/Makefile.ti3nt mats/Mf-a6nt mats/Mf-i3nt mats/Mf-ta6nt mats/Mf-ti3nt workarea c/scheme.rc s/7.ss s/cmacros.ss release_notes/release_notes.stex csug/copyright.stex csug/csug.stex rpm/Makefile pkg/Makefile wininstall/Makefile wininstall/a6nt.wxs wininstall/i3nt.wxs wininstall/ta6nt.wxs wininstall/ti3nt.wxs - fixed handling of bintar, rpm, pkg make files newrelease - fixed a bug in the fasl representation and reading of mutually recursive ftypes where one of the members of the cycle is the parent of another, which manifested in the fasl reader raising bogus "incompatible record type" exceptions. (The bug could also affect other record-type descriptors with cycles involving parent rtds and "extra" fields.) object files created before this fix are incompatible with builds with this fix, and objects files created after this fix are incompatible builds without this fix. fasl.ss, strip.ss, fasl.c, ftype.ms, release_notes.stex original commit: 766d591c18c2779866d1a059700e6ff1c02cb3c5 --- BUILDING | 4 +-- LOG | 25 ++++++++++++++++++ NOTICE | 4 +-- bintar/Makefile | 2 +- c/Makefile.a6nt | 10 +++---- c/Makefile.i3nt | 10 +++---- c/Makefile.ta6nt | 10 +++---- c/Makefile.ti3nt | 10 +++---- c/fasl.c | 23 ++++++++-------- c/scheme.rc | 12 ++++----- csug/copyright.stex | 4 +-- csug/csug.stex | 4 +-- makefiles/Mf-install.in | 2 +- mats/Mf-a6nt | 2 +- mats/Mf-i3nt | 2 +- mats/Mf-ta6nt | 2 +- mats/Mf-ti3nt | 2 +- mats/ftype.ms | 36 +++++++++++++++++++++++++ newrelease | 18 ++++++++----- pkg/Makefile | 2 +- release_notes/release_notes.stex | 23 +++++++++++++++- rpm/Makefile | 2 +- s/7.ss | 2 +- s/cmacros.ss | 2 +- s/fasl.ss | 4 +++ s/strip.ss | 45 +++++++++++++++++++------------- scheme.1.in | 4 +-- wininstall/Makefile | 2 +- wininstall/a6nt.wxs | 12 ++++----- wininstall/i3nt.wxs | 12 ++++----- wininstall/ta6nt.wxs | 12 ++++----- wininstall/ti3nt.wxs | 12 ++++----- workarea | 8 +++--- 33 files changed, 213 insertions(+), 111 deletions(-) mode change 100755 => 100644 wininstall/Makefile mode change 100755 => 100644 wininstall/a6nt.wxs mode change 100755 => 100644 wininstall/i3nt.wxs mode change 100755 => 100644 wininstall/ta6nt.wxs mode change 100755 => 100644 wininstall/ti3nt.wxs diff --git a/BUILDING b/BUILDING index 49d7bacec6..07d0a78805 100644 --- a/BUILDING +++ b/BUILDING @@ -1,5 +1,5 @@ -Building Chez Scheme Version 9.5.1 -Copyright 1984-2017 Cisco Systems, Inc. +Building Chez Scheme Version 9.5.2 +Copyright 1984-2019 Cisco Systems, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/LOG b/LOG index 7f65723c53..5c0ea61dbe 100644 --- a/LOG +++ b/LOG @@ -1207,3 +1207,28 @@ - added library-search-handler, compile-whole-library, and improved packaging to the release notes. release_notes/release_notes.stex + +9.5.2 changes: +- updated version to 9.5.2 + bintar/Makefile rpm/Makefile pkg/Makefile BUILDING NOTICE + makefiles/Mf-install.in makefiles/Makefile-csug.in scheme.1.in + c/Makefile.a6nt c/Makefile.i3nt c/Makefile.ta6nt c/Makefile.ti3nt + mats/Mf-a6nt mats/Mf-i3nt mats/Mf-ta6nt mats/Mf-ti3nt workarea + c/scheme.rc s/7.ss s/cmacros.ss release_notes/release_notes.stex + csug/copyright.stex csug/csug.stex rpm/Makefile pkg/Makefile + wininstall/Makefile wininstall/a6nt.wxs wininstall/i3nt.wxs + wininstall/ta6nt.wxs wininstall/ti3nt.wxs +- fixed handling of bintar, rpm, pkg make files + newrelease +- fixed a bug in the fasl representation and reading of mutually + recursive ftypes where one of the members of the cycle is the + parent of another, which manifested in the fasl reader raising + bogus "incompatible record type" exceptions. (The bug could also + affect other record-type descriptors with cycles involving parent + rtds and "extra" fields.) object files created before this fix + are incompatible with builds with this fix, and objects files + created after this fix are incompatible builds without this fix. + fasl.ss, strip.ss, + fasl.c, + ftype.ms, + release_notes.stex diff --git a/NOTICE b/NOTICE index fb3bf4d92d..386eeb28d4 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ -Chez Scheme Version 9.5.1 -Copyright 1984-2017 Cisco Systems, Inc. +Chez Scheme Version 9.5.2 +Copyright 1984-2019 Cisco Systems, Inc. This product includes code developed by Cisco Systems, Inc. diff --git a/bintar/Makefile b/bintar/Makefile index 61b323ccb0..14d3933b2f 100644 --- a/bintar/Makefile +++ b/bintar/Makefile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -version = 9.5.1 +version = 9.5.2 m := $(shell find ../bin/* -type d | xargs basename) R = csv$(version) diff --git a/c/Makefile.a6nt b/c/Makefile.a6nt index 04c9659e71..79eedfcf43 100644 --- a/c/Makefile.a6nt +++ b/c/Makefile.a6nt @@ -17,11 +17,11 @@ m = a6nt # following have to use \ for directory separator SchemeInclude = ..\boot\$m -KernelDll = ..\bin\$m\csv951.dll -KernelLib = ..\bin\$m\csv951.lib -MTKernelLib = ..\boot\$m\csv951mt.lib -MDKernelLib = ..\boot\$m\csv951md.lib -KernelExp = ..\bin\$m\csv951.exp +KernelDll = ..\bin\$m\csv952.dll +KernelLib = ..\bin\$m\csv952.lib +MTKernelLib = ..\boot\$m\csv952mt.lib +MDKernelLib = ..\boot\$m\csv952md.lib +KernelExp = ..\bin\$m\csv952.exp Exec = ..\bin\$m\scheme.exe MTMain = ..\boot\$m\mainmt.obj MDMain = ..\boot\$m\mainmd.obj diff --git a/c/Makefile.i3nt b/c/Makefile.i3nt index 279558721e..4a91a815a7 100644 --- a/c/Makefile.i3nt +++ b/c/Makefile.i3nt @@ -17,11 +17,11 @@ m = i3nt # following have to use \ for directory separator SchemeInclude = ..\boot\$m -KernelDll = ..\bin\$m\csv951.dll -KernelLib = ..\bin\$m\csv951.lib -MTKernelLib = ..\boot\$m\csv951mt.lib -MDKernelLib = ..\boot\$m\csv951md.lib -KernelExp = ..\bin\$m\csv951.exp +KernelDll = ..\bin\$m\csv952.dll +KernelLib = ..\bin\$m\csv952.lib +MTKernelLib = ..\boot\$m\csv952mt.lib +MDKernelLib = ..\boot\$m\csv952md.lib +KernelExp = ..\bin\$m\csv952.exp Exec = ..\bin\$m\scheme.exe MTMain = ..\boot\$m\mainmt.obj MDMain = ..\boot\$m\mainmd.obj diff --git a/c/Makefile.ta6nt b/c/Makefile.ta6nt index 637f1b4889..9a6617551f 100644 --- a/c/Makefile.ta6nt +++ b/c/Makefile.ta6nt @@ -17,11 +17,11 @@ m = ta6nt # following have to use \ for directory separator SchemeInclude = ..\boot\$m -KernelDll = ..\bin\$m\csv951.dll -KernelLib = ..\bin\$m\csv951.lib -MTKernelLib = ..\boot\$m\csv951mt.lib -MDKernelLib = ..\boot\$m\csv951md.lib -KernelExp = ..\bin\$m\csv951.exp +KernelDll = ..\bin\$m\csv952.dll +KernelLib = ..\bin\$m\csv952.lib +MTKernelLib = ..\boot\$m\csv952mt.lib +MDKernelLib = ..\boot\$m\csv952md.lib +KernelExp = ..\bin\$m\csv952.exp Exec = ..\bin\$m\scheme.exe MTMain = ..\boot\$m\mainmt.obj MDMain = ..\boot\$m\mainmd.obj diff --git a/c/Makefile.ti3nt b/c/Makefile.ti3nt index 8dfa80e6fa..bcf9cd433e 100644 --- a/c/Makefile.ti3nt +++ b/c/Makefile.ti3nt @@ -17,11 +17,11 @@ m = ti3nt # following have to use \ for directory separator SchemeInclude = ..\boot\$m -KernelDll = ..\bin\$m\csv951.dll -KernelLib = ..\bin\$m\csv951.lib -MTKernelLib = ..\boot\$m\csv951mt.lib -MDKernelLib = ..\boot\$m\csv951md.lib -KernelExp = ..\bin\$m\csv951.exp +KernelDll = ..\bin\$m\csv952.dll +KernelLib = ..\bin\$m\csv952.lib +MTKernelLib = ..\boot\$m\csv952mt.lib +MDKernelLib = ..\boot\$m\csv952md.lib +KernelExp = ..\bin\$m\csv952.exp Exec = ..\bin\$m\scheme.exe MTMain = ..\boot\$m\mainmt.obj MDMain = ..\boot\$m\mainmd.obj diff --git a/c/fasl.c b/c/fasl.c index ec7799b9bc..fef56cdb9f 100644 --- a/c/fasl.c +++ b/c/fasl.c @@ -71,7 +71,7 @@ * * -> {base-rtd} * - * -> {rtd} + * -> {rtd} * * -> {record} * @@ -696,24 +696,25 @@ static void faslin(ptr tc, ptr *x, ptr t, ptr *pstrbuf, faslFile f) { } case fasl_type_rtd: { ptr rtd, rtd_uid, plist, ls; - fasl_record(tc, x, t, pstrbuf, f); - rtd = *x; - rtd_uid = RECORDDESCUID(rtd); + faslin(tc, &rtd_uid, t, pstrbuf, f); - /* see if uid's property list already registers an rtd */ + /* look for rtd on uid's property list */ plist = SYMSPLIST(rtd_uid); for (ls = plist; ls != Snil; ls = Scdr(Scdr(ls))) { if (Scar(ls) == S_G.rtd_key) { - ptr old_rtd = Scar(Scdr(ls)); - /* if so, check new rtd against old rtd and return old rtd */ - if (!rtd_equiv(rtd, old_rtd)) - S_error2("", "incompatible record type ~s in ~a", RECORDDESCNAME(rtd), f->uf->path); - *x = old_rtd; + ptr tmp; + *x = rtd = Scar(Scdr(ls)); + fasl_record(tc, &tmp, t, pstrbuf, f); + if (!rtd_equiv(tmp, rtd)) + S_error2("", "incompatible record type ~s in ~a", RECORDDESCNAME(tmp), f->uf->path); return; } } - /* if not, register it */ + fasl_record(tc, x, t, pstrbuf, f); + rtd = *x; + + /* register rtd on uid's property list */ SETSYMSPLIST(rtd_uid, Scons(S_G.rtd_key, Scons(rtd, plist))); return; } diff --git a/c/scheme.rc b/c/scheme.rc index 5f9a1d7660..3c31db7892 100644 --- a/c/scheme.rc +++ b/c/scheme.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 9,5,1,0 - PRODUCTVERSION 9,5,1,0 + FILEVERSION 9,5,2,0 + PRODUCTVERSION 9,5,2,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS VOS__WINDOWS32 @@ -12,13 +12,13 @@ VS_VERSION_INFO VERSIONINFO BLOCK "StringFileInfo" { BLOCK "04090000" { VALUE "CompanyName", "Cisco Systems, Inc." - VALUE "FileDescription", "Chez Scheme Version 9.5.1" - VALUE "FileVersion", "9.5.1" + VALUE "FileDescription", "Chez Scheme Version 9.5.2" + VALUE "FileVersion", "9.5.2" VALUE "InternalName", "scheme.exe" - VALUE "LegalCopyright", "Copyright 1984-2017 Cisco Systems, Inc. Licensed under the Apache License, Version 2.0." + VALUE "LegalCopyright", "Copyright 1984-2019 Cisco Systems, Inc. Licensed under the Apache License, Version 2.0." VALUE "OriginalFilename", "scheme.exe" VALUE "ProductName", "Chez Scheme" - VALUE "ProductVersion", "9.5.1" + VALUE "ProductVersion", "9.5.2" } } BLOCK "VarFileInfo" { diff --git a/csug/copyright.stex b/csug/copyright.stex index de160eb21c..583e8868a2 100644 --- a/csug/copyright.stex +++ b/csug/copyright.stex @@ -16,13 +16,13 @@ \centerline{}\vfill -\textbf{\copyright~2005--2018 Cisco Systems, Inc.} +\textbf{\copyright~2019 Cisco Systems, Inc.} Licensed under the Apache License Version 2.0\\ http://www.apache.org/licenses/LICENSE-2.0 % NB: also update corresponding notice in csug.stex -Revised \revisiondate~for Chez Scheme Version 9.5.1. +Revised \revisiondate~for Chez Scheme Version 9.5.2. \medskip\noindent Cisco and the Cisco logo are trademarks or registered trademarks diff --git a/csug/csug.stex b/csug/csug.stex index 39800fc021..bcd9d7d37b 100644 --- a/csug/csug.stex +++ b/csug/csug.stex @@ -60,10 +60,10 @@ \def\copyrightnotice{\raw{

Chez Scheme Version 9 User's Guide
-Copyright © 2018 Cisco Systems, Inc.
+Copyright © 2019 Cisco Systems, Inc.
Licensed under the Apache License Version 2.0 (full copyright notice.).
-Revised} \revisiondate\raw{ for Chez Scheme Version 9.5.1
+Revised} \revisiondate\raw{ for Chez Scheme Version 9.5.2
about this book }} diff --git a/makefiles/Mf-install.in b/makefiles/Mf-install.in index b40b524bd4..6ea9aaaca0 100644 --- a/makefiles/Mf-install.in +++ b/makefiles/Mf-install.in @@ -55,7 +55,7 @@ InstallScriptName=scheme-script # no changes should be needed below this point # ############################################################################### -Version=csv9.5.1 +Version=csv9.5.2 Include=boot/$m PetiteBoot=boot/$m/petite.boot SchemeBoot=boot/$m/scheme.boot diff --git a/mats/Mf-a6nt b/mats/Mf-a6nt index 51957fad69..0244275180 100644 --- a/mats/Mf-a6nt +++ b/mats/Mf-a6nt @@ -22,7 +22,7 @@ mdclean = cat_flush.exe cat_flush.obj foreign1.exp foreign1.lib foreign1.obj for include Mf-base foreign1.so: $(fsrc) - cmd.exe /c "vs.bat amd64 && cl /DWIN32 /DX86_64 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv951.lib $(fsrc)" + cmd.exe /c "vs.bat amd64 && cl /DWIN32 /DX86_64 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv952.lib $(fsrc)" cat_flush: cat_flush.c cmd.exe /c "vs.bat amd64 && cl /DWIN32 /DX86_64 /MD /nologo $<" diff --git a/mats/Mf-i3nt b/mats/Mf-i3nt index 52e9d3e093..d807e0a8b3 100644 --- a/mats/Mf-i3nt +++ b/mats/Mf-i3nt @@ -22,7 +22,7 @@ mdclean = cat_flush.exe cat_flush.obj foreign1.exp foreign1.lib foreign1.obj for include Mf-base foreign1.so: $(fsrc) - cmd.exe /c "vs.bat x86 && cl /DWIN32 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv951.lib $(fsrc)" + cmd.exe /c "vs.bat x86 && cl /DWIN32 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv952.lib $(fsrc)" cat_flush: cat_flush.c cmd.exe /c "vs.bat x86 && cl /DWIN32 /MD /nologo $<" diff --git a/mats/Mf-ta6nt b/mats/Mf-ta6nt index 177a78aed0..5bf797ff8e 100644 --- a/mats/Mf-ta6nt +++ b/mats/Mf-ta6nt @@ -22,7 +22,7 @@ mdclean = cat_flush.exe cat_flush.obj foreign1.exp foreign1.lib foreign1.obj for include Mf-base foreign1.so: $(fsrc) - cmd.exe /c "vs.bat amd64 && cl /DWIN32 /DX86_64 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv951.lib $(fsrc)" + cmd.exe /c "vs.bat amd64 && cl /DWIN32 /DX86_64 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv952.lib $(fsrc)" cat_flush: cat_flush.c cmd.exe /c "vs.bat amd64 && cl /DWIN32 /DX86_64 /MD /nologo $<" diff --git a/mats/Mf-ti3nt b/mats/Mf-ti3nt index ab61f72a34..ab582e3faf 100644 --- a/mats/Mf-ti3nt +++ b/mats/Mf-ti3nt @@ -22,7 +22,7 @@ mdclean = cat_flush.exe cat_flush.obj foreign1.exp foreign1.lib foreign1.obj for include Mf-base foreign1.so: $(fsrc) - cmd.exe /c "vs.bat x86 && cl /DWIN32 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv951.lib $(fsrc)" + cmd.exe /c "vs.bat x86 && cl /DWIN32 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv952.lib $(fsrc)" cat_flush: cat_flush.c cmd.exe /c "vs.bat x86 && cl /DWIN32 /MD /nologo $<" diff --git a/mats/ftype.ms b/mats/ftype.ms index e5c6a9d3d6..7fc237f1f9 100644 --- a/mats/ftype.ms +++ b/mats/ftype.ms @@ -2876,6 +2876,42 @@ (ftype-set! fcf-B (next) x (make-ftype-pointer fcf-B 0)) (ftype-pointer? (ftype-ref fcf-B (next) x))) (lambda () (foreign-free addr)))) + ; regression test: verify that we can fasl in a cyclic ftd that's already registered on its uid + (begin + (mkfile "testfile-ftype3.ss" + '(define-ftype + [ftype3-A (* ftype3-B)] + [ftype3-B (struct [h ftype3-A])])) + (compile-file "testfile-ftype3") + #t) + (begin ; once should prove it + (load "testfile-ftype3.so") + (ftype-pointer? ftype3-A (make-ftype-pointer ftype3-B 0))) + (begin ; twice for that warm fuzzy feeling + (load "testfile-ftype3.so") + (ftype-pointer? ftype3-A (make-ftype-pointer ftype3-B 0))) + (begin + (mkfile "testfile-ftype4.ss" + '(define-ftype + [ftype4-A (struct [q (* ftype4-B)])] + [ftype4-B (struct [h (* ftype4-A)])])) + (compile-file "testfile-ftype4") + #t) + (begin ; once should prove it + (load "testfile-ftype4.so") + (ftype-pointer? ftype4-A (make-ftype-pointer ftype4-A 0))) + (begin ; twice for that warm fuzzy feeling + (load "testfile-ftype4.so") + (ftype-pointer? ftype4-B (make-ftype-pointer ftype4-B 0))) + (begin + (mkfile "testfile-ftype5.ss" + '(define-ftype + [ftype5-A (struct [q (* ftype4-A)])])) + (compile-file "testfile-ftype5") + #t) + (begin + (load "testfile-ftype5.so") + (ftype-pointer? ftype5-A (make-ftype-pointer ftype5-A 0))) ) (mat ftype-bits diff --git a/newrelease b/newrelease index 54072cfeae..d03c0df509 100755 --- a/newrelease +++ b/newrelease @@ -76,15 +76,15 @@ if ($status != 0) exit 1 cd $W /bin/rm bintar/Makefile -sed -e "s/^v = .*/v = $R/" ../bintar/Makefile > bintar/Makefile +sed -e "s/^version = .*/version = $R/" ../bintar/Makefile > bintar/Makefile set updatedfiles = ($updatedfiles bintar/Makefile) /bin/rm rpm/Makefile -sed -e "s/^v = .*/v = $R/" ../rpm/Makefile > rpm/Makefile +sed -e "s/^version = .*/version = $R/" ../rpm/Makefile > rpm/Makefile set updatedfiles = ($updatedfiles rpm/Makefile) /bin/rm pkg/Makefile -sed -e "s/^v = .*/v = $R/" ../pkg/Makefile > pkg/Makefile +sed -e "s/^version = .*/version = $R/" ../pkg/Makefile > pkg/Makefile set updatedfiles = ($updatedfiles pkg/Makefile) /bin/rm -f BUILDING @@ -105,7 +105,9 @@ sed -e "s/csug[0-9]\.[0-9]/csug$MR.$mR/" -e "s/csug[0-9]_[0-9]/csug$MR""_$mR/" . set updatedfiles = ($updatedfiles makefiles/Mf-install.in makefiles/Makefile-csug.in) /bin/rm scheme.1.in -sed -e "s/Chez Scheme Version [0-9]\.[0-9]\(\.[0-9]\)*/Chez Scheme Version $R/" ../scheme.1.in > scheme.1.in +sed -e "s/Chez Scheme Version [0-9]\.[0-9]\(\.[0-9]\)* .* [0-9][0-9]*/Chez Scheme Version $R `date +'%B %Y'`/" \ + -e "s/Copyright .* Cisco Systems, Inc./Copyright `date +%Y` Cisco Systems, Inc./" \ + ../scheme.1.in > scheme.1.in set updatedfiles = ($updatedfiles scheme.1.in) /bin/rm -f c/Makefile.{,t}{i3,a6}nt @@ -147,8 +149,12 @@ sed -e "s/thisversion{Version [^ ]*}/thisversion{Version $R}/" ../release_notes/ set updatedfiles = ($updatedfiles release_notes/release_notes.stex) mkdir csug -sed -e "s/Revised\(.*\)for Chez Scheme Version [^ ]*\./Revised\1for Chez Scheme Version $R./" ../csug/copyright.stex > csug/copyright.stex -sed -e "s/Revised\(.*\)for Chez Scheme Version [^ ]*
/Revised\1for Chez Scheme Version $R
/" ../csug/csug.stex > csug/csug.stex +sed -e "s/Revised\(.*\)for Chez Scheme Version [^ ]*\./Revised\1for Chez Scheme Version $R./" \ + -e "s/n\\copyright~ .* Cisco Systems, Inc./n\\copyright~`date +%Y` Cisco Systems, Inc./" \ + ../csug/copyright.stex > csug/copyright.stex +sed -e "s/Revised\(.*\)for Chez Scheme Version [^ ]*
/Revised\1for Chez Scheme Version $R
/" \ + -e "s/nCopyright © .* Cisco Systems, Inc./nCopyright \© `date +%Y` Cisco Systems, Inc./" \ + ../csug/csug.stex > csug/csug.stex set updatedfiles = ($updatedfiles csug/copyright.stex csug/csug.stex) /bin/rm -f rpm/Makefile diff --git a/pkg/Makefile b/pkg/Makefile index c1eb108170..771d8ccdf5 100644 --- a/pkg/Makefile +++ b/pkg/Makefile @@ -14,7 +14,7 @@ # limitations under the License. m := $(shell find ../bin/* -type d | xargs basename) -version = 9.5.1 +version = 9.5.2 release = 1 DOTUSER = $(shell ls -ld . | sed -e 's/[^ ]* *[^ ]* *\([^ ]*\).*/\1/') diff --git a/release_notes/release_notes.stex b/release_notes/release_notes.stex index d7cbc9d59f..192725f068 100644 --- a/release_notes/release_notes.stex +++ b/release_notes/release_notes.stex @@ -1,6 +1,6 @@ \documentclass{releasenotes} -\thisversion{Version 9.5.1} +\thisversion{Version 9.5.2} \thatversion{Version 8.4} \pubmonth{January} \pubyear{2019} @@ -1663,6 +1663,27 @@ in fasl files does not generally make sense. %----------------------------------------------------------------------------- \section{Bug Fixes}\label{section:bugfixes} +\subsection{Fasl representation change for recursive ftypes (9.5.2)} + +A bug in the reading of mutually recursive ftype definitions from +compiled files has been fixed. +The bug was triggered by recursive ftype definitions in which one +of the mutually recursive ftypes is a subtype of another, as in: + +\schemedisplay +(define-ftype + [A (* B)] + [B (struct [h A])])) +\endschemedisplay + +It manifested in the fasl reader raising bogus "incompatible record +type" exceptions when two or more references to one of the ftypes +occur in in separate compiled files or in separate top-level forms +of a file compiled via \scheme{compile-file}. +The bug could also have affected other record-type descriptors with +cycles involving parent rtds and ``extra'' fields as well as fasl +output created via \scheme{fasl-write}. + \subsection{Unbound object resulting from libraries combined with \protect\scheme{compile-whole-library} (9.5.1)} A bug in \scheme{compile-whole-library} that allowed the invoke code for a diff --git a/rpm/Makefile b/rpm/Makefile index 2b661b37a5..4d36324a5a 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -version = 9.5.1 +version = 9.5.2 release = 1 m := $(shell find ../bin/* -type d | xargs basename) arch := $(shell if test "$(m)" == "i3le" ; then echo i686 ; elif test "$(m)" == "a6le" ; then echo x86_64 ; else echo UNKNOWN ; fi) diff --git a/s/7.ss b/s/7.ss index ab0ed35726..3f2792748b 100644 --- a/s/7.ss +++ b/s/7.ss @@ -658,7 +658,7 @@ (define $scheme-greeting (lambda () - (format "~a\nCopyright 1984-2017 Cisco Systems, Inc.\n" + (format "~a\nCopyright 1984-2019 Cisco Systems, Inc.\n" (scheme-version)))) (define $session-key #f) diff --git a/s/cmacros.ss b/s/cmacros.ss index d4b1e1b4a3..88f6c65403 100644 --- a/s/cmacros.ss +++ b/s/cmacros.ss @@ -328,7 +328,7 @@ [(_ foo e1 e2) e1] ... [(_ bar e1 e2) e2]))))]))) -(define-constant scheme-version #x00090501) +(define-constant scheme-version #x00090502) (define-syntax define-machine-types (lambda (x) diff --git a/s/fasl.ss b/s/fasl.ss index be4eaefd86..3f13a7f33c 100644 --- a/s/fasl.ss +++ b/s/fasl.ss @@ -68,6 +68,9 @@ (define bld-record (lambda (x t a?) (unless (eq? x #!base-rtd) + (when (record-type-descriptor? x) + ; fasl representation for record-type-descriptor includes uid separately and as part of the record + (bld (record-type-uid x) t a?)) (really-bld-record x t a?)))) (define really-bld-record @@ -423,6 +426,7 @@ (cond [(record-type-descriptor? x) (put-u8 p (constant fasl-type-rtd)) + (wrf (record-type-uid x) p t a?) (wrf-fields (maybe-remake-rtd x) p t a?)] [else (put-u8 p (constant fasl-type-record)) diff --git a/s/strip.ss b/s/strip.ss index feab33f259..f9fae08cdc 100644 --- a/s/strip.ss +++ b/s/strip.ss @@ -28,7 +28,7 @@ (vector ty vfasl) (fxvector ty viptr) (bytevector ty bv) - (record ty size nflds rtd pad-ty* fld*) + (record maybe-uid size nflds rtd pad-ty* fld*) ; maybe-uid => rtd (closure offset c) (flonum high low) (small-integer iptr) @@ -172,6 +172,13 @@ (vector-set! v i (let ([key (read-fasl p g)]) (cons key (read-fasl p g)))))))) + (define (read-record p g maybe-uid) + (let* ([size (read-uptr p)] [nflds (read-uptr p)] [rtd (read-fasl p g)]) + (let loop ([n nflds] [rpad-ty* '()] [rfld* '()]) + (if (fx= n 0) + (fasl-record maybe-uid size nflds rtd (reverse rpad-ty*) (reverse rfld*)) + (let* ([pad-ty (read-byte p)] [fld (read-fld p g (fxlogand pad-ty #x0f))]) + (loop (fx- n 1) (cons pad-ty rpad-ty*) (cons fld rfld*))))))) (define (read-fasl p g) (let ([ty (read-byte p)]) (fasl-type-case ty @@ -202,13 +209,8 @@ ((fx= i n) bv) (bytevector-u8-set! bv i (read-byte p))))))] [(fasl-type-base-rtd) (fasl-tuple ty '#())] - [(fasl-type-rtd fasl-type-record) - (let* ([size (read-uptr p)] [nflds (read-uptr p)] [rtd (read-fasl p g)]) - (let loop ([n nflds] [rpad-ty* '()] [rfld* '()]) - (if (fx= n 0) - (fasl-record ty size nflds rtd (reverse rpad-ty*) (reverse rfld*)) - (let* ([pad-ty (read-byte p)] [fld (read-fld p g (fxlogand pad-ty #x0f))]) - (loop (fx- n 1) (cons pad-ty rpad-ty*) (cons fld rfld*))))))] + [(fasl-type-rtd) (read-record p g (read-fasl p g))] + [(fasl-type-record) (read-record p g #f)] [(fasl-type-closure) (let* ([offset (read-uptr p)] [c (read-fasl p g)]) @@ -326,9 +328,9 @@ (define fasl-record? (lambda (uname x) (fasl-case (follow-indirect x) - [record (ty size nflds rtd pad-ty* fld*) + [record (maybe-uid size nflds rtd pad-ty* fld*) (fasl-case (follow-indirect rtd) - [record (rtd-ty rtd-size rtd-nflds rtd-rtd rtd-pad-ty* rtd-fld*) + [record (rtd-uid rtd-size rtd-nflds rtd-rtd rtd-pad-ty* rtd-fld*) (and (> (length rtd-fld*) uid-index) (field-case (list-ref rtd-fld* uid-index) [ptr (fasl) @@ -351,7 +353,7 @@ (unless (fasl-record? uname x) (sorry! "unexpected type of object ~s" x)) (fasl-case (follow-indirect x) - [record (ty size nflds rtd pad-ty* fld*) + [record (maybe-uid size nflds rtd pad-ty* fld*) (unless (> (length fld*) index) (sorry! "fewer fields than expected for ~s" x)) (let ([fld (list-ref fld* index)]) @@ -401,11 +403,12 @@ [vector (ty vfasl) (build-graph! x t (build-vfasl! vfasl))] [fxvector (ty viptr) (build-graph! x t void)] [bytevector (ty viptr) (build-graph! x t void)] - [record (ty size nflds rtd pad-ty* fld*) + [record (maybe-uid size nflds rtd pad-ty* fld*) (if (and strip-source-annotations? (fasl-annotation? x)) (build! (fasl-annotation-stripped x) t) (build-graph! x t (lambda () + (when maybe-uid (build! maybe-uid t)) (build! rtd t) (for-each (lambda (fld) (field-case fld @@ -538,12 +541,16 @@ (write-byte p ty) (write-uptr p (bytevector-length bv)) (put-bytevector p bv)))] - [record (ty size nflds rtd pad-ty* fld*) + [record (maybe-uid size nflds rtd pad-ty* fld*) (if (and strip-source-annotations? (fasl-annotation? x)) (write-fasl p t (fasl-annotation-stripped x)) (write-graph p t x (lambda () - (write-byte p ty) + (if maybe-uid + (begin + (write-byte p (constant fasl-type-rtd)) + (write-fasl p t maybe-uid)) + (write-byte p (constant fasl-type-record))) (write-uptr p size) (write-uptr p nflds) (write-fasl p t rtd) @@ -695,14 +702,14 @@ (fasl-case x [closure (offset c) #t] [revisit (fasl) #t] - [record (ty size nflds rtd pad-ty* fld*) (revisit-record? x)] + [record (maybe-uid size nflds rtd pad-ty* fld*) (revisit-record? x)] [else #f]))) (fasl-case x [entry (fasl) (fasl-case fasl [closure (offset c) x] [revisit (fasl) x] - [record (ty size nflds rtd pad-ty* fld*) (and (revisit-record? fasl) x)] + [record (maybe-uid size nflds rtd pad-ty* fld*) (and (revisit-record? fasl) x)] [group (vfasl) (let ([fasl* (filter revisit-stuff? (vector->list vfasl))]) (and (not (null? fasl*)) @@ -831,8 +838,10 @@ [vector (ty vfasl) (and (eqv? ty1 ty2) (vandmap fasl=? vfasl1 vfasl2))] [fxvector (ty viptr) (and (eqv? ty1 ty2) (vandmap = viptr1 viptr2))] [bytevector (ty bv) (and (eqv? ty1 ty2) (bytevector=? bv1 bv2))] - [record (ty size nflds rtd pad-ty* fld*) - (and (eqv? ty1 ty2) + [record (maybe-uid size nflds rtd pad-ty* fld*) + (and (if maybe-uid1 + (and maybe-uid2 (fasl=? maybe-uid1 maybe-uid2)) + (not maybe-uid2)) (eqv? size1 size2) (eqv? nflds1 nflds2) (fasl=? rtd1 rtd2) diff --git a/scheme.1.in b/scheme.1.in index 69191eb21b..3dab1faafa 100644 --- a/scheme.1.in +++ b/scheme.1.in @@ -3,7 +3,7 @@ .if t .ds c caf\o'\'e' .if n .ds c cafe .ds ]W -.TH SCHEME 1 "Chez Scheme Version 9.5.1 October 2017" +.TH SCHEME 1 "Chez Scheme Version 9.5.2 March 2019" .SH NAME \fIChez Scheme\fP .br @@ -791,6 +791,6 @@ Second Edition\fP, MIT press (1996). .in -5 .SH AUTHOR -Copyright 2017 Cisco Systems, Inc. +Copyright 2019 Cisco Systems, Inc. Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) diff --git a/wininstall/Makefile b/wininstall/Makefile old mode 100755 new mode 100644 index 9cfb2bdd14..38ba0d66f8 --- a/wininstall/Makefile +++ b/wininstall/Makefile @@ -1,4 +1,4 @@ -VERSION := 9.5.1 +VERSION := 9.5.2 WIXEXTENSIONS := -ext WixUIExtension -ext WixBalExtension ChezScheme.exe: x86/bundle.wixobj ChezScheme32.msi ChezScheme64.msi diff --git a/wininstall/a6nt.wxs b/wininstall/a6nt.wxs old mode 100755 new mode 100644 index 221693e0a6..7914da8a42 --- a/wininstall/a6nt.wxs +++ b/wininstall/a6nt.wxs @@ -4,16 +4,16 @@ - + - + - + - + @@ -40,10 +40,10 @@ - + - + diff --git a/wininstall/i3nt.wxs b/wininstall/i3nt.wxs old mode 100755 new mode 100644 index bc63d1a740..9e13a99f00 --- a/wininstall/i3nt.wxs +++ b/wininstall/i3nt.wxs @@ -4,16 +4,16 @@ - + - + - + - + @@ -40,10 +40,10 @@ - + - + diff --git a/wininstall/ta6nt.wxs b/wininstall/ta6nt.wxs old mode 100755 new mode 100644 index bc65071096..3463b00bed --- a/wininstall/ta6nt.wxs +++ b/wininstall/ta6nt.wxs @@ -4,16 +4,16 @@ - + - + - + - + @@ -40,10 +40,10 @@ - + - + diff --git a/wininstall/ti3nt.wxs b/wininstall/ti3nt.wxs old mode 100755 new mode 100644 index 3ca3ede5f0..fffad58bfb --- a/wininstall/ti3nt.wxs +++ b/wininstall/ti3nt.wxs @@ -4,16 +4,16 @@ - + - + - + - + @@ -40,10 +40,10 @@ - + - + diff --git a/workarea b/workarea index 995fd21aec..5c6e452485 100755 --- a/workarea +++ b/workarea @@ -200,8 +200,8 @@ case $M in *nt) (cd $W/boot/$M; workln ../../../boot/$M/mainmd.obj mainmd.obj) (cd $W/boot/$M; workln ../../../boot/$M/mainmt.obj mainmt.obj) - (cd $W/boot/$M; workln ../../../boot/$M/csv951md.lib csv951md.lib) - (cd $W/boot/$M; workln ../../../boot/$M/csv951mt.lib csv951mt.lib) + (cd $W/boot/$M; workln ../../../boot/$M/csv952md.lib csv952md.lib) + (cd $W/boot/$M; workln ../../../boot/$M/csv952mt.lib csv952mt.lib) (cd $W/boot/$M; workln ../../../boot/$M/scheme.res scheme.res) ;; *) @@ -216,8 +216,8 @@ case $M in *nt) (cd $W/bin/$M; workln ../../../bin/$M/scheme.exe scheme.exe) (cd $W/bin/$M; forceworkln2 scheme.exe petite.exe) - (cd $W/bin/$M; workln ../../../bin/$M/csv951.dll csv951.dll) - (cd $W/bin/$M; workln ../../../bin/$M/csv951.lib csv951.lib) + (cd $W/bin/$M; workln ../../../bin/$M/csv952.dll csv952.dll) + (cd $W/bin/$M; workln ../../../bin/$M/csv952.lib csv952.lib) ;; *) (cd $W/bin/$M; workln ../../../bin/$M/scheme scheme) From 04e299d33fffec8fb7919262b1090125a8f9677d Mon Sep 17 00:00:00 2001 From: dyb Date: Thu, 21 Mar 2019 15:05:24 -0700 Subject: [PATCH 03/12] missed one change in bintar/Makefile newrelease bintar/Makefile original commit: c9037e5f79545b7530fd8d21db9c8148e809e7b7 --- bintar/Makefile | 4 ++-- newrelease | 26 ++++++++++---------------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/bintar/Makefile b/bintar/Makefile index 14d3933b2f..9acaa7f149 100644 --- a/bintar/Makefile +++ b/bintar/Makefile @@ -61,7 +61,7 @@ $(R)/boot: $(R) ( cd $(R)/boot/$(m) ; ln -s ../../../../boot/$(m)/{scheme.h,petite.boot,scheme.boot} . ) case $(m) in \ *nt) \ - ( cd $R/boot/$(m) ; ln -s ../../../../boot/$(m)/{csv951md.lib,csv951mt.lib,mainmd.obj,mainmt.obj,scheme.res} . ) \ + ( cd $R/boot/$(m) ; ln -s ../../../../boot/$(m)/{csv952md.lib,csv952mt.lib,mainmd.obj,mainmt.obj,scheme.res} . ) \ ;; \ *) \ ( cd $R/boot/$(m) ; ln -s ../../../../boot/$(m)/{main.o,kernel.o} . ) \ @@ -72,7 +72,7 @@ $(R)/bin: $(R) mkdir -p $(R)/bin/$(m) case $(m) in \ *nt) \ - ( cd $R/bin/$(m) ; ln -s ../../../../bin/$(m)/{scheme.exe,csv951.dll,csv951.lib,vcruntime140.lib} . ) \ + ( cd $R/bin/$(m) ; ln -s ../../../../bin/$(m)/{scheme.exe,csv952.dll,csv952.lib,vcruntime140.lib} . ) \ ;; \ *) \ ( cd $R/bin/$(m) ; ln -s ../../../../bin/$(m)/scheme . ) \ diff --git a/newrelease b/newrelease index d03c0df509..a54b0a011f 100755 --- a/newrelease +++ b/newrelease @@ -75,18 +75,6 @@ if ($status != 0) exit 1 cd $W -/bin/rm bintar/Makefile -sed -e "s/^version = .*/version = $R/" ../bintar/Makefile > bintar/Makefile -set updatedfiles = ($updatedfiles bintar/Makefile) - -/bin/rm rpm/Makefile -sed -e "s/^version = .*/version = $R/" ../rpm/Makefile > rpm/Makefile -set updatedfiles = ($updatedfiles rpm/Makefile) - -/bin/rm pkg/Makefile -sed -e "s/^version = .*/version = $R/" ../pkg/Makefile > pkg/Makefile -set updatedfiles = ($updatedfiles pkg/Makefile) - /bin/rm -f BUILDING sed -e "s/Chez Scheme Version [^ ]*/Chez Scheme Version $R/" \ -e "s/Copyright 1984-.... /Copyright 1984-`date +%Y` /" \ @@ -157,12 +145,18 @@ sed -e "s/Revised\(.*\)for Chez Scheme Version [^ ]*
/Revised\1for Chez Schem ../csug/csug.stex > csug/csug.stex set updatedfiles = ($updatedfiles csug/copyright.stex csug/csug.stex) -/bin/rm -f rpm/Makefile -sed -e "s/^v = .*/v = $R/" ../rpm/Makefile > rpm/Makefile +/bin/rm bintar/Makefile +sed -e "s/^version = .*/version = $R/" \ + -e "s/csv[0-9][0-9][0-9]*/csv$ZR/g" \ + ../bintar/Makefile > bintar/Makefile +set updatedfiles = ($updatedfiles bintar/Makefile) + +/bin/rm rpm/Makefile +sed -e "s/^version = .*/version = $R/" ../rpm/Makefile > rpm/Makefile set updatedfiles = ($updatedfiles rpm/Makefile) -/bin/rm -f pkg/Makefile -sed -e "s/^v = .*/v = $R/" ../pkg/Makefile > pkg/Makefile +/bin/rm pkg/Makefile +sed -e "s/^version = .*/version = $R/" ../pkg/Makefile > pkg/Makefile set updatedfiles = ($updatedfiles pkg/Makefile) mkdir wininstall From 46608ff1f116713f3b4ade8fb4d162d72329ac48 Mon Sep 17 00:00:00 2001 From: dyb Date: Thu, 21 Mar 2019 15:07:39 -0700 Subject: [PATCH 04/12] Now opening 9.5.3 release. Intent is to formally release 9.5.2 (and possibly all and only even-numbered releases going forward) and use 9.5.3 (and possibly all and only odd-numbered releases going forward) for development. original commit: 47110f36cea47a44078b3144c82d212de79774ce --- BUILDING | 2 +- LOG | 11 +++++++++++ NOTICE | 2 +- bintar/Makefile | 6 +++--- c/Makefile.a6nt | 10 +++++----- c/Makefile.i3nt | 10 +++++----- c/Makefile.ta6nt | 10 +++++----- c/Makefile.ti3nt | 10 +++++----- c/scheme.rc | 10 +++++----- csug/copyright.stex | 2 +- csug/csug.stex | 2 +- makefiles/Mf-install.in | 2 +- mats/Mf-a6nt | 2 +- mats/Mf-i3nt | 2 +- mats/Mf-ta6nt | 2 +- mats/Mf-ti3nt | 2 +- pkg/Makefile | 2 +- release_notes/release_notes.stex | 2 +- rpm/Makefile | 2 +- s/cmacros.ss | 2 +- scheme.1.in | 2 +- wininstall/Makefile | 2 +- wininstall/a6nt.wxs | 12 ++++++------ wininstall/i3nt.wxs | 12 ++++++------ wininstall/ta6nt.wxs | 12 ++++++------ wininstall/ti3nt.wxs | 12 ++++++------ workarea | 8 ++++---- 27 files changed, 82 insertions(+), 71 deletions(-) diff --git a/BUILDING b/BUILDING index 07d0a78805..24533337c7 100644 --- a/BUILDING +++ b/BUILDING @@ -1,4 +1,4 @@ -Building Chez Scheme Version 9.5.2 +Building Chez Scheme Version 9.5.3 Copyright 1984-2019 Cisco Systems, Inc. Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/LOG b/LOG index 5c0ea61dbe..7b9a1ae62d 100644 --- a/LOG +++ b/LOG @@ -1232,3 +1232,14 @@ fasl.c, ftype.ms, release_notes.stex + +9.5.3 changes: +- updated version to 9.5.3 + BUILDING NOTICE makefiles/Mf-install.in makefiles/Makefile-csug.in + scheme.1.in c/Makefile.a6nt c/Makefile.i3nt c/Makefile.ta6nt + c/Makefile.ti3nt mats/Mf-a6nt mats/Mf-i3nt mats/Mf-ta6nt + mats/Mf-ti3nt workarea c/scheme.rc s/7.ss s/cmacros.ss + release_notes/release_notes.stex csug/copyright.stex csug/csug.stex + bintar/Makefile rpm/Makefile pkg/Makefile wininstall/Makefile + wininstall/a6nt.wxs wininstall/i3nt.wxs wininstall/ta6nt.wxs + wininstall/ti3nt.wxs diff --git a/NOTICE b/NOTICE index 386eeb28d4..a2067d8388 100644 --- a/NOTICE +++ b/NOTICE @@ -1,4 +1,4 @@ -Chez Scheme Version 9.5.2 +Chez Scheme Version 9.5.3 Copyright 1984-2019 Cisco Systems, Inc. This product includes code developed by Cisco Systems, Inc. diff --git a/bintar/Makefile b/bintar/Makefile index 9acaa7f149..e88788fb32 100644 --- a/bintar/Makefile +++ b/bintar/Makefile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -version = 9.5.2 +version = 9.5.3 m := $(shell find ../bin/* -type d | xargs basename) R = csv$(version) @@ -61,7 +61,7 @@ $(R)/boot: $(R) ( cd $(R)/boot/$(m) ; ln -s ../../../../boot/$(m)/{scheme.h,petite.boot,scheme.boot} . ) case $(m) in \ *nt) \ - ( cd $R/boot/$(m) ; ln -s ../../../../boot/$(m)/{csv952md.lib,csv952mt.lib,mainmd.obj,mainmt.obj,scheme.res} . ) \ + ( cd $R/boot/$(m) ; ln -s ../../../../boot/$(m)/{csv953md.lib,csv953mt.lib,mainmd.obj,mainmt.obj,scheme.res} . ) \ ;; \ *) \ ( cd $R/boot/$(m) ; ln -s ../../../../boot/$(m)/{main.o,kernel.o} . ) \ @@ -72,7 +72,7 @@ $(R)/bin: $(R) mkdir -p $(R)/bin/$(m) case $(m) in \ *nt) \ - ( cd $R/bin/$(m) ; ln -s ../../../../bin/$(m)/{scheme.exe,csv952.dll,csv952.lib,vcruntime140.lib} . ) \ + ( cd $R/bin/$(m) ; ln -s ../../../../bin/$(m)/{scheme.exe,csv953.dll,csv953.lib,vcruntime140.lib} . ) \ ;; \ *) \ ( cd $R/bin/$(m) ; ln -s ../../../../bin/$(m)/scheme . ) \ diff --git a/c/Makefile.a6nt b/c/Makefile.a6nt index 79eedfcf43..ef09f5db5c 100644 --- a/c/Makefile.a6nt +++ b/c/Makefile.a6nt @@ -17,11 +17,11 @@ m = a6nt # following have to use \ for directory separator SchemeInclude = ..\boot\$m -KernelDll = ..\bin\$m\csv952.dll -KernelLib = ..\bin\$m\csv952.lib -MTKernelLib = ..\boot\$m\csv952mt.lib -MDKernelLib = ..\boot\$m\csv952md.lib -KernelExp = ..\bin\$m\csv952.exp +KernelDll = ..\bin\$m\csv953.dll +KernelLib = ..\bin\$m\csv953.lib +MTKernelLib = ..\boot\$m\csv953mt.lib +MDKernelLib = ..\boot\$m\csv953md.lib +KernelExp = ..\bin\$m\csv953.exp Exec = ..\bin\$m\scheme.exe MTMain = ..\boot\$m\mainmt.obj MDMain = ..\boot\$m\mainmd.obj diff --git a/c/Makefile.i3nt b/c/Makefile.i3nt index 4a91a815a7..448984e7eb 100644 --- a/c/Makefile.i3nt +++ b/c/Makefile.i3nt @@ -17,11 +17,11 @@ m = i3nt # following have to use \ for directory separator SchemeInclude = ..\boot\$m -KernelDll = ..\bin\$m\csv952.dll -KernelLib = ..\bin\$m\csv952.lib -MTKernelLib = ..\boot\$m\csv952mt.lib -MDKernelLib = ..\boot\$m\csv952md.lib -KernelExp = ..\bin\$m\csv952.exp +KernelDll = ..\bin\$m\csv953.dll +KernelLib = ..\bin\$m\csv953.lib +MTKernelLib = ..\boot\$m\csv953mt.lib +MDKernelLib = ..\boot\$m\csv953md.lib +KernelExp = ..\bin\$m\csv953.exp Exec = ..\bin\$m\scheme.exe MTMain = ..\boot\$m\mainmt.obj MDMain = ..\boot\$m\mainmd.obj diff --git a/c/Makefile.ta6nt b/c/Makefile.ta6nt index 9a6617551f..c9258d983d 100644 --- a/c/Makefile.ta6nt +++ b/c/Makefile.ta6nt @@ -17,11 +17,11 @@ m = ta6nt # following have to use \ for directory separator SchemeInclude = ..\boot\$m -KernelDll = ..\bin\$m\csv952.dll -KernelLib = ..\bin\$m\csv952.lib -MTKernelLib = ..\boot\$m\csv952mt.lib -MDKernelLib = ..\boot\$m\csv952md.lib -KernelExp = ..\bin\$m\csv952.exp +KernelDll = ..\bin\$m\csv953.dll +KernelLib = ..\bin\$m\csv953.lib +MTKernelLib = ..\boot\$m\csv953mt.lib +MDKernelLib = ..\boot\$m\csv953md.lib +KernelExp = ..\bin\$m\csv953.exp Exec = ..\bin\$m\scheme.exe MTMain = ..\boot\$m\mainmt.obj MDMain = ..\boot\$m\mainmd.obj diff --git a/c/Makefile.ti3nt b/c/Makefile.ti3nt index bcf9cd433e..2cbb2c715f 100644 --- a/c/Makefile.ti3nt +++ b/c/Makefile.ti3nt @@ -17,11 +17,11 @@ m = ti3nt # following have to use \ for directory separator SchemeInclude = ..\boot\$m -KernelDll = ..\bin\$m\csv952.dll -KernelLib = ..\bin\$m\csv952.lib -MTKernelLib = ..\boot\$m\csv952mt.lib -MDKernelLib = ..\boot\$m\csv952md.lib -KernelExp = ..\bin\$m\csv952.exp +KernelDll = ..\bin\$m\csv953.dll +KernelLib = ..\bin\$m\csv953.lib +MTKernelLib = ..\boot\$m\csv953mt.lib +MDKernelLib = ..\boot\$m\csv953md.lib +KernelExp = ..\bin\$m\csv953.exp Exec = ..\bin\$m\scheme.exe MTMain = ..\boot\$m\mainmt.obj MDMain = ..\boot\$m\mainmd.obj diff --git a/c/scheme.rc b/c/scheme.rc index 3c31db7892..9f63ef0133 100644 --- a/c/scheme.rc +++ b/c/scheme.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 9,5,2,0 - PRODUCTVERSION 9,5,2,0 + FILEVERSION 9,5,3,0 + PRODUCTVERSION 9,5,3,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS VOS__WINDOWS32 @@ -12,13 +12,13 @@ VS_VERSION_INFO VERSIONINFO BLOCK "StringFileInfo" { BLOCK "04090000" { VALUE "CompanyName", "Cisco Systems, Inc." - VALUE "FileDescription", "Chez Scheme Version 9.5.2" - VALUE "FileVersion", "9.5.2" + VALUE "FileDescription", "Chez Scheme Version 9.5.3" + VALUE "FileVersion", "9.5.3" VALUE "InternalName", "scheme.exe" VALUE "LegalCopyright", "Copyright 1984-2019 Cisco Systems, Inc. Licensed under the Apache License, Version 2.0." VALUE "OriginalFilename", "scheme.exe" VALUE "ProductName", "Chez Scheme" - VALUE "ProductVersion", "9.5.2" + VALUE "ProductVersion", "9.5.3" } } BLOCK "VarFileInfo" { diff --git a/csug/copyright.stex b/csug/copyright.stex index 583e8868a2..c75637f587 100644 --- a/csug/copyright.stex +++ b/csug/copyright.stex @@ -22,7 +22,7 @@ Licensed under the Apache License Version 2.0\\ http://www.apache.org/licenses/LICENSE-2.0 % NB: also update corresponding notice in csug.stex -Revised \revisiondate~for Chez Scheme Version 9.5.2. +Revised \revisiondate~for Chez Scheme Version 9.5.3. \medskip\noindent Cisco and the Cisco logo are trademarks or registered trademarks diff --git a/csug/csug.stex b/csug/csug.stex index bcd9d7d37b..0fec9041da 100644 --- a/csug/csug.stex +++ b/csug/csug.stex @@ -63,7 +63,7 @@ Copyright © 2019 Cisco Systems, Inc.
Licensed under the Apache License Version 2.0 (full copyright notice.).
-Revised} \revisiondate\raw{ for Chez Scheme Version 9.5.2
+Revised} \revisiondate\raw{ for Chez Scheme Version 9.5.3
about this book }} diff --git a/makefiles/Mf-install.in b/makefiles/Mf-install.in index 6ea9aaaca0..0e1f51838c 100644 --- a/makefiles/Mf-install.in +++ b/makefiles/Mf-install.in @@ -55,7 +55,7 @@ InstallScriptName=scheme-script # no changes should be needed below this point # ############################################################################### -Version=csv9.5.2 +Version=csv9.5.3 Include=boot/$m PetiteBoot=boot/$m/petite.boot SchemeBoot=boot/$m/scheme.boot diff --git a/mats/Mf-a6nt b/mats/Mf-a6nt index 0244275180..74ca208c14 100644 --- a/mats/Mf-a6nt +++ b/mats/Mf-a6nt @@ -22,7 +22,7 @@ mdclean = cat_flush.exe cat_flush.obj foreign1.exp foreign1.lib foreign1.obj for include Mf-base foreign1.so: $(fsrc) - cmd.exe /c "vs.bat amd64 && cl /DWIN32 /DX86_64 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv952.lib $(fsrc)" + cmd.exe /c "vs.bat amd64 && cl /DWIN32 /DX86_64 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv953.lib $(fsrc)" cat_flush: cat_flush.c cmd.exe /c "vs.bat amd64 && cl /DWIN32 /DX86_64 /MD /nologo $<" diff --git a/mats/Mf-i3nt b/mats/Mf-i3nt index d807e0a8b3..3c8da577f1 100644 --- a/mats/Mf-i3nt +++ b/mats/Mf-i3nt @@ -22,7 +22,7 @@ mdclean = cat_flush.exe cat_flush.obj foreign1.exp foreign1.lib foreign1.obj for include Mf-base foreign1.so: $(fsrc) - cmd.exe /c "vs.bat x86 && cl /DWIN32 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv952.lib $(fsrc)" + cmd.exe /c "vs.bat x86 && cl /DWIN32 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv953.lib $(fsrc)" cat_flush: cat_flush.c cmd.exe /c "vs.bat x86 && cl /DWIN32 /MD /nologo $<" diff --git a/mats/Mf-ta6nt b/mats/Mf-ta6nt index 5bf797ff8e..23f65694b0 100644 --- a/mats/Mf-ta6nt +++ b/mats/Mf-ta6nt @@ -22,7 +22,7 @@ mdclean = cat_flush.exe cat_flush.obj foreign1.exp foreign1.lib foreign1.obj for include Mf-base foreign1.so: $(fsrc) - cmd.exe /c "vs.bat amd64 && cl /DWIN32 /DX86_64 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv952.lib $(fsrc)" + cmd.exe /c "vs.bat amd64 && cl /DWIN32 /DX86_64 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv953.lib $(fsrc)" cat_flush: cat_flush.c cmd.exe /c "vs.bat amd64 && cl /DWIN32 /DX86_64 /MD /nologo $<" diff --git a/mats/Mf-ti3nt b/mats/Mf-ti3nt index ab582e3faf..3c7e300574 100644 --- a/mats/Mf-ti3nt +++ b/mats/Mf-ti3nt @@ -22,7 +22,7 @@ mdclean = cat_flush.exe cat_flush.obj foreign1.exp foreign1.lib foreign1.obj for include Mf-base foreign1.so: $(fsrc) - cmd.exe /c "vs.bat x86 && cl /DWIN32 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv952.lib $(fsrc)" + cmd.exe /c "vs.bat x86 && cl /DWIN32 /Fe$@ /I${Include} /LD /MD /nologo ../bin/$m/csv953.lib $(fsrc)" cat_flush: cat_flush.c cmd.exe /c "vs.bat x86 && cl /DWIN32 /MD /nologo $<" diff --git a/pkg/Makefile b/pkg/Makefile index 771d8ccdf5..33b77f7a65 100644 --- a/pkg/Makefile +++ b/pkg/Makefile @@ -14,7 +14,7 @@ # limitations under the License. m := $(shell find ../bin/* -type d | xargs basename) -version = 9.5.2 +version = 9.5.3 release = 1 DOTUSER = $(shell ls -ld . | sed -e 's/[^ ]* *[^ ]* *\([^ ]*\).*/\1/') diff --git a/release_notes/release_notes.stex b/release_notes/release_notes.stex index 192725f068..4727ac2e39 100644 --- a/release_notes/release_notes.stex +++ b/release_notes/release_notes.stex @@ -1,6 +1,6 @@ \documentclass{releasenotes} -\thisversion{Version 9.5.2} +\thisversion{Version 9.5.3} \thatversion{Version 8.4} \pubmonth{January} \pubyear{2019} diff --git a/rpm/Makefile b/rpm/Makefile index 4d36324a5a..901358bcdd 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -version = 9.5.2 +version = 9.5.3 release = 1 m := $(shell find ../bin/* -type d | xargs basename) arch := $(shell if test "$(m)" == "i3le" ; then echo i686 ; elif test "$(m)" == "a6le" ; then echo x86_64 ; else echo UNKNOWN ; fi) diff --git a/s/cmacros.ss b/s/cmacros.ss index 88f6c65403..20be35ac5a 100644 --- a/s/cmacros.ss +++ b/s/cmacros.ss @@ -328,7 +328,7 @@ [(_ foo e1 e2) e1] ... [(_ bar e1 e2) e2]))))]))) -(define-constant scheme-version #x00090502) +(define-constant scheme-version #x00090503) (define-syntax define-machine-types (lambda (x) diff --git a/scheme.1.in b/scheme.1.in index 3dab1faafa..5c69518c38 100644 --- a/scheme.1.in +++ b/scheme.1.in @@ -3,7 +3,7 @@ .if t .ds c caf\o'\'e' .if n .ds c cafe .ds ]W -.TH SCHEME 1 "Chez Scheme Version 9.5.2 March 2019" +.TH SCHEME 1 "Chez Scheme Version 9.5.3 March 2019" .SH NAME \fIChez Scheme\fP .br diff --git a/wininstall/Makefile b/wininstall/Makefile index 38ba0d66f8..0b23a4313e 100644 --- a/wininstall/Makefile +++ b/wininstall/Makefile @@ -1,4 +1,4 @@ -VERSION := 9.5.2 +VERSION := 9.5.3 WIXEXTENSIONS := -ext WixUIExtension -ext WixBalExtension ChezScheme.exe: x86/bundle.wixobj ChezScheme32.msi ChezScheme64.msi diff --git a/wininstall/a6nt.wxs b/wininstall/a6nt.wxs index 7914da8a42..6dd2e69396 100644 --- a/wininstall/a6nt.wxs +++ b/wininstall/a6nt.wxs @@ -4,16 +4,16 @@ - + - + - + - + @@ -40,10 +40,10 @@ - + - + diff --git a/wininstall/i3nt.wxs b/wininstall/i3nt.wxs index 9e13a99f00..945c5ef287 100644 --- a/wininstall/i3nt.wxs +++ b/wininstall/i3nt.wxs @@ -4,16 +4,16 @@ - + - + - + - + @@ -40,10 +40,10 @@ - + - + diff --git a/wininstall/ta6nt.wxs b/wininstall/ta6nt.wxs index 3463b00bed..19c315cf56 100644 --- a/wininstall/ta6nt.wxs +++ b/wininstall/ta6nt.wxs @@ -4,16 +4,16 @@ - + - + - + - + @@ -40,10 +40,10 @@ - + - + diff --git a/wininstall/ti3nt.wxs b/wininstall/ti3nt.wxs index fffad58bfb..1773f066d5 100644 --- a/wininstall/ti3nt.wxs +++ b/wininstall/ti3nt.wxs @@ -4,16 +4,16 @@ - + - + - + - + @@ -40,10 +40,10 @@ - + - + diff --git a/workarea b/workarea index 5c6e452485..11cf2c7b10 100755 --- a/workarea +++ b/workarea @@ -200,8 +200,8 @@ case $M in *nt) (cd $W/boot/$M; workln ../../../boot/$M/mainmd.obj mainmd.obj) (cd $W/boot/$M; workln ../../../boot/$M/mainmt.obj mainmt.obj) - (cd $W/boot/$M; workln ../../../boot/$M/csv952md.lib csv952md.lib) - (cd $W/boot/$M; workln ../../../boot/$M/csv952mt.lib csv952mt.lib) + (cd $W/boot/$M; workln ../../../boot/$M/csv953md.lib csv953md.lib) + (cd $W/boot/$M; workln ../../../boot/$M/csv953mt.lib csv953mt.lib) (cd $W/boot/$M; workln ../../../boot/$M/scheme.res scheme.res) ;; *) @@ -216,8 +216,8 @@ case $M in *nt) (cd $W/bin/$M; workln ../../../bin/$M/scheme.exe scheme.exe) (cd $W/bin/$M; forceworkln2 scheme.exe petite.exe) - (cd $W/bin/$M; workln ../../../bin/$M/csv952.dll csv952.dll) - (cd $W/bin/$M; workln ../../../bin/$M/csv952.lib csv952.lib) + (cd $W/bin/$M; workln ../../../bin/$M/csv953.dll csv953.dll) + (cd $W/bin/$M; workln ../../../bin/$M/csv953.lib csv953.lib) ;; *) (cd $W/bin/$M; workln ../../../bin/$M/scheme scheme) From 3761d229a1d5bf125d56ad2d71b8c18e5b6d5ee9 Mon Sep 17 00:00:00 2001 From: dyb Date: Thu, 21 Mar 2019 15:54:12 -0700 Subject: [PATCH 05/12] updated month original commit: 87f59b35b61441a29a67dc8eb83cdd6fc5aa421e --- release_notes/release_notes.stex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_notes/release_notes.stex b/release_notes/release_notes.stex index 4727ac2e39..cbf849f6f2 100644 --- a/release_notes/release_notes.stex +++ b/release_notes/release_notes.stex @@ -2,7 +2,7 @@ \thisversion{Version 9.5.3} \thatversion{Version 8.4} -\pubmonth{January} +\pubmonth{March} \pubyear{2019} \begin{document} From 21043fb9509a4406afd7b0f29ac7208936ce5a47 Mon Sep 17 00:00:00 2001 From: Bob Burger Date: Mon, 25 Mar 2019 11:54:24 -0400 Subject: [PATCH 06/12] fixed welcome text and copyright year in macOS package original commit: 30076521c9216a8978f0b3c1369c74d28404418a --- LOG | 2 ++ newrelease | 4 +++- pkg/Makefile | 5 ++--- release_notes/release_notes.stex | 5 +++++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/LOG b/LOG index 7b9a1ae62d..9855bef2a8 100644 --- a/LOG +++ b/LOG @@ -1243,3 +1243,5 @@ bintar/Makefile rpm/Makefile pkg/Makefile wininstall/Makefile wininstall/a6nt.wxs wininstall/i3nt.wxs wininstall/ta6nt.wxs wininstall/ti3nt.wxs +- fixed welcome text and copyright year in macOS package + newrelease pkg/Makefile release_notes.stex diff --git a/newrelease b/newrelease index a54b0a011f..35f1d00d38 100755 --- a/newrelease +++ b/newrelease @@ -156,7 +156,9 @@ sed -e "s/^version = .*/version = $R/" ../rpm/Makefile > rpm/Makefile set updatedfiles = ($updatedfiles rpm/Makefile) /bin/rm pkg/Makefile -sed -e "s/^version = .*/version = $R/" ../pkg/Makefile > pkg/Makefile +sed -e "s/^version = .*/version = $R/" \ + -e "s/© .* Cisco Systems/\© `date +%Y` Cisco Systems/" \ + ../pkg/Makefile > pkg/Makefile set updatedfiles = ($updatedfiles pkg/Makefile) mkdir wininstall diff --git a/pkg/Makefile b/pkg/Makefile index 33b77f7a65..4f5f1c54d3 100644 --- a/pkg/Makefile +++ b/pkg/Makefile @@ -75,10 +75,9 @@ $(BUILDROOT)/Distribution: $(BUILDROOT) chmod 644 $(BUILDROOT)/Distribution $(BUILDROOT)/Resources/en.lproj/Welcome.html: $(BUILDROOT)/Resources/en.lproj - echo 'cat << EOF > $(RESOURCES)/en.lproj/Welcome.html' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html - echo '' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html + echo '' > $(BUILDROOT)/Resources/en.lproj/Welcome.html echo '

Chez Scheme Version $(version)

' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html - echo '

Copyright (c) 2017 Cisco Systems, Inc.

' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html + echo '

Copyright © 2019 Cisco Systems, Inc.

' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html echo '

Chez Scheme is a programming language and an implementation of that language, with supporting tools and documentation.

' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html echo '' >> $(BUILDROOT)/Resources/en.lproj/Welcome.html chmod 644 $(BUILDROOT)/Resources/en.lproj/Welcome.html diff --git a/release_notes/release_notes.stex b/release_notes/release_notes.stex index cbf849f6f2..0fab89a585 100644 --- a/release_notes/release_notes.stex +++ b/release_notes/release_notes.stex @@ -1663,6 +1663,11 @@ in fasl files does not generally make sense. %----------------------------------------------------------------------------- \section{Bug Fixes}\label{section:bugfixes} +\subsection{Welcome text in macOS package file (9.5.2)} + +The welcome text and copyright year in the macOS package file was +corrected. + \subsection{Fasl representation change for recursive ftypes (9.5.2)} A bug in the reading of mutually recursive ftype definitions from From 19b130e41cf3eecc5e57b08f605e59d67998d352 Mon Sep 17 00:00:00 2001 From: Bob Burger Date: Tue, 26 Mar 2019 14:16:54 -0400 Subject: [PATCH 07/12] update Windows spin-loop count for deleting files and directories original commit: b597e161fcb8c5ebb8f7f8e1aa27b2f136c13064 --- LOG | 2 ++ c/windows.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/LOG b/LOG index 9855bef2a8..73c3349d87 100644 --- a/LOG +++ b/LOG @@ -1245,3 +1245,5 @@ wininstall/ti3nt.wxs - fixed welcome text and copyright year in macOS package newrelease pkg/Makefile release_notes.stex +- update Windows spin-loop count for deleting files and directories + windows.c diff --git a/c/windows.c b/c/windows.c index 53c4b2c9d8..1dac846529 100644 --- a/c/windows.c +++ b/c/windows.c @@ -386,7 +386,7 @@ int S_windows_rmdir(const char *pathname) { if (!(rc = _wrmdir(wpathname))) { // Spin loop until Windows deletes the directory. int n; - for (n = 100; n > 0; n--) { + for (n = 1000; n > 0; n--) { if (_wrmdir(wpathname) && (errno == ENOENT)) break; } return 0; @@ -420,7 +420,7 @@ int S_windows_unlink(const char *pathname) { if (!(rc = _wunlink(wpathname))) { // Spin loop until Windows deletes the file. int n; - for (n = 100; n > 0; n--) { + for (n = 1000; n > 0; n--) { if (_wunlink(wpathname) && (errno == ENOENT)) break; } return 0; From bb67d6ff01b75f578de68e1f266924dd27cac1e6 Mon Sep 17 00:00:00 2001 From: Oscar Waddell Date: Mon, 18 Mar 2019 14:54:46 -0400 Subject: [PATCH 08/12] install a file containing revision control information alongside boot files original commit: ed4ca6123eae4c347e9ee240a34e42dbc695aea2 --- LOG | 4 ++++ bintar/Makefile | 2 +- makefiles/Mf-install.in | 2 ++ s/.gitattributes | 1 + s/Mf-base | 11 ++++++++--- s/update-revision | 22 ++++++++++++++++++++++ wininstall/a6nt.wxs | 4 ++++ wininstall/i3nt.wxs | 4 ++++ wininstall/ta6nt.wxs | 4 ++++ wininstall/ti3nt.wxs | 4 ++++ 10 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 s/.gitattributes create mode 100755 s/update-revision diff --git a/LOG b/LOG index 73c3349d87..24107c1467 100644 --- a/LOG +++ b/LOG @@ -1247,3 +1247,7 @@ newrelease pkg/Makefile release_notes.stex - update Windows spin-loop count for deleting files and directories windows.c +- install a file containing revision information alongside boot files; + embed git revision in exported source archives + bintar/Makefile Mf-install.in wininstall/*nt.wxs + s/Mf-base s/.gitattributes s/update-revision diff --git a/bintar/Makefile b/bintar/Makefile index e88788fb32..046ab70c10 100644 --- a/bintar/Makefile +++ b/bintar/Makefile @@ -58,7 +58,7 @@ $(R)/examples: $(R) $(R)/boot: $(R) mkdir -p $(R)/boot/$(m) - ( cd $(R)/boot/$(m) ; ln -s ../../../../boot/$(m)/{scheme.h,petite.boot,scheme.boot} . ) + ( cd $(R)/boot/$(m) ; ln -s ../../../../boot/$(m)/{scheme.h,petite.boot,scheme.boot,revision} . ) case $(m) in \ *nt) \ ( cd $R/boot/$(m) ; ln -s ../../../../boot/$(m)/{csv953md.lib,csv953mt.lib,mainmd.obj,mainmt.obj,scheme.res} . ) \ diff --git a/makefiles/Mf-install.in b/makefiles/Mf-install.in index 0e1f51838c..a175284da3 100644 --- a/makefiles/Mf-install.in +++ b/makefiles/Mf-install.in @@ -59,6 +59,7 @@ Version=csv9.5.3 Include=boot/$m PetiteBoot=boot/$m/petite.boot SchemeBoot=boot/$m/scheme.boot +Revision=boot/$m/revision Scheme=bin/$m/scheme Petite=bin/$m/petite InstallLibExamples=${InstallLib}/${Version}/examples @@ -118,6 +119,7 @@ libbininstall: ${LibBin} $I -m 444 ${Include}/kernel.o ${LibBin} $I -m 444 ${Include}/main.o ${LibBin} $I -m 444 ${Include}/scheme.h ${LibBin} + $I -m 444 ${Revision} ${LibBin}/revision maninstall: scheme.1 petite.1 ${Man} $I -m 444 scheme.1 ${Man}/${InstallSchemeName}.1 diff --git a/s/.gitattributes b/s/.gitattributes new file mode 100644 index 0000000000..25bdb21245 --- /dev/null +++ b/s/.gitattributes @@ -0,0 +1 @@ +update-revision export-subst diff --git a/s/Mf-base b/s/Mf-base index 11a2a32de3..4c6a101fb4 100644 --- a/s/Mf-base +++ b/s/Mf-base @@ -97,6 +97,7 @@ PetiteBoot = ../boot/$m/petite.boot SchemeBoot = ../boot/$m/scheme.boot Cheader = ../boot/$m/scheme.h Cequates = ../boot/$m/equates.h +Revision = ../boot/$m/revision # The following controls the patch files loaded before compiling, typically used only # to load a new compiler for cross compilation @@ -152,11 +153,11 @@ allsrc =\ np-languages.ss # doit uses a different Scheme process to compile each target -doit: ${PetiteBoot} ${SchemeBoot} ${Cheader} ${Cequates} +doit: ${PetiteBoot} ${SchemeBoot} ${Cheader} ${Cequates} ${Revision} # all uses a single Scheme process to compile all targets. this is typically # faster when most of the targets need to be recompiled. -all: bootall ${Cheader} ${Cequates} +all: bootall ${Cheader} ${Cequates} ${Revision} # allx runs all up to three times and checks to see if the new boot file is the # same as the last, i.e., the system is properly bootstrapped. @@ -177,7 +178,7 @@ ifneq ($(OS),Windows_NT) endif # bootstrap runs allx if any sources have changed since the last bootstrap -bootstrap: ${allsrc} +bootstrap: ${allsrc} | ${Revision} $(MAKE) allx touch bootstrap @@ -516,6 +517,10 @@ ${Cequates}: mkheader.so ${macroobj} nanopass.so base-lang.ss expand-lang.ss pri then mv -f ${Cequates}.bak ${Cequates};\ else rm -f ${Cequates}.bak; fi) +.PHONY: ${Revision} +${Revision}: update-revision + @./update-revision > ${Revision} + examples: ( cd ../examples && ${MAKE} all Scheme="${Scheme} ../s/${patchfile}" ) diff --git a/s/update-revision b/s/update-revision new file mode 100755 index 0000000000..0b6e3f6ed0 --- /dev/null +++ b/s/update-revision @@ -0,0 +1,22 @@ +#!/bin/bash +if [ -d ../../.git ]; then + git describe --always --exclude='*' --abbrev=40 --dirty + echo 'git' +elif [ -d ../../.hg ]; then + DIRTY="$(hg status -n --color never --pager never | head -1)" + hg log --limit 1 --template '{node}' --pager never + if [ -n "${DIRTY}" ]; then + echo '-dirty' + else + echo '' + fi + echo 'hg' +elif [ -f ../../.hg_archival.txt ]; then + # hg archive and hgweb embed this file by default (see .hgrc archivemeta) + sed -n 's/^node: \(.*\)/\1/p' < ../../.hg_archival.txt + echo 'hg' +else + # use export-subst git attribute to populate revision for git archive + echo '$Format:%H$' + echo 'git' +fi diff --git a/wininstall/a6nt.wxs b/wininstall/a6nt.wxs index 6dd2e69396..c1d6cc28eb 100644 --- a/wininstall/a6nt.wxs +++ b/wininstall/a6nt.wxs @@ -63,6 +63,9 @@ + + + @@ -82,6 +85,7 @@ + diff --git a/wininstall/i3nt.wxs b/wininstall/i3nt.wxs index 945c5ef287..a530b092fe 100644 --- a/wininstall/i3nt.wxs +++ b/wininstall/i3nt.wxs @@ -63,6 +63,9 @@ + + + @@ -82,6 +85,7 @@ + diff --git a/wininstall/ta6nt.wxs b/wininstall/ta6nt.wxs index 19c315cf56..f137baa657 100644 --- a/wininstall/ta6nt.wxs +++ b/wininstall/ta6nt.wxs @@ -63,6 +63,9 @@ + + + @@ -82,6 +85,7 @@ + diff --git a/wininstall/ti3nt.wxs b/wininstall/ti3nt.wxs index 1773f066d5..3c65019ef5 100644 --- a/wininstall/ti3nt.wxs +++ b/wininstall/ti3nt.wxs @@ -63,6 +63,9 @@ + + + @@ -84,6 +87,7 @@ + From b8d6d649bcf077b6f13d816d0c0da8e8afe64150 Mon Sep 17 00:00:00 2001 From: Oscar Waddell Date: Mon, 18 Mar 2019 15:00:57 -0400 Subject: [PATCH 09/12] ignore multiple-value return from interleaved init expressions in top-level-program original commit: f5fd9d144b68af26244855c7c2f34be97298deea --- LOG | 3 +++ mats/8.ms | 12 ++++++++++++ s/syntax.ss | 3 ++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/LOG b/LOG index 24107c1467..e87c0236a4 100644 --- a/LOG +++ b/LOG @@ -1251,3 +1251,6 @@ embed git revision in exported source archives bintar/Makefile Mf-install.in wininstall/*nt.wxs s/Mf-base s/.gitattributes s/update-revision +- ignore multiple-value return from interleaved init expressions in + top-level-program + syntax.ss, 8.ms diff --git a/mats/8.ms b/mats/8.ms index 9df4853d42..08efa6a475 100644 --- a/mats/8.ms +++ b/mats/8.ms @@ -10715,6 +10715,18 @@ (remprop 'tlp-spam 'spam) (remprop 'tlp-spam 'tlp) #t)) + ; make sure we ignore return value(s) of interleaved init expressions + (equal? + (with-output-to-string + (lambda () + ; prevent cp0 from fixing the problem + (parameterize ([run-cp0 (lambda (f x) x)]) + (eval '(top-level-program (import (scheme)) + (define (f) (printf "hello\n") (values 1 2 3)) + (f) + (define x 'world) + (pretty-print x)))))) + "hello\nworld\n") ) (mat library-meta diff --git a/s/syntax.ss b/s/syntax.ss index a52f0b9ec9..b803364004 100644 --- a/s/syntax.ss +++ b/s/syntax.ss @@ -2830,7 +2830,8 @@ [interleaved-init (frob) (process-bindings mb* r (cons (build-lexical-var no-source 't) dv*) - (cons frob de*))] + (cons (make-frob #`(begin #,(frob-e frob) (void)) (frob-meta? frob)) + de*))] [else (process-bindings mb* r dv* de*)])))))))) (define chi-top-module From bcf25a17fbf1d1e7492df01ca71494537a77ee97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9ssica=20Milar=C3=A9?= Date: Wed, 3 Apr 2019 10:36:54 -0300 Subject: [PATCH 10/12] Mutexes and condition variables with names (#380) add name fields for mutexes and condition variables, now `make-mutex` and `make-condition` accept an optional argument `name`, which must be a symbol or #f. The name, if not #f, is printed every time the object is printed, which is useful for debugging. original commit: 1397e173200d1697ed714d24fc2eb4767421b976 --- LOG | 6 ++++ csug/threads.stex | 12 +++++++ mats/thread.ms | 11 ++++++- release_notes/release_notes.stex | 8 +++++ s/primdata.ss | 6 ++-- s/prims.ss | 56 ++++++++++++++++++++++++-------- s/print.ss | 26 ++++++++++++--- 7 files changed, 104 insertions(+), 21 deletions(-) diff --git a/LOG b/LOG index e87c0236a4..dd16d4da29 100644 --- a/LOG +++ b/LOG @@ -1254,3 +1254,9 @@ - ignore multiple-value return from interleaved init expressions in top-level-program syntax.ss, 8.ms +- add name fields for mutexes and condition variables, now `make-mutex` and + `make-condition` accept an optional argument `name`, which must be a + symbol or #f. The name, if not #f, is printed every time the object is + printed, which is useful for debugging + primdata.ss prims.ss print.ss + thread.ms threads.stex diff --git a/csug/threads.stex b/csug/threads.stex index 3ab1413bba..8947efee64 100644 --- a/csug/threads.stex +++ b/csug/threads.stex @@ -123,10 +123,16 @@ in all threads. %---------------------------------------------------------------------------- \noskipentryheader \formdef{make-mutex}{\categoryprocedure}{(make-mutex)} +\formdef{make-mutex}{\categoryprocedure}{(make-mutex \var{name})} \returns a new mutex object \listlibraries \endnoskipentryheader +\noindent +\var{name}, if supplied, must be a symbol which identifies the mutex, or +\scheme{#f} for no name. The name is printed every time the mutex is +printed, which is useful for debugging. + %---------------------------------------------------------------------------- \entryheader \formdef{mutex?}{\categoryprocedure}{(mutex? \var{obj})} @@ -207,10 +213,16 @@ Using \scheme{with-mutex} is generally more convenient and safer than using %---------------------------------------------------------------------------- \noskipentryheader \formdef{make-condition}{\categoryprocedure}{(make-condition)} +\formdef{make-condition}{\categoryprocedure}{(make-condition \var{name})} \returns a new condition object \listlibraries \endnoskipentryheader +\noindent +\var{name}, if supplied, must be a symbol which identifies the condition +object, or \scheme{#f} for no name. The name is printed every time the +condition is printed, which is useful for debugging. + %---------------------------------------------------------------------------- \entryheader \formdef{thread-condition?}{\categoryprocedure}{(thread-condition? \var{obj})} diff --git a/mats/thread.ms b/mats/thread.ms index 3f1a4a9fbb..23d1b90060 100644 --- a/mats/thread.ms +++ b/mats/thread.ms @@ -82,11 +82,20 @@ (when-threaded (mat thread - (let ([m (make-mutex)] [c (make-condition)]) + (let ([m (make-mutex)] [c (make-condition)] + [m2 (make-mutex 'mname)] [c2 (make-condition 'cname)]) (and (mutex? m) (thread-condition? c) + (mutex? m2) + (thread-condition? c2) (not (mutex? c)) (not (thread-condition? m)) + (not (mutex? c2)) + (not (thread-condition? m2)) + (not (mutex-name m)) + (not (condition-name c)) + (eq? 'mname (mutex-name m2)) + (eq? 'cname (condition-name c2)) (not (mutex? 'mutex)) (not (thread-condition? 'condition)))) (begin diff --git a/release_notes/release_notes.stex b/release_notes/release_notes.stex index 0fab89a585..c884129401 100644 --- a/release_notes/release_notes.stex +++ b/release_notes/release_notes.stex @@ -58,6 +58,14 @@ Online versions of both books can be found at %----------------------------------------------------------------------------- \section{Functionality Changes}\label{section:functionality} +\subsection{Mutexes and condition variables can have names (9.5.3)} + +The procedures \scheme{make-mutex} and \scheme{make-condition} now +accept an optional argument \scheme{name}, which must be a symbol +that identifies the object or \scheme{f} for no name. The name is +printed every time the mutex or condition object is printed, which +is useful for debugging. + \subsection{Improved packaging support (9.5.1)} The Chez Scheme \scheme{Makefile} has been enhanced with new targets for diff --git a/s/primdata.ss b/s/primdata.ss index 34fbad63a1..0bad895066 100644 --- a/s/primdata.ss +++ b/s/primdata.ss @@ -1220,6 +1220,7 @@ (compute-size [sig [(ptr) -> (uint)] [(ptr sub-ufixnum) -> (uint)]] [flags alloc]) (condition-broadcast [feature pthreads] [sig [(condition-object) -> (void)]] [flags true]) (condition-continuation [sig [(continuation-condition) -> (ptr)]] [flags pure mifoldable discard]) + (condition-name [feature pthreads] [sig [(condition-object) -> (maybe-symbol)]] [flags pure]) (condition-signal [feature pthreads] [sig [(condition-object) -> (void)]] [flags true]) (condition-wait [feature pthreads] [sig [(condition-object mutex) (condition-object mutex timeout) -> (boolean)]] [flags]) (conjugate [sig [(number) -> (number)]] [flags arith-op mifoldable discard]) @@ -1429,7 +1430,7 @@ (make-boot-file [sig [(pathname sub-list pathname ...) -> (void)]] [flags true]) (make-boot-header [sig [(pathname pathname pathname ...) -> (void)]] [flags true]) (make-compile-time-value [sig [(ptr) -> (compile-time-value)]] [flags pure unrestricted alloc]) - (make-condition [feature pthreads] [sig [() -> (condition-object)]] [flags pure unrestricted alloc]) + (make-condition [feature pthreads] [sig [() (maybe-symbol) -> (condition-object)]] [flags pure unrestricted alloc]) (make-continuation-condition [sig [(ptr) -> (condition)]] [flags pure unrestricted mifoldable discard]) (make-cost-center [sig [() -> (cost-center)]] [flags unrestricted alloc]) (make-ephemeron-eq-hashtable [sig [() (uint) -> (eq-hashtable)]] [flags alloc]) @@ -1442,7 +1443,7 @@ (make-input-port [sig [(procedure string) -> (textual-input-port)]] [flags alloc]) (make-input/output-port [sig [(procedure string string) -> (textual-input/output-port)]] [flags alloc]) (make-list [sig [(length) (length ptr) -> (list)]] [flags alloc]) - (make-mutex [feature pthreads] [sig [() -> (mutex)]] [flags unrestricted alloc]) + (make-mutex [feature pthreads] [sig [() (maybe-symbol) -> (mutex)]] [flags unrestricted alloc]) (make-object-finder [sig [(procedure) (procedure ptr) (procedure ptr sub-ufixnum) -> (procedure)]] [flags alloc]) (make-output-port [sig [(procedure string) -> (textual-output-port)]] [flags alloc]) (make-parameter [sig [(ptr) (ptr procedure) -> (procedure)]] [flags true cp02 cp03]) @@ -1469,6 +1470,7 @@ (mutable-bytevector? [sig [(ptr) -> (boolean)]] [flags pure unrestricted mifoldable discard]) (mutable-vector? [sig [(ptr) -> (boolean)]] [flags pure unrestricted mifoldable discard]) (mutex-acquire [feature pthreads] [sig [(mutex) (mutex ptr) -> (ptr)]] [flags]) ; can return #f if optional block? arg is #f + (mutex-name [feature pthreads] [sig [(mutex) -> (maybe-symbol)]] [flags pure]) (mutex-release [feature pthreads] [sig [(mutex) -> (void)]] [flags true]) (mutex? [feature pthreads] [sig [(ptr) -> (boolean)]] [flags pure unrestricted mifoldable discard]) (new-cafe [sig [() (procedure) -> (ptr ...)]] [flags]) diff --git a/s/prims.ss b/s/prims.ss index 4adac96a68..03c97ded01 100644 --- a/s/prims.ss +++ b/s/prims.ss @@ -1484,10 +1484,12 @@ (define fork-thread) (define make-mutex) (define mutex?) +(define mutex-name) (define mutex-acquire) (define mutex-release) (define make-condition) (define thread-condition?) +(define condition-name) (define condition-wait) (define condition-signal) (define condition-broadcast) @@ -1512,15 +1514,29 @@ (define cs (foreign-procedure "(cs)condition_signal" (scheme-object) void)) (define-record-type (condition $make-condition $condition?) - (fields (mutable addr $condition-addr $condition-addr-set!)) + (fields (mutable addr $condition-addr $condition-addr-set!) + (immutable name $condition-name)) (nongenerative) (sealed #t)) (define-record-type (mutex $make-mutex $mutex?) - (fields (mutable addr $mutex-addr $mutex-addr-set!)) + (fields (mutable addr $mutex-addr $mutex-addr-set!) + (immutable name $mutex-name)) (nongenerative) (sealed #t)) +(define make-mutex-no-check + (lambda (name) + (let ([m ($make-mutex (mm) name)]) + (mutex-guardian m) + m))) + +(define make-condition-no-check + (lambda (name) + (let ([c ($make-condition (mc) name)]) + (condition-guardian c) + c))) + (define mutex-guardian (make-guardian)) (define condition-guardian (make-guardian)) @@ -1539,16 +1555,22 @@ (t) (void)))))))) -(set! make-mutex - (lambda () - (let ([m ($make-mutex (mm))]) - (mutex-guardian m) - m))) +(set-who! make-mutex + (case-lambda + [() (make-mutex-no-check #f)] + [(name) + (unless (or (not name) (symbol? name)) ($oops who "~s is not a symbol or #f" name)) + (make-mutex-no-check name)])) (set! mutex? (lambda (x) ($mutex? x))) +(set-who! mutex-name + (lambda (m) + (unless (mutex? m) ($oops who "~s is not a mutex" m)) + ($mutex-name m))) + (set! mutex-acquire (case-lambda [(m) (mutex-acquire m #t)] @@ -1571,16 +1593,22 @@ ($oops 'mutex-release "mutex is defunct")) (mr addr)))) -(set! make-condition - (lambda () - (let ([c ($make-condition (mc))]) - (condition-guardian c) - c))) +(set-who! make-condition + (case-lambda + [() (make-condition-no-check #f)] + [(name) + (unless (or (not name) (symbol? name)) ($oops who "~s is not a symbol or #f" name)) + (make-condition-no-check name)])) (set! thread-condition? (lambda (x) ($condition? x))) +(set-who! condition-name + (lambda (c) + (unless (thread-condition? c) ($oops who "~s is not a condition" c)) + ($condition-name c))) + (set! condition-wait (case-lambda [(c m) (condition-wait c m #f)] @@ -1640,8 +1668,8 @@ ($condition-addr-set! c 0))) (f)))))) -(set! $tc-mutex ($make-mutex ($raw-tc-mutex))) -(set! $collect-cond ($make-condition ($raw-collect-cond))) +(set! $tc-mutex ($make-mutex ($raw-tc-mutex) '$tc-mutex)) +(set! $collect-cond ($make-condition ($raw-collect-cond) '$collect-cond)) )) (let () diff --git a/s/print.ss b/s/print.ss index e56e855e1e..fe59260e48 100644 --- a/s/print.ss +++ b/s/print.ss @@ -592,10 +592,14 @@ floating point returns with (1 0 -1 ...). (if-feature pthreads (begin (define $condition? thread-condition?) - (define $mutex? mutex?)) + (define $condition-name condition-name) + (define $mutex? mutex?) + (define $mutex-name mutex-name)) (begin (define $condition? (lambda (x) #f)) - (define $mutex? (lambda (x) #f)))) + (define $condition-name (lambda (x) #f)) + (define $mutex? (lambda (x) #f)) + (define $mutex-name (lambda (x) #f)))) (cond [($immediate? x) (type-case x @@ -651,8 +655,22 @@ floating point returns with (1 0 -1 ...). [(bytevector?) (wrvector bytevector-length bytevector-u8-ref "vu8" x r lev len d? env p)] [(flonum?) (wrflonum #f x r d? p)] ; catch before record? case - [($condition?) (display-string "#" p)] - [($mutex?) (display-string "#" p)] + [($condition?) + (cond + (($condition-name x) => + (lambda (name) + (display-string "#string name) p) + (write-char #\> p))) + (else (display-string "#" p)))] + [($mutex?) + (cond + (($mutex-name x) => + (lambda (name) + (display-string "#string name) p) + (write-char #\> p))) + (else (display-string "#" p)))] [(base-rtd?) (display-string "#!base-rtd" p)] [($record?) (if (print-record) From e622a495b6f9d799358c30200c4dc9cd09df27fa Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 20 Mar 2019 08:48:07 -0600 Subject: [PATCH 11/12] Add LZ4 support and use it by default for compressing files original commit: 8858b34bd92ac8d2b6511dc9ca17ebfa06a1bd93 --- .gitmodules | 3 + LOG | 8 + c/Makefile.a6nt | 37 ++- c/Makefile.i3nt | 37 ++- c/Makefile.ta6nt | 37 ++- c/Makefile.ti3nt | 37 ++- c/Mf-a6fb | 11 +- c/Mf-a6le | 11 +- c/Mf-a6nb | 11 +- c/Mf-a6ob | 11 +- c/Mf-a6osx | 11 +- c/Mf-a6s2 | 11 +- c/Mf-arm32le | 9 +- c/Mf-base | 12 +- c/Mf-i3fb | 11 +- c/Mf-i3le | 11 +- c/Mf-i3nb | 11 +- c/Mf-i3ob | 11 +- c/Mf-i3osx | 11 +- c/Mf-i3qnx | 11 +- c/Mf-i3s2 | 11 +- c/Mf-ppc32le | 11 +- c/Mf-ta6fb | 11 +- c/Mf-ta6le | 11 +- c/Mf-ta6nb | 11 +- c/Mf-ta6ob | 11 +- c/Mf-ta6osx | 11 +- c/Mf-ta6s2 | 11 +- c/Mf-ti3fb | 11 +- c/Mf-ti3le | 11 +- c/Mf-ti3nb | 11 +- c/Mf-ti3ob | 11 +- c/Mf-ti3osx | 11 +- c/Mf-ti3s2 | 11 +- c/Mf-tppc32le | 11 +- c/compress-io.c | 498 +++++++++++++++++++++++++++++++ c/compress-io.h | 47 +++ c/expeditor.c | 1 + c/externs.h | 16 +- c/fasl.c | 12 +- c/new-io.c | 216 +++++++++----- c/scheme.c | 116 +++---- c/system.h | 2 +- configure | 45 ++- csug/io.stex | 41 ++- csug/objects.stex | 3 +- lz4 | 1 + mats/bytevector.ms | 1 + mats/io.ms | 2 + mats/mat.ss | 8 +- mats/patch-compile-0-f-t-f | 28 +- mats/patch-compile-0-t-f-f | 236 +++++++-------- mats/patch-interpret-0-f-f-f | 40 +-- mats/patch-interpret-0-f-t-f | 40 +-- mats/patch-interpret-3-f-f-f | 4 +- mats/patch-interpret-3-f-t-f | 4 +- mats/root-experr-compile-0-f-f-f | 12 + release_notes/release_notes.stex | 11 + s/back.ss | 8 + s/bytevector.ss | 35 ++- s/io.ss | 9 +- s/primdata.ss | 1 + workarea | 6 + 63 files changed, 1409 insertions(+), 511 deletions(-) create mode 100644 c/compress-io.c create mode 100644 c/compress-io.h create mode 160000 lz4 diff --git a/.gitmodules b/.gitmodules index 57a4e62df1..e69e19b82c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "stex"] path = stex url = https://github.com/dybvig/stex +[submodule "lz4"] + path = lz4 + url = https://github.com/lz4/lz4.git diff --git a/LOG b/LOG index dd16d4da29..127737423e 100644 --- a/LOG +++ b/LOG @@ -1260,3 +1260,11 @@ printed, which is useful for debugging primdata.ss prims.ss print.ss thread.ms threads.stex +- change the default compression mode to LZ4 and add a compress-format + parameter to select a compression format for output; input infers the + compression format + io.ss, bytevector.ss, back.ss, primdata.ss, + compress.c (new), new-io.c, fasl.c, scheme.c, compress.h (new), + externs.h, system.h, expeditor.c, configure, Mf-*, Makefile.*nt, + workarea, mat.ss, io.ms, io.stex, objects.stex, release_notes.stex, + root-experr*, patch* diff --git a/c/Makefile.a6nt b/c/Makefile.a6nt index ef09f5db5c..3784e9bcd0 100644 --- a/c/Makefile.a6nt +++ b/c/Makefile.a6nt @@ -28,7 +28,7 @@ MDMain = ..\boot\$m\mainmd.obj ResFile = ..\boot\$m\scheme.res # We use MD so that we can link with and load DLLs built against msvcrxxx.dll -CFLAGS=/nologo /Ox /W3 /Zi /I$(SchemeInclude) /I..\zlib /DUSE_ANSI_PROTOTYPES /DX86_64 /DWIN32 /D_CRT_SECURE_NO_WARNINGS +CFLAGS=/nologo /Ox /W3 /Zi /I$(SchemeInclude) /I..\zlib /I..\lz4\lib /DUSE_ANSI_PROTOTYPES /DX86_64 /DWIN32 /D_CRT_SECURE_NO_WARNINGS MDCFLAGS=$(CFLAGS) /MD MTCFLAGS=$(CFLAGS) /MT DLLLDFLAGS=/debug:full /machine:X64 /nologo @@ -37,27 +37,29 @@ DLLLDFLAGS=/debug:full /machine:X64 /nologo EXELDFLAGS=/debug:full /machine:X64 /incremental:no /nologo /STACK:0x1000000 # use following flags for debugging -# CFLAGS=/nologo /Od /W3 /Zi /I$(SchemeInclude) /I..\zlib /DUSE_ANSI_PROTOTYPES /DX86_64 /DWIN32 /D_CRT_SECURE_NO_WARNINGS +# CFLAGS=/nologo /Od /W3 /Zi /I$(SchemeInclude) /I..\zlib /I..\lz4\lib /DUSE_ANSI_PROTOTYPES /DX86_64 /DWIN32 /D_CRT_SECURE_NO_WARNINGS # MDCFLAGS=$(CFLAGS) /MDd # MTCFLAGS=$(CFLAGS) /MTd SystemLib=rpcrt4.lib ole32.lib advapi32.lib User32.lib MDZlibLib=..\zlib\zlib.lib MTZlibLib=..\zlib\zlibmt.lib +MDLZ4Lib=..\lz4\lib\liblz4.lib +MTLZ4Lib=..\lz4\lib\liblz4mt.lib csrc=statics.c segment.c alloc.c symbol.c intern.c gcwrapper.c gc-oce.c gc-ocd.c\ number.c schsig.c io.c new-io.c print.c fasl.c stats.c\ foreign.c prim.c prim5.c flushcache.c\ windows.c\ - schlib.c thread.c expeditor.c scheme.c + schlib.c thread.c expeditor.c scheme.c compress-io.c cobj=statics.obj segment.obj alloc.obj symbol.obj intern.obj gcwrapper.obj gc-oce.obj gc-ocd.obj\ number.obj schsig.obj io.obj new-io.obj print.obj fasl.obj stats.obj\ foreign.obj prim.obj prim5.obj flushcache.obj\ windows.obj\ - schlib.obj thread.obj expeditor.obj scheme.obj + schlib.obj thread.obj expeditor.obj scheme.obj compress-io.obj -hsrc=system.h types.h version.h globals.h externs.h segment.h gc.c thread.h sort.h itest.c +hsrc=system.h types.h version.h globals.h externs.h compress-io.h segment.h gc.c thread.h sort.h itest.c .SUFFIXES: @@ -66,16 +68,17 @@ all: $(Exec) $(MTKernelLib) $(MDKernelLib) $(MTMain) $(KernelLib) $(MTKernelLib) $(MDKernelLib): $(hsrc) $(KernelLib) $(MTKernelLib) $(MDKernelLib): $(SchemeInclude)/equates.h $(SchemeInclude)/scheme.h $(KernelLib) $(MTKernelLib) $(MDKernelLib): ..\zlib/zconf.h ..\zlib/zlib.h +$(KernelLib) $(MTKernelLib) $(MDKernelLib): ../lz4/lib/lz4.h ../lz4/lib/lz4frame.h -$(MTKernelLib): $(csrc) $(MTZlibLib) +$(MTKernelLib): $(csrc) $(MTZlibLib) $(MTLZ4Lib) -del /f $(MTKernelLib) cl /DSCHEME_STATIC /c $(MTCFLAGS) $(csrc) - link /lib /nologo -out:$(MTKernelLib) $(cobj) $(MTZlibLib) + link /lib /nologo -out:$(MTKernelLib) $(cobj) $(MTZlibLib) $(MTLZ4Lib) -$(MDKernelLib): $(csrc) $(MDZlibLib) +$(MDKernelLib): $(csrc) $(MDZlibLib) $(MDLZ4Lib) -del /f $(MDKernelLib) cl /DSCHEME_STATIC /c $(MDCFLAGS) $(csrc) - link /lib /nologo -out:$(MDKernelLib) $(cobj) $(MDZlibLib) + link /lib /nologo -out:$(MDKernelLib) $(cobj) $(MDZlibLib) $(MDLZ4Lib) # nmake builds Dll twice if we list it with $(KernelLib) below $(KernelDll): $(KernelLib) @@ -86,11 +89,11 @@ $(KernelDll): $(KernelLib) # conflicts with other dlls. use 'depends ' to check. # we no longer attempt to rebase other the CRT dll since it # has already been signed. -$(KernelLib): $(ResFile) $(csrc) $(MDZlibLib) +$(KernelLib): $(ResFile) $(csrc) $(MDZlibLib) $(MDLZ4Lib) -del /f $(KernelLib) -del /f $(KernelDll) cl /c $(MDCFLAGS) $(csrc) - link -dll -out:$(KernelDll) $(DLLLDFLAGS) $(ResFile) $(cobj) $(MDZlibLib) $(SystemLib) + link -dll -out:$(KernelDll) $(DLLLDFLAGS) $(ResFile) $(cobj) $(MDZlibLib) $(MDLZ4Lib) $(SystemLib) editbin /nologo /rebase:base=0x67480000 $(KernelDll) $(MTMain): main.c @@ -130,6 +133,18 @@ mdscheme.exe: $(ResFile) $(MDMain) $(MDKernelLib) nmake /nologo -f win32/Makefile.msc AR="link /lib" cd ../c +$(MDLZ4Lib) $(MTLZ4Lib): ../lz4/lib/lz4.c ../lz4/lib/lz4frame.c ../lz4/lib/lz4hc.c + cl /c /Fo../lz4/lib/lz4.obj $(MDCFLAGS) ../lz4/lib/lz4.c + cl /c /Fo../lz4/lib/lz4frame.obj $(MDCFLAGS) ../lz4/lib/lz4frame.c + cl /c /Fo../lz4/lib/lz4hc.obj $(MDCFLAGS) ../lz4/lib/lz4hc.c + cl /c /Fo../lz4/lib/xxhash.obj $(MDCFLAGS) ../lz4/lib/xxhash.c + lib /OUT:$(MDLZ4Lib) ../lz4/lib/lz4.obj ../lz4/lib/lz4frame.obj ../lz4/lib/lz4hc.obj ../lz4/lib/xxhash.obj + cl /c /Fo../lz4/lib/lz4mt.obj $(MTCFLAGS) ../lz4/lib/lz4.c + cl /c /Fo../lz4/lib/lz4framemt.obj $(MTCFLAGS) ../lz4/lib/lz4frame.c + cl /c /Fo../lz4/lib/lz4hcmt.obj $(MTCFLAGS) ../lz4/lib/lz4hc.c + cl /c /Fo../lz4/lib/xxhashmt.obj $(MTCFLAGS) ../lz4/lib/xxhash.c + lib /OUT:$(MTLZ4Lib) ../lz4/lib/lz4mt.obj ../lz4/lib/lz4framemt.obj ../lz4/lib/lz4hcmt.obj ../lz4/lib/xxhashmt.obj + clean: -del /f $(cobj) main.obj $(KernelExp) -del /f mtscheme.exe diff --git a/c/Makefile.i3nt b/c/Makefile.i3nt index 448984e7eb..4a941bc0b2 100644 --- a/c/Makefile.i3nt +++ b/c/Makefile.i3nt @@ -28,7 +28,7 @@ MDMain = ..\boot\$m\mainmd.obj ResFile = ..\boot\$m\scheme.res # We use MD so that we can link with and load DLLs built against msvcrxxx.dll -CFLAGS=/nologo /fp:precise /Ox /W3 /Zi /I$(SchemeInclude) /I..\zlib /DUSE_ANSI_PROTOTYPES /DI386 /DWIN32 /D_CRT_SECURE_NO_WARNINGS +CFLAGS=/nologo /fp:precise /Ox /W3 /Zi /I$(SchemeInclude) /I..\zlib /I..\lz4\lib /DUSE_ANSI_PROTOTYPES /DI386 /DWIN32 /D_CRT_SECURE_NO_WARNINGS MDCFLAGS=$(CFLAGS) /MD MTCFLAGS=$(CFLAGS) /MT DLLLDFLAGS=/debug:full /machine:ix86 /nologo @@ -36,27 +36,29 @@ DLLLDFLAGS=/debug:full /machine:ix86 /nologo EXELDFLAGS=/debug:full /machine:ix86 /incremental:no /nologo /STACK:0x800000 # use following flags for debugging -# CFLAGS=/nologo /fp:precise /Od /W3 /Zi /I$(SchemeInclude) /I..\zlib /DUSE_ANSI_PROTOTYPES /DI386 /DWIN32 /D_CRT_SECURE_NO_WARNINGS +# CFLAGS=/nologo /fp:precise /Od /W3 /Zi /I$(SchemeInclude) /I..\zlib /I..\lz4\lib /DUSE_ANSI_PROTOTYPES /DI386 /DWIN32 /D_CRT_SECURE_NO_WARNINGS # MDCFLAGS=$(CFLAGS) /MDd # MTCFLAGS=$(CFLAGS) /MTd SystemLib=rpcrt4.lib ole32.lib advapi32.lib User32.lib MDZlibLib=..\zlib\zlib.lib MTZlibLib=..\zlib\zlibmt.lib +MDLZ4Lib=..\lz4\lib\liblz4.lib +MTLZ4Lib=..\lz4\lib\liblz4mt.lib csrc=statics.c segment.c alloc.c symbol.c intern.c gcwrapper.c gc-oce.c gc-ocd.c\ number.c schsig.c io.c new-io.c print.c fasl.c stats.c\ foreign.c prim.c prim5.c flushcache.c\ windows.c\ - schlib.c thread.c expeditor.c scheme.c + schlib.c thread.c expeditor.c scheme.c compress-io.c cobj=statics.obj segment.obj alloc.obj symbol.obj intern.obj gcwrapper.obj gc-oce.obj gc-ocd.obj\ number.obj schsig.obj io.obj new-io.obj print.obj fasl.obj stats.obj\ foreign.obj prim.obj prim5.obj flushcache.obj\ windows.obj\ - schlib.obj thread.obj expeditor.obj scheme.obj + schlib.obj thread.obj expeditor.obj scheme.obj compress-io.obj -hsrc=system.h types.h version.h globals.h externs.h segment.h gc.c thread.h sort.h itest.c +hsrc=system.h types.h version.h globals.h externs.h compress-io.h segment.h gc.c thread.h sort.h itest.c .SUFFIXES: @@ -65,16 +67,17 @@ all: $(Exec) $(MTKernelLib) $(MDKernelLib) $(MTMain) $(KernelLib) $(MTKernelLib) $(MDKernelLib): $(hsrc) $(KernelLib) $(MTKernelLib) $(MDKernelLib): $(SchemeInclude)/equates.h $(SchemeInclude)/scheme.h $(KernelLib) $(MTKernelLib) $(MDKernelLib): ..\zlib/zconf.h ..\zlib/zlib.h +$(KernelLib) $(MTKernelLib) $(MDKernelLib): ../lz4/lib/lz4.h ../lz4/lib/lz4frame.h -$(MTKernelLib): $(csrc) $(MTZlibLib) +$(MTKernelLib): $(csrc) $(MTZlibLib) $(MTLZ4Lib) -del /f $(MTKernelLib) cl /DSCHEME_STATIC /c $(MTCFLAGS) $(csrc) - link /lib /nologo -out:$(MTKernelLib) $(cobj) $(MTZlibLib) + link /lib /nologo -out:$(MTKernelLib) $(cobj) $(MTZlibLib) $(MTLZ4Lib) -$(MDKernelLib): $(csrc) $(MDZlibLib) +$(MDKernelLib): $(csrc) $(MDZlibLib) $(MDLZ4Lib) -del /f $(MDKernelLib) cl /DSCHEME_STATIC /c $(MDCFLAGS) $(csrc) - link /lib /nologo -out:$(MDKernelLib) $(cobj) $(MDZlibLib) + link /lib /nologo -out:$(MDKernelLib) $(cobj) $(MDZlibLib) $(MDLZ4Lib) # nmake builds Dll twice if we list it with $(KernelLib) below $(KernelDll): $(KernelLib) @@ -85,11 +88,11 @@ $(KernelDll): $(KernelLib) # conflicts with other dlls. use 'depends ' to check. # we no longer attempt to rebase other the CRT dll since it # has already been signed. -$(KernelLib): $(ResFile) $(csrc) $(MDZlibLib) +$(KernelLib): $(ResFile) $(csrc) $(MDZlibLib) $(MDLZ4Lib) -del /f $(KernelLib) -del /f $(KernelDll) cl /c $(MDCFLAGS) $(csrc) - link -dll -out:$(KernelDll) $(DLLLDFLAGS) $(ResFile) $(cobj) $(MDZlibLib) $(SystemLib) + link -dll -out:$(KernelDll) $(DLLLDFLAGS) $(ResFile) $(cobj) $(MDZlibLib) $(MDLZ4Lib) $(SystemLib) editbin /nologo /rebase:base=0x67480000 $(KernelDll) $(MTMain): main.c @@ -129,6 +132,18 @@ mdscheme.exe: $(ResFile) $(MDMain) $(MDKernelLib) nmake /nologo -f win32/Makefile.msc AR="link /lib" cd ../c +$(MDLZ4Lib) $(MTLZ4Lib): ../lz4/lib/lz4.c ../lz4/lib/lz4frame.c ../lz4/lib/lz4hc.c + cl /c /Fo../lz4/lib/lz4.obj $(MDCFLAGS) ../lz4/lib/lz4.c + cl /c /Fo../lz4/lib/lz4frame.obj $(MDCFLAGS) ../lz4/lib/lz4frame.c + cl /c /Fo../lz4/lib/lz4hc.obj $(MDCFLAGS) ../lz4/lib/lz4hc.c + cl /c /Fo../lz4/lib/xxhash.obj $(MDCFLAGS) ../lz4/lib/xxhash.c + lib /OUT:$(MDLZ4Lib) ../lz4/lib/lz4.obj ../lz4/lib/lz4frame.obj ../lz4/lib/lz4hc.obj ../lz4/lib/xxhash.obj + cl /c /Fo../lz4/lib/lz4mt.obj $(MTCFLAGS) ../lz4/lib/lz4.c + cl /c /Fo../lz4/lib/lz4framemt.obj $(MTCFLAGS) ../lz4/lib/lz4frame.c + cl /c /Fo../lz4/lib/lz4hcmt.obj $(MTCFLAGS) ../lz4/lib/lz4hc.c + cl /c /Fo../lz4/lib/xxhashmt.obj $(MTCFLAGS) ../lz4/lib/xxhash.c + lib /OUT:$(MTLZ4Lib) ../lz4/lib/lz4mt.obj ../lz4/lib/lz4framemt.obj ../lz4/lib/lz4hcmt.obj ../lz4/lib/xxhashmt.obj + clean: -del /f $(cobj) main.obj $(KernelExp) -del /f mtscheme.exe diff --git a/c/Makefile.ta6nt b/c/Makefile.ta6nt index c9258d983d..ff91e5710c 100644 --- a/c/Makefile.ta6nt +++ b/c/Makefile.ta6nt @@ -28,7 +28,7 @@ MDMain = ..\boot\$m\mainmd.obj ResFile = ..\boot\$m\scheme.res # We use MD so that we can link with and load DLLs built against msvcrxxx.dll -CFLAGS=/nologo /Ox /W3 /Zi /I$(SchemeInclude) /I..\zlib /DUSE_ANSI_PROTOTYPES /DX86_64 /DWIN32 /D_CRT_SECURE_NO_WARNINGS +CFLAGS=/nologo /Ox /W3 /Zi /I$(SchemeInclude) /I..\zlib /I..\lz4\lib /DUSE_ANSI_PROTOTYPES /DX86_64 /DWIN32 /D_CRT_SECURE_NO_WARNINGS MDCFLAGS=$(CFLAGS) /MD MTCFLAGS=$(CFLAGS) /MT DLLLDFLAGS=/debug:full /machine:X64 /nologo @@ -37,27 +37,29 @@ DLLLDFLAGS=/debug:full /machine:X64 /nologo EXELDFLAGS=/debug:full /machine:X64 /incremental:no /nologo /STACK:0x1000000 # use following flags for debugging -# CFLAGS=/nologo /Od /W3 /Zi /I$(SchemeInclude) /I..\zlib /DUSE_ANSI_PROTOTYPES /DX86_64 /DWIN32 /D_CRT_SECURE_NO_WARNINGS +# CFLAGS=/nologo /Od /W3 /Zi /I$(SchemeInclude) /I..\zlib /I..\lz4\lib /DUSE_ANSI_PROTOTYPES /DX86_64 /DWIN32 /D_CRT_SECURE_NO_WARNINGS # MDCFLAGS=$(CFLAGS) /MDd # MTCFLAGS=$(CFLAGS) /MTd SystemLib=rpcrt4.lib ole32.lib advapi32.lib User32.lib MDZlibLib=..\zlib\zlib.lib MTZlibLib=..\zlib\zlibmt.lib +MDLZ4Lib=..\lz4\lib\liblz4.lib +MTLZ4Lib=..\lz4\lib\liblz4mt.lib csrc=statics.c segment.c alloc.c symbol.c intern.c gcwrapper.c gc-oce.c gc-ocd.c\ number.c schsig.c io.c new-io.c print.c fasl.c stats.c\ foreign.c prim.c prim5.c flushcache.c\ windows.c\ - schlib.c thread.c expeditor.c scheme.c + schlib.c thread.c expeditor.c scheme.c compress-io.c cobj=statics.obj segment.obj alloc.obj symbol.obj intern.obj gcwrapper.obj gc-oce.obj gc-ocd.obj\ number.obj schsig.obj io.obj new-io.obj print.obj fasl.obj stats.obj\ foreign.obj prim.obj prim5.obj flushcache.obj\ windows.obj\ - schlib.obj thread.obj expeditor.obj scheme.obj + schlib.obj thread.obj expeditor.obj scheme.obj compress-io.obj -hsrc=system.h types.h version.h globals.h externs.h segment.h gc.c thread.h sort.h itest.c +hsrc=system.h types.h version.h globals.h externs.h compress-io.h segment.h gc.c thread.h sort.h itest.c .SUFFIXES: @@ -66,16 +68,17 @@ all: $(Exec) $(MTKernelLib) $(MDKernelLib) $(MTMain) $(KernelLib) $(MTKernelLib) $(MDKernelLib): $(hsrc) $(KernelLib) $(MTKernelLib) $(MDKernelLib): $(SchemeInclude)/equates.h $(SchemeInclude)/scheme.h $(KernelLib) $(MTKernelLib) $(MDKernelLib): ..\zlib/zconf.h ..\zlib/zlib.h +$(KernelLib) $(MTKernelLib) $(MDKernelLib): ../lz4/lib/lz4.h ../lz4/lib/lz4frame.h -$(MTKernelLib): $(csrc) $(MTZlibLib) +$(MTKernelLib): $(csrc) $(MTZlibLib) $(MTLZ4Lib) -del /f $(MTKernelLib) cl /DSCHEME_STATIC /c $(MTCFLAGS) $(csrc) - link /lib /nologo -out:$(MTKernelLib) $(cobj) $(MTZlibLib) + link /lib /nologo -out:$(MTKernelLib) $(cobj) $(MTZlibLib) $(MTLZ4Lib) -$(MDKernelLib): $(csrc) $(MDZlibLib) +$(MDKernelLib): $(csrc) $(MDZlibLib) $(MDLZ4Lib) -del /f $(MDKernelLib) cl /DSCHEME_STATIC /c $(MDCFLAGS) $(csrc) - link /lib /nologo -out:$(MDKernelLib) $(cobj) $(MDZlibLib) + link /lib /nologo -out:$(MDKernelLib) $(cobj) $(MDZlibLib) $(MDLZ4Lib) # nmake builds Dll twice if we list it with $(KernelLib) below $(KernelDll): $(KernelLib) @@ -86,11 +89,11 @@ $(KernelDll): $(KernelLib) # conflicts with other dlls. use 'depends ' to check. # we no longer attempt to rebase other the CRT dll since it # has already been signed. -$(KernelLib): $(ResFile) $(csrc) $(MDZlibLib) +$(KernelLib): $(ResFile) $(csrc) $(MDZlibLib) $(MDLZ4Lib) -del /f $(KernelLib) -del /f $(KernelDll) cl /c $(MDCFLAGS) $(csrc) - link -dll -out:$(KernelDll) $(DLLLDFLAGS) $(ResFile) $(cobj) $(MDZlibLib) $(SystemLib) + link -dll -out:$(KernelDll) $(DLLLDFLAGS) $(ResFile) $(cobj) $(MDZlibLib) $(MDLZ4Lib) $(SystemLib) editbin /nologo /rebase:base=0x67480000 $(KernelDll) $(MTMain): main.c @@ -130,6 +133,18 @@ mdscheme.exe: $(ResFile) $(MDMain) $(MDKernelLib) nmake /nologo -f win32/Makefile.msc AR="link /lib" cd ../c +$(MDLZ4Lib) $(MTLZ4Lib): ../lz4/lib/lz4.c ../lz4/lib/lz4frame.c ../lz4/lib/lz4hc.c + cl /c /Fo../lz4/lib/lz4.obj $(MDCFLAGS) ../lz4/lib/lz4.c + cl /c /Fo../lz4/lib/lz4frame.obj $(MDCFLAGS) ../lz4/lib/lz4frame.c + cl /c /Fo../lz4/lib/lz4hc.obj $(MDCFLAGS) ../lz4/lib/lz4hc.c + cl /c /Fo../lz4/lib/xxhash.obj $(MDCFLAGS) ../lz4/lib/xxhash.c + lib /OUT:$(MDLZ4Lib) ../lz4/lib/lz4.obj ../lz4/lib/lz4frame.obj ../lz4/lib/lz4hc.obj ../lz4/lib/xxhash.obj + cl /c /Fo../lz4/lib/lz4mt.obj $(MTCFLAGS) ../lz4/lib/lz4.c + cl /c /Fo../lz4/lib/lz4framemt.obj $(MTCFLAGS) ../lz4/lib/lz4frame.c + cl /c /Fo../lz4/lib/lz4hcmt.obj $(MTCFLAGS) ../lz4/lib/lz4hc.c + cl /c /Fo../lz4/lib/xxhashmt.obj $(MTCFLAGS) ../lz4/lib/xxhash.c + lib /OUT:$(MTLZ4Lib) ../lz4/lib/lz4mt.obj ../lz4/lib/lz4framemt.obj ../lz4/lib/lz4hcmt.obj ../lz4/lib/xxhashmt.obj + clean: -del /f $(cobj) main.obj $(KernelExp) -del /f mtscheme.exe diff --git a/c/Makefile.ti3nt b/c/Makefile.ti3nt index 2cbb2c715f..cdf89f9323 100644 --- a/c/Makefile.ti3nt +++ b/c/Makefile.ti3nt @@ -28,7 +28,7 @@ MDMain = ..\boot\$m\mainmd.obj ResFile = ..\boot\$m\scheme.res # We use MD so that we can link with and load DLLs built against msvcrxxx.dll -CFLAGS=/nologo /fp:precise /Ox /W3 /Zi /I$(SchemeInclude) /I..\zlib /DUSE_ANSI_PROTOTYPES /DI386 /DWIN32 /D_CRT_SECURE_NO_WARNINGS +CFLAGS=/nologo /fp:precise /Ox /W3 /Zi /I$(SchemeInclude) /I..\zlib /I..\lz4\lib /DUSE_ANSI_PROTOTYPES /DI386 /DWIN32 /D_CRT_SECURE_NO_WARNINGS MDCFLAGS=$(CFLAGS) /MD MTCFLAGS=$(CFLAGS) /MT DLLLDFLAGS=/debug:full /machine:ix86 /nologo @@ -36,27 +36,29 @@ DLLLDFLAGS=/debug:full /machine:ix86 /nologo EXELDFLAGS=/debug:full /machine:ix86 /incremental:no /nologo /STACK:0x800000 # use following flags for debugging -# CFLAGS=/nologo /fp:precise /Od /W3 /Zi /I$(SchemeInclude) /I..\zlib /DUSE_ANSI_PROTOTYPES /DI386 /DWIN32 /D_CRT_SECURE_NO_WARNINGS +# CFLAGS=/nologo /fp:precise /Od /W3 /Zi /I$(SchemeInclude) /I..\zlib /I..\lz4\lib /DUSE_ANSI_PROTOTYPES /DI386 /DWIN32 /D_CRT_SECURE_NO_WARNINGS # MDCFLAGS=$(CFLAGS) /MDd # MTCFLAGS=$(CFLAGS) /MTd SystemLib=rpcrt4.lib ole32.lib advapi32.lib User32.lib MDZlibLib=..\zlib\zlib.lib MTZlibLib=..\zlib\zlibmt.lib +MDLZ4Lib=..\lz4\lib\liblz4.lib +MTLZ4Lib=..\lz4\lib\liblz4mt.lib csrc=statics.c segment.c alloc.c symbol.c intern.c gcwrapper.c gc-oce.c gc-ocd.c\ number.c schsig.c io.c new-io.c print.c fasl.c stats.c\ foreign.c prim.c prim5.c flushcache.c\ windows.c\ - schlib.c thread.c expeditor.c scheme.c + schlib.c thread.c expeditor.c scheme.c compress-io.c cobj=statics.obj segment.obj alloc.obj symbol.obj intern.obj gcwrapper.obj gc-oce.obj gc-ocd.obj\ number.obj schsig.obj io.obj new-io.obj print.obj fasl.obj stats.obj\ foreign.obj prim.obj prim5.obj flushcache.obj\ windows.obj\ - schlib.obj thread.obj expeditor.obj scheme.obj + schlib.obj thread.obj expeditor.obj scheme.obj compress-io.obj -hsrc=system.h types.h version.h globals.h externs.h segment.h gc.c thread.h sort.h itest.c +hsrc=system.h types.h version.h globals.h externs.h compress-io.h segment.h gc.c thread.h sort.h itest.c .SUFFIXES: @@ -65,16 +67,17 @@ all: $(Exec) $(MTKernelLib) $(MDKernelLib) $(MTMain) $(KernelLib) $(MTKernelLib) $(MDKernelLib): $(hsrc) $(KernelLib) $(MTKernelLib) $(MDKernelLib): $(SchemeInclude)/equates.h $(SchemeInclude)/scheme.h $(KernelLib) $(MTKernelLib) $(MDKernelLib): ..\zlib/zconf.h ..\zlib/zlib.h +$(KernelLib) $(MTKernelLib) $(MDKernelLib): ../lz4/lib/lz4.h ../lz4/lib/lz4frame.h -$(MTKernelLib): $(csrc) $(MTZlibLib) +$(MTKernelLib): $(csrc) $(MTZlibLib) $(MTLZ4Lib) -del /f $(MTKernelLib) cl /DSCHEME_STATIC /c $(MTCFLAGS) $(csrc) - link /lib /nologo -out:$(MTKernelLib) $(cobj) $(MTZlibLib) + link /lib /nologo -out:$(MTKernelLib) $(cobj) $(MTZlibLib) $(MTLZ4Lib) -$(MDKernelLib): $(csrc) $(MDZlibLib) +$(MDKernelLib): $(csrc) $(MDZlibLib) $(MDLZ4Lib) -del /f $(MDKernelLib) cl /DSCHEME_STATIC /c $(MDCFLAGS) $(csrc) - link /lib /nologo -out:$(MDKernelLib) $(cobj) $(MDZlibLib) + link /lib /nologo -out:$(MDKernelLib) $(cobj) $(MDZlibLib) $(MDLZ4Lib) # nmake builds Dll twice if we list it with $(KernelLib) below $(KernelDll): $(KernelLib) @@ -85,11 +88,11 @@ $(KernelDll): $(KernelLib) # conflicts with other dlls. use 'depends ' to check. # we no longer attempt to rebase other the CRT dll since it # has already been signed. -$(KernelLib): $(ResFile) $(csrc) $(MDZlibLib) +$(KernelLib): $(ResFile) $(csrc) $(MDZlibLib) $(MDLZ4Lib) -del /f $(KernelLib) -del /f $(KernelDll) cl /c $(MDCFLAGS) $(csrc) - link -dll -out:$(KernelDll) $(DLLLDFLAGS) $(ResFile) $(cobj) $(MDZlibLib) $(SystemLib) + link -dll -out:$(KernelDll) $(DLLLDFLAGS) $(ResFile) $(cobj) $(MDZlibLib) $(MDLZ4Lib) $(SystemLib) editbin /nologo /rebase:base=0x67480000 $(KernelDll) $(MTMain): main.c @@ -129,6 +132,18 @@ mdscheme.exe: $(ResFile) $(MDMain) $(MDKernelLib) nmake /nologo -f win32/Makefile.msc AR="link /lib" cd ../c +$(MDLZ4Lib) $(MTLZ4Lib): ../lz4/lib/lz4.c ../lz4/lib/lz4frame.c ../lz4/lib/lz4hc.c + cl /c /Fo../lz4/lib/lz4.obj $(MDCFLAGS) ../lz4/lib/lz4.c + cl /c /Fo../lz4/lib/lz4frame.obj $(MDCFLAGS) ../lz4/lib/lz4frame.c + cl /c /Fo../lz4/lib/lz4hc.obj $(MDCFLAGS) ../lz4/lib/lz4hc.c + cl /c /Fo../lz4/lib/xxhash.obj $(MDCFLAGS) ../lz4/lib/xxhash.c + lib /OUT:$(MDLZ4Lib) ../lz4/lib/lz4.obj ../lz4/lib/lz4frame.obj ../lz4/lib/lz4hc.obj ../lz4/lib/xxhash.obj + cl /c /Fo../lz4/lib/lz4mt.obj $(MTCFLAGS) ../lz4/lib/lz4.c + cl /c /Fo../lz4/lib/lz4framemt.obj $(MTCFLAGS) ../lz4/lib/lz4frame.c + cl /c /Fo../lz4/lib/lz4hcmt.obj $(MTCFLAGS) ../lz4/lib/lz4hc.c + cl /c /Fo../lz4/lib/xxhashmt.obj $(MTCFLAGS) ../lz4/lib/xxhash.c + lib /OUT:$(MTLZ4Lib) ../lz4/lib/lz4mt.obj ../lz4/lib/lz4framemt.obj ../lz4/lib/lz4hcmt.obj ../lz4/lib/xxhashmt.obj + clean: -del /f $(cobj) main.obj $(KernelExp) -del /f mtscheme.exe diff --git a/c/Mf-a6fb b/c/Mf-a6fb index 9a55d7ae89..92bffb6814 100644 --- a/c/Mf-a6fb +++ b/c/Mf-a6fb @@ -27,15 +27,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib ${mdinclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m64 ./configure --64) + (cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m64" ${MAKE} liblz4.a) diff --git a/c/Mf-a6le b/c/Mf-a6le index 49b8d046c7..1959da5af5 100644 --- a/c/Mf-a6le +++ b/c/Mf-a6le @@ -26,15 +26,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m64 ./configure --64) + (cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m64" ${MAKE} liblz4.a) diff --git a/c/Mf-a6nb b/c/Mf-a6nb index f3869b360e..5cf2ec043f 100644 --- a/c/Mf-a6nb +++ b/c/Mf-a6nb @@ -27,15 +27,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib ${mdinclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m64 ./configure --64) + (cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m64" ${MAKE} liblz4.a) diff --git a/c/Mf-a6ob b/c/Mf-a6ob index 03ab059065..12fa15eab1 100644 --- a/c/Mf-a6ob +++ b/c/Mf-a6ob @@ -27,15 +27,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib ${mdinclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -Wl,--export-dynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m64 ./configure --64) + (cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m64" ${MAKE} liblz4.a) diff --git a/c/Mf-a6osx b/c/Mf-a6osx index 8293937baa..a776bd3fd0 100644 --- a/c/Mf-a6osx +++ b/c/Mf-a6osx @@ -26,15 +26,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m64 ./configure --64) + (cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m64" ${MAKE} liblz4.a) diff --git a/c/Mf-a6s2 b/c/Mf-a6s2 index 6d172cc73b..e3e6a1b8bf 100644 --- a/c/Mf-a6s2 +++ b/c/Mf-a6s2 @@ -26,15 +26,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -DSOLARIS -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -DSOLARIS -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m64 ./configure --64) + (cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m64" ${MAKE} liblz4.a) diff --git a/c/Mf-arm32le b/c/Mf-arm32le index a5bb283283..7cc8a6e620 100644 --- a/c/Mf-arm32le +++ b/c/Mf-arm32le @@ -26,15 +26,18 @@ mdobj = arm32le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: (cd ../zlib; ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; ${MAKE} liblz4.a) diff --git a/c/Mf-base b/c/Mf-base index cc23047ba7..b1232c5b9a 100644 --- a/c/Mf-base +++ b/c/Mf-base @@ -24,11 +24,11 @@ Scheme=../bin/$m/scheme kernelsrc=statics.c segment.c alloc.c symbol.c intern.c gcwrapper.c gc-ocd.c gc-oce.c\ number.c schsig.c io.c new-io.c print.c fasl.c stats.c foreign.c prim.c prim5.c flushcache.c\ - schlib.c thread.c expeditor.c scheme.c + schlib.c thread.c expeditor.c scheme.c compress-io.c kernelobj=${kernelsrc:%.c=%.$o} ${mdobj} -kernelhdr=system.h types.h version.h globals.h externs.h segment.h gc.c sort.h thread.h config.h itest.c +kernelhdr=system.h types.h version.h globals.h externs.h segment.h gc.c sort.h thread.h config.h compress-io.h itest.c mainsrc=main.c @@ -51,10 +51,10 @@ endif scheme.o: itest.c scheme.o main.o: config.h -${kernelobj}: system.h types.h version.h externs.h globals.h segment.h thread.h sort.h +${kernelobj}: system.h types.h version.h externs.h globals.h segment.h thread.h sort.h compress-io.h ${kernelobj}: ${Include}/equates.h ${Include}/scheme.h ${mainobj}: ${Include}/scheme.h -${kernelobj}: ../zlib/zconf.h ../zlib/zlib.h +${kernelobj}: ${zlibHeaderDep} ${LZ4HeaderDep} gc-ocd.o gc-oce.o: gc.c ../zlib/zlib.h ../zlib/zconf.h: ../zlib/configure.log @@ -62,6 +62,10 @@ gc-ocd.o gc-oce.o: gc.c ../zlib/libz.a: ../zlib/configure.log (cd ../zlib; ${MAKE}) +LZ4Sources=../lz4/lib/lz4.h ../lz4/lib/lz4frame.h \ + ../lz4/lib/lz4.c ../lz4/lib/lz4frame.c \ + ../lz4/lib/lz4hc.c ../lz4/lib/xxhash.c + clean: rm -f *.$o ${mdclean} rm -f Make.out diff --git a/c/Mf-i3fb b/c/Mf-i3fb index 834d8ab846..32f7042bf4 100644 --- a/c/Mf-i3fb +++ b/c/Mf-i3fb @@ -27,15 +27,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib ${mdinclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-i3le b/c/Mf-i3le index e9cf27d766..5bf9ab44b3 100644 --- a/c/Mf-i3le +++ b/c/Mf-i3le @@ -26,15 +26,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -melf_i386 -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -melf_i386 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-i3nb b/c/Mf-i3nb index f7378865c1..f0cfca976d 100644 --- a/c/Mf-i3nb +++ b/c/Mf-i3nb @@ -27,15 +27,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib ${mdinclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-i3ob b/c/Mf-i3ob index ee9ceec21b..237a7b3126 100644 --- a/c/Mf-i3ob +++ b/c/Mf-i3ob @@ -27,15 +27,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib ${mdinclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -Wl,--export-dynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-i3osx b/c/Mf-i3osx index 8ca333d76d..2c5f4b8ca7 100644 --- a/c/Mf-i3osx +++ b/c/Mf-i3osx @@ -26,15 +26,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-i3qnx b/c/Mf-i3qnx index 25c24fd5ce..9c159d34a8 100644 --- a/c/Mf-i3qnx +++ b/c/Mf-i3qnx @@ -27,15 +27,18 @@ LocalInclude = /usr/local/include .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib -I${LocalInclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} -I${LocalInclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -mi386nto -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -mi386nto -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -Wl,--export-dynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-i3s2 b/c/Mf-i3s2 index 7f2c52963d..5be12fae4d 100644 --- a/c/Mf-i3s2 +++ b/c/Mf-i3s2 @@ -26,15 +26,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -DSOLARIS -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -DSOLARIS -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -melf_i386 -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -melf_i386 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-ppc32le b/c/Mf-ppc32le index 844be15128..91705e772d 100644 --- a/c/Mf-ppc32le +++ b/c/Mf-ppc32le @@ -26,15 +26,18 @@ mdobj = ppc32.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-ta6fb b/c/Mf-ta6fb index 81800dcacc..42a1dbb0fb 100644 --- a/c/Mf-ta6fb +++ b/c/Mf-ta6fb @@ -27,15 +27,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib ${mdinclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m64 ./configure --64) + (cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m64" ${MAKE} liblz4.a) diff --git a/c/Mf-ta6le b/c/Mf-ta6le index 30cc11d629..ee961471d6 100644 --- a/c/Mf-ta6le +++ b/c/Mf-ta6le @@ -26,15 +26,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m64 ./configure --64) + (cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m64" ${MAKE} liblz4.a) diff --git a/c/Mf-ta6nb b/c/Mf-ta6nb index 6dbd83c74a..168c97103e 100644 --- a/c/Mf-ta6nb +++ b/c/Mf-ta6nb @@ -27,15 +27,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib ${mdinclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m64 ./configure --64) + (cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m64" ${MAKE} liblz4.a) diff --git a/c/Mf-ta6ob b/c/Mf-ta6ob index 45e29e8955..ef00f655ab 100644 --- a/c/Mf-ta6ob +++ b/c/Mf-ta6ob @@ -27,15 +27,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib ${mdinclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -Wl,--export-dynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m64 ./configure --64) + (cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m64" ${MAKE} liblz4.a) diff --git a/c/Mf-ta6osx b/c/Mf-ta6osx index 9626f36489..d070f3b3d0 100644 --- a/c/Mf-ta6osx +++ b/c/Mf-ta6osx @@ -26,15 +26,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m64 ./configure --64) + (cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m64" ${MAKE} liblz4.a) diff --git a/c/Mf-ta6s2 b/c/Mf-ta6s2 index ed260d054c..2e54211373 100644 --- a/c/Mf-ta6s2 +++ b/c/Mf-ta6s2 @@ -26,15 +26,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -DSOLARIS -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -DSOLARIS -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m64 ./configure --64) + (cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m64" ${MAKE} liblz4.a) diff --git a/c/Mf-ti3fb b/c/Mf-ti3fb index 58af09cfcd..ec52090f8e 100644 --- a/c/Mf-ti3fb +++ b/c/Mf-ti3fb @@ -27,15 +27,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib ${mdinclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-ti3le b/c/Mf-ti3le index dad6af7c91..4d52e111e1 100644 --- a/c/Mf-ti3le +++ b/c/Mf-ti3le @@ -26,15 +26,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -melf_i386 -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -melf_i386 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-ti3nb b/c/Mf-ti3nb index fd102dce25..3bbb9d2961 100644 --- a/c/Mf-ti3nb +++ b/c/Mf-ti3nb @@ -27,15 +27,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib ${mdinclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -m elf_i386 -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -m elf_i386 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-ti3ob b/c/Mf-ti3ob index b6b529fd91..eb622c122a 100644 --- a/c/Mf-ti3ob +++ b/c/Mf-ti3ob @@ -27,15 +27,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib ${mdinclude} $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} ${mdinclude} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -Wl,--export-dynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-ti3osx b/c/Mf-ti3osx index f78817db7d..48662d6df3 100644 --- a/c/Mf-ti3osx +++ b/c/Mf-ti3osx @@ -26,15 +26,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-ti3s2 b/c/Mf-ti3s2 index 2f9ec15e5f..8430017c6f 100644 --- a/c/Mf-ti3s2 +++ b/c/Mf-ti3s2 @@ -26,15 +26,18 @@ mdobj = i3le.o .SUFFIXES: .c .o .c.o: - $C -c -DSOLARIS -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -DSOLARIS -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -melf_i386 -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -melf_i386 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/Mf-tppc32le b/c/Mf-tppc32le index a1a66d97e1..cd01f24ab8 100644 --- a/c/Mf-tppc32le +++ b/c/Mf-tppc32le @@ -26,15 +26,18 @@ mdobj = ppc32le.o .SUFFIXES: .c .o .c.o: - $C -c -D${Cpu} -I${Include} -I../zlib $*.c + $C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c include Mf-base -${Kernel}: ${kernelobj} ../zlib/libz.a - ld -r -X -o ${Kernel} ${kernelobj} ../zlib/libz.a +${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep} + ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib} ${Scheme}: ${Kernel} ${Main} $C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS} ../zlib/configure.log: - (cd ../zlib; CFLAGS=-m32 ./configure) + (cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure) + +../lz4/lib/liblz4.a: ${LZ4Sources} + (cd ../lz4/lib; CFLAGS="${CFLAGS} -m32" ${MAKE} liblz4.a) diff --git a/c/compress-io.c b/c/compress-io.c new file mode 100644 index 0000000000..edf9cb2fb3 --- /dev/null +++ b/c/compress-io.c @@ -0,0 +1,498 @@ +/* compress-io.c + * Copyright 1984-2017 Cisco Systems, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Dispatch to zlib or LZ4 */ + +#include "system.h" +#include "lz4.h" +#include "lz4frame.h" +#include +#include + +#ifdef WIN32 +#include +# define WIN32_IZE(id) _ ## id +# define GLZ_O_BINARY O_BINARY +#else +# define WIN32_IZE(id) id +# define GLZ_O_BINARY 0 +#endif + +enum { + is_gz, + is_lz4_write, + is_lz4_read +}; + +typedef struct lz4File_out { + int fd; + void *in_buffer, *out_buffer; + int in_pos, out_len, out_pos; + int err; + size_t stream_pos; +} lz4File_out; + +typedef struct lz4File_in { + int fd; + LZ4F_dctx *dctx; + void *in_buffer, *out_buffer; + int in_pos, in_len, out_pos, out_len; + int frame_ended; + int err; + size_t stream_pos; + off_t init_pos; +} lz4File_in; + +#define USE_LZ4_BUFFER_SIZE (1 << 14) + +static glzFile glzdopen_lz4_pos(int fd, const char *mode, off_t init_pos); + +glzFile glzdopen_gz(int fd, const char *mode) { + gzFile gz; + + if ((gz = gzdopen(fd, mode)) == Z_NULL) { + return Z_NULL; + } else { + glzFile glz = malloc(sizeof(struct glzFile_r)); + glz->mode = is_gz; + glz->gz = gz; + return glz; + } +} + +glzFile glzdopen_lz4(int fd, const char *mode) { + return glzdopen_lz4_pos(fd, mode, 0); +} + +static glzFile glzdopen_lz4_pos(int fd, const char *mode, off_t init_pos) { + glzFile glz = malloc(sizeof(struct glzFile_r)); + + if (mode[0] == 'r') { + LZ4F_dctx *dctx; + LZ4F_errorCode_t r; + lz4File_in *lz4; + + r = LZ4F_createDecompressionContext(&dctx, LZ4F_VERSION); + if (LZ4F_isError(r)) + return Z_NULL; + + lz4 = malloc(sizeof(lz4File_in)); + lz4->fd = fd; + lz4->dctx = dctx; + lz4->in_buffer = malloc(USE_LZ4_BUFFER_SIZE); + lz4->out_buffer = malloc(USE_LZ4_BUFFER_SIZE); + lz4->in_pos = 0; + lz4->in_len = 0; + lz4->out_len = 0; + lz4->out_pos = 0; + lz4->frame_ended = 0; + lz4->err = 0; + lz4->stream_pos = 0; + lz4->init_pos = init_pos; + + glz->mode = is_lz4_read; + glz->lz4 = (struct lz4File *)lz4; + } else { + lz4File_out *lz4 = malloc(sizeof(lz4File_out)); + + lz4->fd = fd; + lz4->in_buffer = malloc(USE_LZ4_BUFFER_SIZE); + lz4->out_buffer = malloc(LZ4F_compressFrameBound(USE_LZ4_BUFFER_SIZE, NULL)); + lz4->in_pos = 0; + lz4->out_len = 0; + lz4->out_pos = 0; + lz4->err = 0; + lz4->stream_pos = 0; + + glz->mode = is_lz4_write; + glz->lz4 = (struct lz4File *)lz4; + } + + return glz; +} + +glzFile glzdopen(int fd, const char *mode) { + if (mode[0] == 'r') { + int r, pos = 0; + unsigned char buffer[4]; + off_t init_pos; + + /* check for LZ4 magic number, otherwise defer to gzdopen */ + + init_pos = WIN32_IZE(lseek)(fd, 0, SEEK_CUR); + + while (pos < 4) { + r = WIN32_IZE(read)(fd, (char*)buffer + pos, 4 - pos); + if (r == 0) + break; + else if (r > 0) + pos += r; +#ifdef EINTR + else if (r == EINTR) + r = 0; +#endif + else + break; /* error reading */ + } + + if (pos > 0) + WIN32_IZE(lseek)(fd, init_pos, SEEK_SET); + + if ((pos == 4) + && (buffer[0] == 0x04) + && (buffer[1] == 0x22) + && (buffer[2] == 0x4d) + && (buffer[3] == 0x18)) + return glzdopen_lz4_pos(fd, mode, init_pos); + + return glzdopen_gz(fd, mode); + } else + return glzdopen_gz(fd, mode); +} + +/* currently assumes read mode: */ +glzFile glzopen(const char *path, const char *mode) { + int fd; + + fd = WIN32_IZE(open)(path, O_RDONLY | GLZ_O_BINARY); + + if (fd == -1) + return Z_NULL; + else + return glzdopen(fd, mode); +} + +#ifdef WIN32 +/* currently assumes read mode: */ +glzFile glzopen_w(wchar_t *path, const char *mode) { + int fd; + + fd = _wopen(path, O_RDONLY | GLZ_O_BINARY); + + if (fd == -1) + return Z_NULL; + else + return glzdopen(fd, mode); +} +#endif + +int glzdirect(glzFile file) { + if (file->mode == is_gz) + return gzdirect(file->gz); + else + return 0; +} + +int glzclose(glzFile file) { + if (file->mode == is_gz) { + int r; + r = gzclose(file->gz); + if (r != Z_OK) + return r; + } else if (file->mode == is_lz4_write) { + lz4File_out *lz4 = (lz4File_out *)file->lz4; + glzwrite(file, NULL /* => flush */, 0); + while (1) { + int r = WIN32_IZE(close)(lz4->fd); + if (r == 0) + break; +#ifdef EINTR + else if (r == EINTR) + r = 0; +#endif + else + return r; + } + free(lz4->in_buffer); + free(lz4->out_buffer); + } else { + lz4File_in *lz4 = (lz4File_in *)file->lz4; + while (1) { + int r = WIN32_IZE(close)(lz4->fd); + if (r == 0) + break; +#ifdef EINTR + else if (r == EINTR) + r = 0; +#endif + else + return r; + } + (void)LZ4F_freeDecompressionContext(lz4->dctx); + free(lz4->in_buffer); + free(lz4->out_buffer); + } + free(file); + return Z_OK; +} + +int glzread(glzFile file, void *buffer, unsigned int count) { + if (file->mode == is_gz) { + return gzread(file->gz, buffer, count); + } else { + lz4File_in *lz4 = (lz4File_in *)file->lz4; + + while (lz4->out_pos == lz4->out_len) { + int in_avail; + + in_avail = lz4->in_len - lz4->in_pos; + if (!in_avail) { + while (1) { + in_avail = WIN32_IZE(read)(lz4->fd, (char*)lz4->in_buffer, USE_LZ4_BUFFER_SIZE); + if (in_avail >= 0) { + lz4->in_len = in_avail; + lz4->in_pos = 0; + break; +#ifdef EINTR + } else if (in_avail == EINTR) { + /* try again */ +#endif + } else { + lz4->err = errno; + return -1; + } + } + } + + if (in_avail > 0) { + size_t amt, out_len = USE_LZ4_BUFFER_SIZE, in_len = in_avail; + + /* For a large enough result buffer, try to decompress directly + to that buffer: */ + if (count >= (out_len >> 1)) { + size_t direct_out_len = count; + + if (lz4->frame_ended && ((char *)lz4->in_buffer)[lz4->in_pos] == 0) + return 0; /* count 0 after frame as stream terminator */ + + amt = LZ4F_decompress(lz4->dctx, + buffer, &direct_out_len, + (char *)lz4->in_buffer + lz4->in_pos, &in_len, + NULL); + lz4->frame_ended = (amt == 0); + + if (LZ4F_isError(amt)) { + lz4->err = (int)amt; + return -1; + } + + lz4->in_pos += (int)in_len; + + if (direct_out_len) { + lz4->stream_pos += direct_out_len; + return (int)direct_out_len; + } + + in_len = in_avail - in_len; + } + + if (in_len > 0) { + if (lz4->frame_ended && ((char *)lz4->in_buffer)[lz4->in_pos] == 0) + return 0; /* count 0 after frame as stream terminator */ + + amt = LZ4F_decompress(lz4->dctx, + lz4->out_buffer, &out_len, + (char *)lz4->in_buffer + lz4->in_pos, &in_len, + NULL); + lz4->frame_ended = (amt == 0); + + if (LZ4F_isError(amt)) { + lz4->err = (int)amt; + return -1; + } + + lz4->in_pos += (int)in_len; + lz4->out_len = (int)out_len; + lz4->out_pos = 0; + } + } else { + /* EOF on read */ + break; + } + } + + if (lz4->out_pos < lz4->out_len) { + unsigned int amt = lz4->out_len - lz4->out_pos; + if (amt > count) amt = count; + memcpy(buffer, (char *)lz4->out_buffer + lz4->out_pos, amt); + lz4->out_pos += amt; + lz4->stream_pos += amt; + return amt; + } + + return 0; + } +} + +int glzwrite(glzFile file, void *buffer, unsigned int count) { + if (file->mode == is_gz) + return gzwrite(file->gz, buffer, count); + else { + lz4File_out *lz4 = (lz4File_out *)file->lz4; + + if ((lz4->in_pos == USE_LZ4_BUFFER_SIZE) + || ((lz4->in_pos > 0) && !buffer)) { + size_t out_len; + + out_len = LZ4F_compressFrame(lz4->out_buffer, LZ4F_compressFrameBound(USE_LZ4_BUFFER_SIZE, NULL), + lz4->in_buffer, lz4->in_pos, + NULL); + if (LZ4F_isError(out_len)) { + lz4->err = (int)out_len; + return -1; + } + + lz4->in_pos = 0; + lz4->out_len = (int)out_len; + lz4->out_pos = 0; + } + + while (lz4->out_pos < lz4->out_len) { + int r = WIN32_IZE(write)(lz4->fd, (char*)lz4->out_buffer + lz4->out_pos, lz4->out_len - lz4->out_pos); + if (r >= 0) + lz4->out_pos += r; +#ifdef EINTR + else if (r == EINTR) + lz4->out_pos += 0; /* try again */ +#endif + else { + lz4->err = errno; + return r; + } + } + + { + unsigned int amt = (USE_LZ4_BUFFER_SIZE - lz4->in_pos); + + if (count < amt) + amt = count; + + memcpy((char *)lz4->in_buffer + lz4->in_pos, buffer, amt); + lz4->in_pos += amt; + lz4->stream_pos += amt; + + return amt; + } + } +} + +long glzseek(glzFile file, long offset, int whence) { + if (file->mode == is_gz) + return gzseek(file->gz, offset, whence); + else if (file->mode == is_lz4_write) { + lz4File_out *lz4 = (lz4File_out *)file->lz4; + if (whence == SEEK_CUR) + offset += (long)lz4->stream_pos; + if (offset >= 0) { + while ((size_t)offset > lz4->stream_pos) { + size_t amt = (size_t)offset - lz4->stream_pos; + if (amt > 8) amt = 8; + if (glzwrite(file, "\0\0\0\0\0\0\0\0", (unsigned int)amt) < 0) + return -1; + } + } + return (long)lz4->stream_pos; + } else if (file->mode == is_lz4_read) { + lz4File_in *lz4 = (lz4File_in *)file->lz4; + if (whence == SEEK_CUR) + offset += (long)lz4->stream_pos; + if (offset < 0) + offset = 0; + if ((size_t)offset < lz4->stream_pos) { + /* rewind and read from start */ + if (WIN32_IZE(lseek)(lz4->fd, lz4->init_pos, SEEK_SET) < 0) { + lz4->err = errno; + return -1; + } + LZ4F_resetDecompressionContext(lz4->dctx); + lz4->in_pos = 0; + lz4->in_len = 0; + lz4->out_len = 0; + lz4->out_pos = 0; + lz4->err = 0; + lz4->stream_pos = 0; + } + while ((size_t)offset > lz4->stream_pos) { + char buffer[32]; + size_t amt = (size_t)offset - lz4->stream_pos; + if (amt > sizeof(buffer)) amt = sizeof(buffer); + if (glzread(file, buffer, (unsigned int)amt) < 0) + return -1; + } + return (long)lz4->stream_pos; + } else + return 0; +} + +int glzgetc(glzFile file) { + if (file->mode == is_gz) + return gzgetc(file->gz); + else { + unsigned char buffer[1]; + int r; + r = glzread(file, buffer, 1); + if (r == 1) + return buffer[0]; + return -1; + } +} + +int glzungetc(int c, glzFile file) { + if (file->mode == is_gz) + return gzungetc(c, file->gz); + else if (file->mode == is_lz4_read) { + lz4File_in *lz4 = (lz4File_in *)file->lz4; + if (lz4->out_len == 0) + lz4->out_len = lz4->out_pos = 1; + if (lz4->out_pos) { + lz4->out_pos--; + ((unsigned char *)lz4->out_buffer)[lz4->out_pos] = c; + lz4->stream_pos--; + return c; + } else { + /* support ungetc only just after a getc, in which case there + should have been room */ + return -1; + } + } else + return -1; +} + +int glzrewind(glzFile file) { + return glzseek(file, 0, SEEK_SET); +} + +void glzerror(glzFile file, int *errnum) +{ + if (file->mode == is_gz) + (void)gzerror(file->gz, errnum); + else if (file->mode == is_lz4_write) + *errnum = ((lz4File_out *)file->lz4)->err; + else if (file->mode == is_lz4_read) + *errnum = ((lz4File_in *)file->lz4)->err; + else + *errnum = 0; +} + +void glzclearerr(glzFile file) +{ + if (file->mode == is_gz) + gzclearerr(file->gz); + else if (file->mode == is_lz4_write) + ((lz4File_out *)file->lz4)->err = 0; + else if (file->mode == is_lz4_read) + ((lz4File_in *)file->lz4)->err = 0; +} diff --git a/c/compress-io.h b/c/compress-io.h new file mode 100644 index 0000000000..d0cb121a6f --- /dev/null +++ b/c/compress-io.h @@ -0,0 +1,47 @@ +/* compress-io.h + * Copyright 1984-2017 Cisco Systems, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "zlib.h" + +struct lz4File; + +typedef struct glzFile_r { + int mode; + union { + gzFile gz; + struct lz4File *lz4; + }; +} *glzFile; + +glzFile glzdopen_gz(int fd, const char *mode); +glzFile glzdopen_lz4(int fd, const char *mode); +glzFile glzdopen(int fd, const char *mode); +glzFile glzopen(const char *path, const char *mode); +#ifdef WIN32 +glzFile glzopen_w(wchar_t *path, const char *mode); +#endif +int glzdirect(glzFile file); +int glzclose(glzFile file); + +int glzread(glzFile file, void *buffer, unsigned int count); +int glzwrite(glzFile file, void *buffer, unsigned int count); +long glzseek(glzFile file, long offset, int whence); +int glzgetc(glzFile file); +int glzungetc(int c, glzFile file); +int glzrewind(glzFile file); + +void glzerror(glzFile file, int *errnum); +void glzclearerr(glzFile fdfile); diff --git a/c/expeditor.c b/c/expeditor.c index 78f6be3bfb..7d0fc62cf1 100644 --- a/c/expeditor.c +++ b/c/expeditor.c @@ -527,6 +527,7 @@ static void s_ee_write_char(wchar_t c) { } #else /* WIN32 */ +#include #ifdef SOLARIS #define NCURSES_CONST #define CHTYPE int diff --git a/c/externs.h b/c/externs.h index 91a5216418..e92e7f4ce4 100644 --- a/c/externs.h +++ b/c/externs.h @@ -96,7 +96,7 @@ extern void S_fasl_init PROTO((void)); ptr S_fasl_read PROTO((ptr file, IBOOL gzflag, ptr path)); ptr S_bv_fasl_read PROTO((ptr bv, ptr path)); /* S_boot_read's f argument is really gzFile, but zlib.h is not included everywhere */ -ptr S_boot_read PROTO((gzFile file, const char *path)); +ptr S_boot_read PROTO((glzFile file, const char *path)); char *S_format_scheme_version PROTO((uptr n)); char *S_lookup_machine_type PROTO((uptr n)); extern void S_set_code_obj PROTO((char *who, IFASLCODE typ, ptr p, iptr n, @@ -171,19 +171,19 @@ extern IBOOL S_fixedpathp PROTO((const char *inpath)); /* new-io.c */ extern INT S_gzxfile_fd PROTO((ptr x)); -extern gzFile S_gzxfile_gzfile PROTO((ptr x)); +extern glzFile S_gzxfile_gzfile PROTO((ptr x)); extern ptr S_new_open_input_fd PROTO((const char *filename, IBOOL compressed)); extern ptr S_new_open_output_fd PROTO(( const char *filename, INT mode, IBOOL no_create, IBOOL no_fail, IBOOL no_truncate, - IBOOL append, IBOOL lock, IBOOL replace, IBOOL compressed)); + IBOOL append, IBOOL lock, IBOOL replace, IBOOL compressed, IBOOL as_gz)); extern ptr S_new_open_input_output_fd PROTO(( const char *filename, INT mode, IBOOL no_create, IBOOL no_fail, IBOOL no_truncate, IBOOL append, IBOOL lock, IBOOL replace, IBOOL compressed)); extern ptr S_close_fd PROTO((ptr file, IBOOL gzflag)); extern ptr S_compress_input_fd PROTO((INT fd, I64 fp)); -extern ptr S_compress_output_fd PROTO((INT fd)); +extern ptr S_compress_output_fd PROTO((INT fd, IBOOL as_gz)); extern ptr S_bytevector_read PROTO((ptr file, ptr buffer, iptr start, iptr count, IBOOL gzflag)); extern ptr S_bytevector_read_nb PROTO((ptr file, ptr buffer, iptr start, iptr count, IBOOL gzflag)); @@ -198,11 +198,13 @@ extern ptr S_get_fd_length PROTO((ptr file, IBOOL gzflag)); extern ptr S_set_fd_length PROTO((ptr file, ptr length, IBOOL gzflag)); extern void S_new_io_init PROTO((void)); -extern uptr S_bytevector_compress_size PROTO((iptr s_count)); +extern uptr S_bytevector_compress_size PROTO((iptr s_count, IBOOL as_gz)); extern ptr S_bytevector_compress PROTO((ptr dest_bv, iptr d_start, iptr d_count, - ptr src_bv, iptr s_start, iptr s_count)); + ptr src_bv, iptr s_start, iptr s_count, + IBOOL as_gz)); extern ptr S_bytevector_uncompress PROTO((ptr dest_bv, iptr d_start, iptr d_count, - ptr src_bv, iptr s_start, iptr s_count)); + ptr src_bv, iptr s_start, iptr s_count, + IBOOL as_gz)); /* thread.c */ extern void S_thread_init PROTO((void)); diff --git a/c/fasl.c b/c/fasl.c index fef56cdb9f..413b370765 100644 --- a/c/fasl.c +++ b/c/fasl.c @@ -195,7 +195,7 @@ typedef struct unbufFaslFileObj { ptr path; INT type; INT fd; - gzFile file; + glzFile file; } *unbufFaslFile; typedef struct faslFileObj { @@ -317,7 +317,7 @@ ptr S_bv_fasl_read(ptr bv, ptr path) { return x; } -ptr S_boot_read(gzFile file, const char *path) { +ptr S_boot_read(glzFile file, const char *path) { ptr tc = get_thread_context(); struct unbufFaslFileObj uffo; @@ -346,14 +346,14 @@ static INT uf_read(unbufFaslFile uf, octet *s, iptr n) { switch (uf->type) { case UFFO_TYPE_GZ: - k = gzread(uf->file, s, (GZ_IO_SIZE_T)nx); + k = glzread(uf->file, s, (GZ_IO_SIZE_T)nx); if (k > 0) n -= k; else if (k == 0) return -1; else { - gzerror(uf->file, &errnum); - gzclearerr(uf->file); + glzerror(uf->file, &errnum); + glzclearerr(uf->file); if (errnum != Z_ERRNO || errno != EINTR) S_error1("", "error reading from ~a", uf->path); } @@ -370,6 +370,8 @@ static INT uf_read(unbufFaslFile uf, octet *s, iptr n) { default: return -1; } + + s += k; } return 0; } diff --git a/c/new-io.c b/c/new-io.c index bcf4779564..f8243bf505 100644 --- a/c/new-io.c +++ b/c/new-io.c @@ -27,6 +27,7 @@ #endif /* WIN32 */ #include #include "zlib.h" +#include "lz4.h" /* !!! UNLESS you enjoy spending endless days tracking down race conditions !!! involving the garbage collector, please note: DEACTIVATE and @@ -51,16 +52,17 @@ /* locally defined functions */ static ptr new_open_output_fd_helper PROTO((const char *filename, INT mode, INT flags, INT no_create, INT no_fail, INT no_truncate, - INT append, INT lock, INT replace, INT compressed)); + INT append, INT lock, INT replace, INT compressed, INT as_gz)); static INT lockfile PROTO((INT fd)); -static ptr make_gzxfile PROTO((int fd, gzFile file)); +static ptr make_gzxfile PROTO((int fd, glzFile file)); static int is_valid_zlib_length(iptr count); +static int is_valid_lz4_length(iptr count); /* - not_ok_is_fatal: !ok definitely implies error, so ignore gzerror + not_ok_is_fatal: !ok definitely implies error, so ignore glzerror ok: whether the result of body seems to be ok flag: will be set when an error is detected and cleared if no error - fd: the gzFile object to call gzerror on + fd: the glzFile object to call glzerror on body: the operation we are checking the error on */ #ifdef EINTR @@ -76,8 +78,8 @@ static int is_valid_zlib_length(iptr count); if (ok) { flag = 0; } \ else { \ INT errnum; \ - gzerror((fd),&errnum); \ - gzclearerr((fd)); \ + glzerror((fd),&errnum); \ + glzclearerr((fd)); \ if (errnum == Z_ERRNO) { \ flag = errno != EINTR; \ } else { \ @@ -97,8 +99,8 @@ static int is_valid_zlib_length(iptr count); if (ok) { flag = 0; break; } \ else { \ INT errnum; \ - gzerror((fd),&errnum); \ - gzclearerr((fd)); \ + glzerror((fd),&errnum); \ + glzclearerr((fd)); \ if (errnum == Z_ERRNO) { \ if (errno != EINTR) { flag = 1; break; } \ } else { \ @@ -115,8 +117,8 @@ static int is_valid_zlib_length(iptr count); if (ok) { flag = 0; } \ else { \ INT errnum; \ - gzerror((fd),&errnum); \ - gzclearerr((fd)); \ + glzerror((fd),&errnum); \ + glzclearerr((fd)); \ if (errnum == Z_ERRNO) { flag = 1; } \ else { \ flag = not_ok_is_fatal || errnum != Z_OK; \ @@ -143,14 +145,14 @@ static INT lockfile(INT fd) { return FLOCK(fd, LOCK_EX); } static INT lockfile(INT fd) { return lockf(fd, F_LOCK, (off_t)0); } #endif -/* work around missing zlib API operation to extract a gzFile's fd */ +/* work around missing zlib API operation to extract a glzFile's fd */ typedef struct { int fd; - gzFile file; + glzFile file; } gzxfile; #define gzxfile_fd(x) (((gzxfile *)&BVIT(x,0))->fd) #define gzxfile_gzfile(x) (((gzxfile *)&BVIT(x,0))->file) -static ptr make_gzxfile(int fd, gzFile file) { +static ptr make_gzxfile(int fd, glzFile file) { ptr bv; bv = S_bytevector(sizeof(gzxfile)); @@ -161,7 +163,7 @@ static ptr make_gzxfile(int fd, gzFile file) { INT S_gzxfile_fd(ptr x) { return gzxfile_fd(x); } -gzFile S_gzxfile_gzfile(ptr x) { +glzFile S_gzxfile_gzfile(ptr x) { return gzxfile_gzfile(x); } @@ -169,7 +171,7 @@ ptr S_new_open_input_fd(const char *infilename, IBOOL compressed) { char *filename; INT saved_errno = 0; INT fd, dupfd, error, result, ok, flag; - gzFile file; + glzFile file; #ifdef PTHREADS ptr tc = get_thread_context(); #endif @@ -207,14 +209,14 @@ ptr S_new_open_input_fd(const char *infilename, IBOOL compressed) { return Scons(FIX(OPEN_ERROR_OTHER), str); } - if ((file = gzdopen(dupfd, "rb")) == Z_NULL) { + if ((file = glzdopen(dupfd, "rb")) == Z_NULL) { FD_GUARD(result == 0, error, result = CLOSE(fd)); FD_GUARD(result == 0, error, result = CLOSE(dupfd)); return Scons(FIX(OPEN_ERROR_OTHER), Sstring("unable to allocate compression state (too many open files?)")); } DEACTIVATE(tc) - compressed = !gzdirect(file); + compressed = !glzdirect(file); REACTIVATE(tc) if (compressed) { @@ -223,9 +225,9 @@ ptr S_new_open_input_fd(const char *infilename, IBOOL compressed) { return Sbox(make_gzxfile(dupfd, file)); } - GZ_GUARD(1, ok == 0 || ok == Z_BUF_ERROR, flag, file, ok = gzclose(file)); + GZ_GUARD(1, ok == 0 || ok == Z_BUF_ERROR, flag, file, ok = glzclose(file)); if (flag) {} /* make the compiler happy */ - if (LSEEK(fd, 0, SEEK_SET) != 0) { /* gzdirect does not leave fd at position 0 */ + if (LSEEK(fd, 0, SEEK_SET) != 0) { /* glzdirect does not leave fd at position 0 */ FD_GUARD(result == 0, error, result = CLOSE(fd)); return Scons(FIX(OPEN_ERROR_OTHER),Sstring("unable to reset after reading header bytes")); } @@ -234,7 +236,7 @@ ptr S_new_open_input_fd(const char *infilename, IBOOL compressed) { ptr S_compress_input_fd(INT fd, I64 pos) { INT dupfd, error, result, ok, flag; IBOOL compressed; - gzFile file; + glzFile file; #ifdef PTHREADS ptr tc = get_thread_context(); #endif @@ -243,13 +245,13 @@ ptr S_compress_input_fd(INT fd, I64 pos) { return S_strerror(errno); } - if ((file = gzdopen(dupfd, "rb")) == Z_NULL) { + if ((file = glzdopen(dupfd, "rb")) == Z_NULL) { FD_GUARD(result == 0, error, result = CLOSE(dupfd)); return Sstring("unable to allocate compression state (too many open files?)"); } DEACTIVATE(tc) - compressed = !gzdirect(file); + compressed = !glzdirect(file); REACTIVATE(tc) if (compressed) { @@ -258,24 +260,31 @@ ptr S_compress_input_fd(INT fd, I64 pos) { return Sbox(make_gzxfile(dupfd, file)); } - GZ_GUARD(1, ok == 0 || ok == Z_BUF_ERROR, flag, file, ok = gzclose(file)); + GZ_GUARD(1, ok == 0 || ok == Z_BUF_ERROR, flag, file, ok = glzclose(file)); if (flag) {} /* make the compiler happy */ - if (LSEEK(fd, pos, SEEK_SET) != pos) { /* gzdirect does not leave fd at same position */ + if (LSEEK(fd, pos, SEEK_SET) != pos) { /* glzdirect does not leave fd at same position */ return Sstring("unable to reset after reading header bytes"); } return MAKE_FD(fd); } -ptr S_compress_output_fd(INT fd) { - gzFile file; +ptr S_compress_output_fd(INT fd, IBOOL as_gz) { + glzFile file; + int as_append; #ifdef WIN32 - if ((file = gzdopen(fd, "wb")) == Z_NULL) { + as_append = 0; #else - if ((file = gzdopen(fd, (fcntl(fd, F_GETFL) & O_APPEND) ? "ab" : "wb")) == Z_NULL) { + as_append = fcntl(fd, F_GETFL) & O_APPEND; #endif + + if (as_gz) + file = glzdopen_gz(fd, as_append ? "ab" : "wb"); + else + file = glzdopen_lz4(fd, as_append ? "ab" : "wb"); + + if (file == Z_NULL) return Sstring("unable to allocate compression state (too many open files?)"); - } return Sbox(make_gzxfile(fd, file)); } @@ -283,7 +292,7 @@ ptr S_compress_output_fd(INT fd) { static ptr new_open_output_fd_helper( const char *infilename, INT mode, INT flags, IBOOL no_create, IBOOL no_fail, IBOOL no_truncate, - IBOOL append, IBOOL lock, IBOOL replace, IBOOL compressed) { + IBOOL append, IBOOL lock, IBOOL replace, IBOOL compressed, IBOOL as_gz) { char *filename; INT saved_errno = 0; iptr error; @@ -347,8 +356,12 @@ static ptr new_open_output_fd_helper( if (!compressed) { return MAKE_FD(fd); } - - gzFile file = gzdopen(fd, append ? "ab" : "wb"); + + glzFile file; + if (as_gz) + file = glzdopen_gz(fd, append ? "ab" : "wb"); + else + file = glzdopen_lz4(fd, append ? "ab" : "wb"); if (file == Z_NULL) { FD_GUARD(result == 0, error, result = CLOSE(fd)); return Scons(FIX(OPEN_ERROR_OTHER), Sstring("unable to allocate compression state")); @@ -360,11 +373,11 @@ static ptr new_open_output_fd_helper( ptr S_new_open_output_fd( const char *filename, INT mode, IBOOL no_create, IBOOL no_fail, IBOOL no_truncate, - IBOOL append, IBOOL lock, IBOOL replace, IBOOL compressed) { + IBOOL append, IBOOL lock, IBOOL replace, IBOOL compressed, IBOOL as_gz) { return new_open_output_fd_helper( filename, mode, O_BINARY | O_WRONLY, no_create, no_fail, no_truncate, - append, lock, replace, compressed); + append, lock, replace, compressed, as_gz); } ptr S_new_open_input_output_fd( @@ -377,14 +390,14 @@ ptr S_new_open_input_output_fd( return new_open_output_fd_helper( filename, mode, O_BINARY | O_RDWR, no_create, no_fail, no_truncate, - append, lock, replace, compressed); + append, lock, replace, compressed, 0); } ptr S_close_fd(ptr file, IBOOL gzflag) { INT saved_errno = 0; INT ok, flag; INT fd = gzflag ? 0 : GET_FD(file); - gzFile gzfile = gzflag ? gzxfile_gzfile(file) : NULL; + glzFile gzfile = gzflag ? gzxfile_gzfile(file) : NULL; #ifdef PTHREADS ptr tc = get_thread_context(); #endif @@ -401,7 +414,7 @@ ptr S_close_fd(ptr file, IBOOL gzflag) { FD_GUARD(ok == 0, flag, ok = CLOSE(fd)); } else { /* zlib 1.2.1 returns Z_BUF_ERROR when closing an empty file opened for reading */ - GZ_GUARD(1, ok == 0 || ok == Z_BUF_ERROR, flag, gzfile, ok = gzclose(gzfile)); + GZ_GUARD(1, ok == 0 || ok == Z_BUF_ERROR, flag, gzfile, ok = glzclose(gzfile)); } saved_errno = errno; REACTIVATE(tc) @@ -431,7 +444,7 @@ ptr S_bytevector_read(ptr file, ptr bv, iptr start, iptr count, IBOOL gzflag) { ptr tc = get_thread_context(); iptr m, flag = 0; INT fd = gzflag ? 0 : GET_FD(file); - gzFile gzfile = gzflag ? gzxfile_gzfile(file) : NULL; + glzFile gzfile = gzflag ? gzxfile_gzfile(file) : NULL; /* file is not locked; do not reference after deactivating thread! */ file = (ptr)-1; @@ -464,7 +477,7 @@ ptr S_bytevector_read(ptr file, ptr bv, iptr start, iptr count, IBOOL gzflag) { GZ_EINTR_GUARD( 1, m >= 0 || Sboolean_value(KEYBOARDINTERRUPTPENDING(tc)), flag, gzfile, - m = gzread(gzfile, &BVIT(bv,start), (GZ_IO_SIZE_T)count)); + m = glzread(gzfile, &BVIT(bv,start), (GZ_IO_SIZE_T)count)); } } saved_errno = errno; @@ -548,7 +561,7 @@ ptr S_bytevector_write(ptr file, ptr bv, iptr start, iptr count, IBOOL gzflag) { ptr tc = get_thread_context(); INT flag = 0, saved_errno = 0; INT fd = gzflag ? 0 : GET_FD(file); - gzFile gzfile = gzflag ? gzxfile_gzfile(file) : NULL; + glzFile gzfile = gzflag ? gzxfile_gzfile(file) : NULL; for (s = start, c = count; c > 0; s += i, c -= i) { iptr cx = c; @@ -566,7 +579,7 @@ ptr S_bytevector_write(ptr file, ptr bv, iptr start, iptr count, IBOOL gzflag) { GZ_EINTR_GUARD( i < 0, i > 0 || Sboolean_value(KEYBOARDINTERRUPTPENDING(tc)), flag, gzfile, - i = gzwrite(gzfile, &BVIT(bv,s), (GZ_IO_SIZE_T)cx)); + i = glzwrite(gzfile, &BVIT(bv,s), (GZ_IO_SIZE_T)cx)); } else { FD_EINTR_GUARD(i >= 0 || Sboolean_value(KEYBOARDINTERRUPTPENDING(tc)), flag, i = WRITE(fd, &BVIT(bv,s), (IO_SIZE_T)cx)); @@ -610,7 +623,7 @@ ptr S_put_byte(ptr file, INT byte, IBOOL gzflag) { ptr tc = get_thread_context(); INT flag = 0, saved_errno = 0; INT fd = gzflag ? 0 : GET_FD(file); - gzFile gzfile = gzflag ? gzxfile_gzfile(file) : NULL; + glzFile gzfile = gzflag ? gzxfile_gzfile(file) : NULL; octet buf[1]; buf[0] = (octet)byte; @@ -621,7 +634,7 @@ ptr S_put_byte(ptr file, INT byte, IBOOL gzflag) { GZ_EINTR_GUARD( i < 0, i > 0 || Sboolean_value(KEYBOARDINTERRUPTPENDING(tc)), flag, gzfile, - i = gzwrite(gzfile, buf, 1)); + i = glzwrite(gzfile, buf, 1)); } else { FD_EINTR_GUARD(i >= 0 || Sboolean_value(KEYBOARDINTERRUPTPENDING(tc)), flag, i = WRITE(fd, buf, 1)); @@ -651,7 +664,7 @@ ptr S_put_byte(ptr file, INT byte, IBOOL gzflag) { ptr S_get_fd_pos(ptr file, IBOOL gzflag) { errno = 0; if (gzflag) { - z_off_t offset = gzseek(gzxfile_gzfile(file), 0, SEEK_CUR); + z_off_t offset = glzseek(gzxfile_gzfile(file), 0, SEEK_CUR); if (offset != -1) return Sinteger64(offset); } else { OFF_T offset = LSEEK(GET_FD(file), 0, SEEK_CUR); @@ -670,7 +683,7 @@ ptr S_set_fd_pos(ptr file, ptr pos, IBOOL gzflag) { if (sizeof(z_off_t) != sizeof(I64)) if (offset != offset64) return Sstring("invalid position"); errno = 0; - if (gzseek(gzxfile_gzfile(file),offset,SEEK_SET) == offset) return Strue; + if (glzseek(gzxfile_gzfile(file),offset,SEEK_SET) == offset) return Strue; if (errno == 0) return Sstring("compression failed"); return S_strerror(errno); } else { @@ -791,58 +804,103 @@ static int is_valid_zlib_length(iptr count) { return count == (iptr)(uLong)count; } +static int is_valid_lz4_length(iptr len) { + return (len <= LZ4_MAX_INPUT_SIZE); +} + /* Accept `iptr` because we expect it to represent a bytevector size, which always fits in `iptr`. Return `uptr`, because the result might not fit in `iptr`. */ -uptr S_bytevector_compress_size(iptr s_count) { - if (is_valid_zlib_length(s_count)) - return compressBound((uLong)s_count); - else { - /* Compression will report "source too long" */ - return 0; +uptr S_bytevector_compress_size(iptr s_count, IBOOL as_gz) { + if (as_gz) { + if (is_valid_zlib_length(s_count)) + return compressBound((uLong)s_count); + else { + /* Compression will report "source too long" */ + return 0; + } + } else { + if (is_valid_lz4_length(s_count)) + return LZ4_compressBound((uLong)s_count); + else { + /* Compression will report "source too long" */ + return 0; + } } } ptr S_bytevector_compress(ptr dest_bv, iptr d_start, iptr d_count, - ptr src_bv, iptr s_start, iptr s_count) { + ptr src_bv, iptr s_start, iptr s_count, + IBOOL as_gz) { /* On error, an message-template string with ~s for the bytevector */ - int r; - uLong destLen; + if (as_gz) { + int r; + uLong destLen; + + if (!is_valid_zlib_length(s_count)) + return Sstring("source bytevector ~s is too large"); + + destLen = (uLong)d_count; + + r = compress(&BVIT(dest_bv, d_start), &destLen, &BVIT(src_bv, s_start), (uLong)s_count); + + if (r == Z_OK) + return FIX(destLen); + else if (r == Z_BUF_ERROR) + return Sstring("destination bytevector is too small for compressed form of ~s"); + else + return Sstring("internal error compressing ~s"); + } else { + int destLen; - if (!is_valid_zlib_length(s_count)) - return Sstring("source bytevector ~s is too large"); + if (!is_valid_lz4_length(s_count)) + return Sstring("source bytevector ~s is too large"); - destLen = (uLong)d_count; + destLen = (int)d_count; - r = compress(&BVIT(dest_bv, d_start), &destLen, &BVIT(src_bv, s_start), (uLong)s_count); + destLen = LZ4_compress_default((char *)&BVIT(src_bv, s_start), (char *)&BVIT(dest_bv, d_start), (int)s_count, (int)d_count); - if (r == Z_OK) - return FIX(destLen); - else if (r == Z_BUF_ERROR) - return Sstring("destination bytevector is too small for compressed form of ~s"); - else - return Sstring("internal error compressing ~s"); + if (destLen > 0) + return Sfixnum(destLen); + else + return Sstring("compression failed for ~s"); + } } ptr S_bytevector_uncompress(ptr dest_bv, iptr d_start, iptr d_count, - ptr src_bv, iptr s_start, iptr s_count) { + ptr src_bv, iptr s_start, iptr s_count, + IBOOL as_gz) { /* On error, an message-template string with ~s for the bytevector */ - int r; - uLongf destLen; + if (as_gz) { + int r; + uLongf destLen; - if (!is_valid_zlib_length(d_count)) - return Sstring("expected result size of uncompressed source ~s is too large"); + if (!is_valid_zlib_length(d_count)) + return Sstring("expected result size of uncompressed source ~s is too large"); - destLen = (uLongf)d_count; + destLen = (uLongf)d_count; - r = uncompress(&BVIT(dest_bv, d_start), &destLen, &BVIT(src_bv, s_start), (uLong)s_count); + r = uncompress(&BVIT(dest_bv, d_start), &destLen, &BVIT(src_bv, s_start), (uLong)s_count); - if (r == Z_OK) - return FIX(destLen); - else if (r == Z_BUF_ERROR) - return Sstring("uncompressed ~s is larger than expected size"); - else if (r == Z_DATA_ERROR) - return Sstring("invalid data in source bytevector ~s"); - else - return Sstring("internal error uncompressing ~s"); + if (r == Z_OK) + return FIX(destLen); + else if (r == Z_BUF_ERROR) + return Sstring("uncompressed ~s is larger than expected size"); + else if (r == Z_DATA_ERROR) + return Sstring("invalid data in source bytevector ~s"); + else + return Sstring("internal error uncompressing ~s"); + } else { + int r; + + if (!is_valid_lz4_length(d_count)) + return Sstring("expected result size of uncompressed source ~s is too large"); + + r = LZ4_decompress_safe((char *)&BVIT(src_bv, s_start), (char *)&BVIT(dest_bv, d_start), (int)s_count, (int)d_count); + + if (r >= 0) + return Sfixnum(r); + else + return Sstring("internal error uncompressing ~s"); + } } diff --git a/c/scheme.c b/c/scheme.c index 4f14cbcd66..1dd9c86b66 100644 --- a/c/scheme.c +++ b/c/scheme.c @@ -551,7 +551,7 @@ static IBOOL next_path(path, name, ext, sp, dsp) char *path; const char *name, * /* BOOT FILES */ typedef struct { - gzFile file; + glzFile file; char path[PATH_MAX]; } boot_desc; @@ -559,8 +559,8 @@ typedef struct { static boot_desc bd[MAX_BOOT_FILES]; /* locally defined functions */ -static uptr zget_uptr PROTO((gzFile file, uptr *pn)); -static INT zgetstr PROTO((gzFile file, char *s, iptr max)); +static uptr zget_uptr PROTO((glzFile file, uptr *pn)); +static INT zgetstr PROTO((glzFile file, char *s, iptr max)); static IBOOL find_boot PROTO((const char *name, const char *ext, int fd, IBOOL errorp)); static void load PROTO((ptr tc, iptr n, IBOOL base)); static void check_boot_file_state PROTO((const char *who)); @@ -574,7 +574,7 @@ static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IB #else char *expandedpath; #endif - gzFile file; + glzFile file; if ((fd != -1) || S_fixedpathp(name)) { if (strlen(name) >= PATH_MAX) { @@ -585,17 +585,17 @@ static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IB path = name; if (fd != -1) { - file = gzdopen(fd, "rb"); + file = glzdopen(fd, "rb"); } else { #ifdef WIN32 expandedpath = S_malloc_wide_pathname(path); - file = gzopen_w(expandedpath, "rb"); + file = glzopen_w(expandedpath, "rb"); #else expandedpath = S_malloc_pathname(path); - file = gzopen(expandedpath, "rb"); + file = glzopen(expandedpath, "rb"); #endif /* assumption (seemingly true based on a glance at the source code): - gzopen doesn't squirrel away a pointer to expandedpath. */ + glzopen doesn't squirrel away a pointer to expandedpath. */ free(expandedpath); } @@ -611,14 +611,14 @@ static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IB if (verbose) fprintf(stderr, "trying %s...opened\n", path); /* check for magic number */ - if (gzgetc(file) != fasl_type_header || - gzgetc(file) != 0 || - gzgetc(file) != 0 || - gzgetc(file) != 0 || - gzgetc(file) != 'c' || - gzgetc(file) != 'h' || - gzgetc(file) != 'e' || - gzgetc(file) != 'z') { + if (glzgetc(file) != fasl_type_header || + glzgetc(file) != 0 || + glzgetc(file) != 0 || + glzgetc(file) != 0 || + glzgetc(file) != 'c' || + glzgetc(file) != 'h' || + glzgetc(file) != 'e' || + glzgetc(file) != 'z') { fprintf(stderr, "malformed fasl-object header in %s\n", path); S_abnormal_exit(); } @@ -626,7 +626,7 @@ static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IB /* check version */ if (zget_uptr(file, &n) != 0) { fprintf(stderr, "unexpected end of file on %s\n", path); - gzclose(file); + glzclose(file); S_abnormal_exit(); } @@ -634,21 +634,21 @@ static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IB fprintf(stderr, "%s is for Version %s; ", path, S_format_scheme_version(n)); /* use separate fprintf since S_format_scheme_version returns static string */ fprintf(stderr, "need Version %s\n", S_format_scheme_version(scheme_version)); - gzclose(file); + glzclose(file); S_abnormal_exit(); } /* check machine type */ if (zget_uptr(file, &n) != 0) { fprintf(stderr, "unexpected end of file on %s\n", path); - gzclose(file); + glzclose(file); S_abnormal_exit(); } if (n != machine_type) { fprintf(stderr, "%s is for machine-type %s; need machine-type %s\n", path, S_lookup_machine_type(n), S_lookup_machine_type(machine_type)); - gzclose(file); + glzclose(file); S_abnormal_exit(); } } else { @@ -671,13 +671,13 @@ static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IB #ifdef WIN32 expandedpath = S_malloc_wide_pathname(path); - file = gzopen_w(expandedpath, "rb"); + file = glzopen_w(expandedpath, "rb"); #else expandedpath = S_malloc_pathname(path); - file = gzopen(expandedpath, "rb"); + file = glzopen(expandedpath, "rb"); #endif /* assumption (seemingly true based on a glance at the source code): - gzopen doesn't squirrel away a pointer to expandedpath. */ + glzopen doesn't squirrel away a pointer to expandedpath. */ free(expandedpath); if (!file) { if (verbose) fprintf(stderr, "trying %s...cannot open\n", path); @@ -687,23 +687,23 @@ static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IB if (verbose) fprintf(stderr, "trying %s...opened\n", path); /* check for magic number */ - if (gzgetc(file) != fasl_type_header || - gzgetc(file) != 0 || - gzgetc(file) != 0 || - gzgetc(file) != 0 || - gzgetc(file) != 'c' || - gzgetc(file) != 'h' || - gzgetc(file) != 'e' || - gzgetc(file) != 'z') { + if (glzgetc(file) != fasl_type_header || + glzgetc(file) != 0 || + glzgetc(file) != 0 || + glzgetc(file) != 0 || + glzgetc(file) != 'c' || + glzgetc(file) != 'h' || + glzgetc(file) != 'e' || + glzgetc(file) != 'z') { if (verbose) fprintf(stderr, "malformed fasl-object header in %s\n", path); - gzclose(file); + glzclose(file); continue; } /* check version */ if (zget_uptr(file, &n) != 0) { if (verbose) fprintf(stderr, "unexpected end of file on %s\n", path); - gzclose(file); + glzclose(file); continue; } @@ -713,14 +713,14 @@ static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IB /* use separate fprintf since S_format_scheme_version returns static string */ fprintf(stderr, "need Version %s\n", S_format_scheme_version(scheme_version)); } - gzclose(file); + glzclose(file); continue; } /* check machine type */ if (zget_uptr(file, &n) != 0) { if (verbose) fprintf(stderr, "unexpected end of file on %s\n", path); - gzclose(file); + glzclose(file); continue; } @@ -728,7 +728,7 @@ static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IB if (verbose) fprintf(stderr, "%s is for machine-type %s; need machine-type %s\n", path, S_lookup_machine_type(n), S_lookup_machine_type(machine_type)); - gzclose(file); + glzclose(file); continue; } @@ -738,56 +738,56 @@ static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IB if (verbose) fprintf(stderr, "version and machine type check\n"); - if (gzgetc(file) != '(') { /* ) */ + if (glzgetc(file) != '(') { /* ) */ fprintf(stderr, "malformed boot file %s\n", path); - gzclose(file); + glzclose(file); S_abnormal_exit(); } /* ( */ - if ((c = gzgetc(file)) == ')') { + if ((c = glzgetc(file)) == ')') { if (boot_count != 0) { fprintf(stderr, "base boot file %s must come before other boot files\n", path); - gzclose(file); + glzclose(file); S_abnormal_exit(); } } else { if (boot_count == 0) { for (;;) { - gzungetc(c, file); + glzungetc(c, file); /* try to load heap or boot file this boot file requires */ if (zgetstr(file, buf, PATH_MAX) != 0) { fprintf(stderr, "unexpected end of file on %s\n", path); - gzclose(file); + glzclose(file); S_abnormal_exit(); } if (find_boot(buf, ".boot", -1, 0)) break; - if ((c = gzgetc(file)) == ')') { + if ((c = glzgetc(file)) == ')') { char *sep; char *wastebuf[8]; fprintf(stderr, "cannot find subordinate boot file "); - gzrewind(file); - (void) gzread(file, wastebuf, 8); /* magic number */ + glzrewind(file); + (void) glzread(file, wastebuf, 8); /* magic number */ (void) zget_uptr(file, &n); /* version */ (void) zget_uptr(file, &n); /* machine type */ - (void) gzgetc(file); /* open paren */ + (void) glzgetc(file); /* open paren */ for (sep = ""; ; sep = "or ") { - if ((c = gzgetc(file)) == ')') break; - gzungetc(c, file); + if ((c = glzgetc(file)) == ')') break; + glzungetc(c, file); (void) zgetstr(file, buf, PATH_MAX); fprintf(stderr, "%s%s.boot ", sep, buf); } fprintf(stderr, "required by %s\n", path); - gzclose(file); + glzclose(file); S_abnormal_exit(); } } } /* skip to end of header */ - while ((c = gzgetc(file)) != ')') { + while ((c = glzgetc(file)) != ')') { if (c < 0) { fprintf(stderr, "malformed boot file %s\n", path); - gzclose(file); + glzclose(file); S_abnormal_exit(); } } @@ -805,14 +805,14 @@ static IBOOL find_boot(name, ext, fd, errorp) const char *name, *ext; int fd; IB return 1; } -static uptr zget_uptr(gzFile file, uptr *pn) { +static uptr zget_uptr(glzFile file, uptr *pn) { uptr n, m; int c; octet k; - if ((c = gzgetc(file)) < 0) return -1; + if ((c = glzgetc(file)) < 0) return -1; k = (octet)c; n = k >> 1; while (k & 1) { - if ((c = gzgetc(file)) < 0) return -1; + if ((c = glzgetc(file)) < 0) return -1; k = (octet)c; m = n << 7; if (m >> 7 != n) return -1; @@ -822,13 +822,13 @@ static uptr zget_uptr(gzFile file, uptr *pn) { return 0; } -static INT zgetstr(file, s, max) gzFile file; char *s; iptr max; { +static INT zgetstr(file, s, max) glzFile file; char *s; iptr max; { ICHAR c; while (max-- > 0) { - if ((c = gzgetc(file)) < 0) return -1; + if ((c = glzgetc(file)) < 0) return -1; if (c == ' ' || c == ')') { - if (c == ')') gzungetc(c, file); + if (c == ')') glzungetc(c, file); *s = 0; return 0; } @@ -923,7 +923,7 @@ static void load(tc, n, base) ptr tc; iptr n; IBOOL base; { } S_G.load_binary = Sfalse; - gzclose(bd[n].file); + glzclose(bd[n].file); } /***************************************************************************/ diff --git a/c/system.h b/c/system.h index 565155aacf..b078417a6a 100644 --- a/c/system.h +++ b/c/system.h @@ -24,7 +24,7 @@ #include "version.h" #include -#include "zlib.h" +#include "compress-io.h" #include #include "thread.h" diff --git a/configure b/configure index a62366416b..7c3eaea06b 100755 --- a/configure +++ b/configure @@ -42,6 +42,14 @@ disablex11=no : ${CPPFLAGS:=""} : ${CFLAGS:=""} : ${LDFLAGS:=""} +zlibInc=-I../zlib +LZ4Inc=-I../lz4/lib +zlibDep=../zlib/libz.a +LZ4Dep=../lz4/lib/liblz4.a +zlibLib=../zlib/libz.a +LZ4Lib=../lz4/lib/liblz4.a +zlibHeaderDep="../zlib/zconf.h ../zlib/zlib.h" +LZ4HeaderDep="../lz4/lib/lz4.h ../lz4/lib/lz4frame.h" # On WSL, set OS to "Windows_NT" to create a Windows # build instead of a Linux (on Windows) build: @@ -216,6 +224,18 @@ while [ $# != 0 ] ; do LDFLAGS=*) LDFLAGS=`echo $1 | sed -e 's/^LDFLAGS=//'` ;; + ZLIB=*) + zlibLib=`echo $1 | sed -e 's/^ZLIB=//'` + zlibInc= + zlibDep= + zlibHeaderDep= + ;; + LZ4=*) + LZ4Lib=`echo $1 | sed -e 's/^LZ4=//'` + LZ4Inc= + LZ4Dep= + LZ4HeaderDep= + ;; *) echo "option '$1' unrecognized or missing an argument; try $0 --help" exit 1 @@ -294,6 +314,8 @@ if [ "$help" = "yes" ]; then echo " CPPFLAGS= additional C preprocessor flags ($CPPFLAGS)" echo " CFLAGS= additional C compiler flags ($CFLAGS)" echo " LDFLAGS= additional linker flags ($LDFLAGS)" + echo " ZLIB= link to static instead of own zlib" + echo " LZ4= link to static instead of own LZ4" echo "" echo "Available machine types: $machs" echo "" @@ -331,9 +353,18 @@ else (curl -L -o v1.9.tar.gz https://github.com/nanopass/nanopass-framework-scheme/archive/v1.9.tar.gz && tar -zxf v1.9.tar.gz && mv nanopass-framework-scheme-1.9 nanopass && rm v1.9.tar.gz) || exit 1 fi - if [ ! -f 'zlib/configure' ] ; then - rmdir zlib > /dev/null 2>&1 - (curl -L -o v1.2.11.tar.gz https://github.com/madler/zlib/archive/v1.2.11.tar.gz && tar -xzf v1.2.11.tar.gz && mv zlib-1.2.11 zlib && rm v1.2.11.tar.gz) || exit 1 + if [ "${zlibDep}" != "" ] ; then + if [ ! -f 'zlib/configure' ] ; then + rmdir zlib > /dev/null 2>&1 + (curl -L -o v1.2.11.tar.gz https://github.com/madler/zlib/archive/v1.2.11.tar.gz && tar -xzf v1.2.11.tar.gz && mv zlib-1.2.11 zlib && rm v1.2.11.tar.gz) || exit 1 + fi + fi + + if [ "${LZ4Dep}" != "" ] ; then + if [ ! -f 'lz4/lib/Makefile' ] ; then + rmdir lz4 > /dev/null 2>&1 + (curl -L -o v1.8.3.tar.gz https://github.com/lz4/lz4/archive/v1.8.3.tar.gz && tar -xzf v1.8.3.tar.gz && mv lz4-1.8.3 lz4 && rm v1.8.3.tar.gz) || exit 1 + fi fi if [ ! -f 'stex/Mf-stex' ] ; then @@ -389,4 +420,12 @@ CC=$CC CPPFLAGS=$CPPFLAGS CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS +zlibInc=$zlibInc +LZ4Inc=$LZ4Inc +zlibDep=$zlibDep +LZ4Dep=$LZ4Dep +zlibLib=$zlibLib +LZ4Lib=$LZ4Lib +zlibHeaderDep=$zlibHeaderDep +LZ4HeaderDep=$LZ4HeaderDep END diff --git a/csug/io.stex b/csug/io.stex index 0c0bfc1ea4..a8bf76e4fd 100644 --- a/csug/io.stex +++ b/csug/io.stex @@ -207,7 +207,9 @@ Section~\ref{TSPL:SECTOPENINGFILES} of {\TSPLFOUR}. \begin{description} \item[\var{compressed}:] An output file should be compressed when written; and a compressed input -file should be decompressed when read. +file should be decompressed when read. The compression format for output +is determined by the \scheme{compress-format} parameter, while the compression +format on input is inferred. \item[\var{replace}:] For output files only, replace (remove and recreate) the existing file if @@ -972,8 +974,35 @@ If the port is an output port, subsequent output sent to the port will be compressed. If the port is an input port, subsequent input will be decompressed if and only if the port is currently pointing at compressed data. +The compression format for output +is determined by the \scheme{compress-format} parameter, while the compression +format on input is inferred. This procedure has no effect if the port is already set for compression. +%---------------------------------------------------------------------------- +\entryheader +\formdef{compress-format}{\categorythreadparameter}{compress-format} +\listlibraries +\endnoskipentryheader + +\noindent +\scheme{compress-format} is a parameter that determines the +compression algorithm and format that is used for output. Currently, +the possible values of the parameter are \scheme{'lz4} (the default) +and \scheme{'gzip}. + +The \scheme{'lz4} format uses the LZ4 compression library developed by +Yann Collet. +It is therefore compatible with the \scheme{lz4} program, which +means that \scheme{lz4} may be used to uncompress files produced +by {\ChezScheme} and visa versa. + +The \scheme{'gzip} format uses the zlib compression library developed by +Jean-loup Gailly and Mark Adler. +It is therefore compatible with the \scheme{gzip} program, which +means that \scheme{gzip} may be used to uncompress files produced +by {\ChezScheme} and visa versa. + \section{String Ports\label{SECTIOSTRINGPORTS}} @@ -1224,7 +1253,8 @@ An option list is a list containing zero or more symbolic option names. The mutually exclusive \scheme{compressed} and \scheme{uncompressed} options determine whether the input file -should be decompressed if it is compressed. +should be decompressed if it is compressed (where the compression +format is inferred). (See \scheme{open-output-file}.) The default is \scheme{uncompressed}, so the \scheme{uncompressed} option is useful only as documentation. @@ -1828,12 +1858,7 @@ The default behavior is to raise an exception. The mutually exclusive \scheme{compressed} and \scheme{uncompressed} options determine whether the output file is to be compressed. -Compression is performed with the use of the -zlib compression library developed by -Jean-loup Gailly and Mark Adler. -It is therefore compatible with the \scheme{gzip} program, which -means that \scheme{gzip} may be used to uncompress files produced -by {\ChezScheme} and visa versa. +The compression format is determined by the \scheme{compress-format} parameter. Files are uncompressed by default, so the \scheme{uncompressed} option is useful only as documentation. diff --git a/csug/objects.stex b/csug/objects.stex index 06776c2852..f94ddd3efd 100644 --- a/csug/objects.stex +++ b/csug/objects.stex @@ -1178,7 +1178,8 @@ is immutable; otherwise, the result is an immutable bytevector with the same con The result is the raw compressed data with a minimal header to record the uncompressed size and the compression mode. The result does not include the header that is written by port-based compression using the -\scheme{compressed} option. +\scheme{compressed} option. The compression format is determined by the +\scheme{compress-format} parameter. %---------------------------------------------------------------------------- diff --git a/lz4 b/lz4 new file mode 160000 index 0000000000..c438548312 --- /dev/null +++ b/lz4 @@ -0,0 +1 @@ +Subproject commit c4385483121578644db7f865d4051713b4b254c2 diff --git a/mats/bytevector.ms b/mats/bytevector.ms index 262a721eb2..0ef426f5d0 100644 --- a/mats/bytevector.ms +++ b/mats/bytevector.ms @@ -11277,6 +11277,7 @@ (mat bytevector-compress + (parameters [compress-format 'gzip] [compress-format 'lz4]) (error? (bytevector-compress 7)) (error? (bytevector-compress "hello")) (error? (bytevector-uncompress 7)) diff --git a/mats/io.ms b/mats/io.ms index cbfb9ec9c6..43897ba8d8 100644 --- a/mats/io.ms +++ b/mats/io.ms @@ -2127,6 +2127,7 @@ ) (mat compression + (parameters [compress-format 'gzip] [compress-format 'lz4]) (let () (define cp (lambda (src dst) @@ -3071,6 +3072,7 @@ ) (mat compression-textual + (parameters [compress-format 'gzip] [compress-format 'lz4]) (let () (define cp (lambda (src dst) diff --git a/mats/mat.ss b/mats/mat.ss index bef5de3b9e..cc04036f81 100644 --- a/mats/mat.ss +++ b/mats/mat.ss @@ -19,7 +19,13 @@ (eval-when (load eval) (define-syntax mat (lambda (x) - (syntax-case x () + (syntax-case x (parameters) + [(_ x (parameters [param val] ...) e ...) + #'(for-each (lambda (p v) + (parameterize ([p v]) + (mat x e ...))) + (list param ...) + (list val ...))] [(_ x e ...) (with-syntax ([(source ...) (map (lambda (clause) diff --git a/mats/patch-compile-0-f-t-f b/mats/patch-compile-0-f-t-f index c56bc76226..a548d2d2ec 100644 --- a/mats/patch-compile-0-f-t-f +++ b/mats/patch-compile-0-f-t-f @@ -1,5 +1,5 @@ -*** errors-compile-0-f-f-f 2019-03-15 12:05:55.397368315 -0400 ---- errors-compile-0-f-t-f 2019-03-15 11:24:12.070638664 -0400 +*** errors-compile-0-f-f-f 2019-03-20 19:56:48.000000000 -0600 +--- errors-compile-0-f-t-f 2019-03-20 19:09:54.000000000 -0600 *************** *** 125,131 **** 3.mo:Expected error in mat dipa-letrec: "attempt to reference undefined variable a". @@ -58,7 +58,7 @@ 3.mo:Expected error in mat mrvs: "attempt to apply non-procedure 17". 3.mo:Expected error in mat mrvs: "returned two values to single value return context". *************** -*** 3702,3708 **** +*** 3712,3718 **** misc.mo:Expected error in mat cpletrec: "foreign-procedure: no entry for "foo"". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable q". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable bar". @@ -66,7 +66,7 @@ misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable b". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable b". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable a". ---- 3702,3708 ---- +--- 3712,3718 ---- misc.mo:Expected error in mat cpletrec: "foreign-procedure: no entry for "foo"". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable q". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable bar". @@ -75,7 +75,7 @@ misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable b". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable a". *************** -*** 7170,7177 **** +*** 7182,7189 **** 7.mo:Expected error in mat bytes-allocated: "bytes-allocated: invalid space gnu". 7.mo:Expected error in mat error: "a: hit me!". 7.mo:Expected error in mat error: "f: n is 0". @@ -84,7 +84,7 @@ record.mo:Expected error in mat record2: "invalid value 3 for foreign type double-float". record.mo:Expected error in mat record2: "3 is not of type #". record.mo:Expected error in mat record2: "make-record-type: invalid field list ((immutable double-float a) . b)". ---- 7170,7177 ---- +--- 7182,7189 ---- 7.mo:Expected error in mat bytes-allocated: "bytes-allocated: invalid space gnu". 7.mo:Expected error in mat error: "a: hit me!". 7.mo:Expected error in mat error: "f: n is 0". @@ -94,7 +94,7 @@ record.mo:Expected error in mat record2: "3 is not of type #". record.mo:Expected error in mat record2: "make-record-type: invalid field list ((immutable double-float a) . b)". *************** -*** 7179,7193 **** +*** 7191,7205 **** record.mo:Expected error in mat type-descriptor: "invalid syntax (type-descriptor 3)". record.mo:Expected error in mat type-descriptor: "type-descriptor: unrecognized record car". record.mo:Expected error in mat record3: "variable set-fudge-a! is not bound". @@ -110,7 +110,7 @@ record.mo:Expected error in mat record9: "record-reader: invalid input #f". record.mo:Expected error in mat record9: "record-reader: invalid second argument fudge". record.mo:Expected error in mat record9: "record-reader: invalid second argument fudge". ---- 7179,7193 ---- +--- 7191,7205 ---- record.mo:Expected error in mat type-descriptor: "invalid syntax (type-descriptor 3)". record.mo:Expected error in mat type-descriptor: "type-descriptor: unrecognized record car". record.mo:Expected error in mat record3: "variable set-fudge-a! is not bound". @@ -127,7 +127,7 @@ record.mo:Expected error in mat record9: "record-reader: invalid second argument fudge". record.mo:Expected error in mat record9: "record-reader: invalid second argument fudge". *************** -*** 7200,7225 **** +*** 7212,7237 **** record.mo:Expected error in mat record10: "read: unresolvable cycle constructing record of type # at char 3 of #". record.mo:Expected error in mat record16: "read: unresolvable cycle constructing record of type # at char 3 of #". record.mo:Expected error in mat record16: "read: unresolvable cycle constructing record of type # at char 3 of #". @@ -154,7 +154,7 @@ record.mo:Expected error in mat foreign-data: "foreign-alloc: 0 is not a positive fixnum". record.mo:Expected error in mat foreign-data: "foreign-alloc: is not a positive fixnum". record.mo:Expected error in mat foreign-data: "foreign-alloc: -5 is not a positive fixnum". ---- 7200,7225 ---- +--- 7212,7237 ---- record.mo:Expected error in mat record10: "read: unresolvable cycle constructing record of type # at char 3 of #". record.mo:Expected error in mat record16: "read: unresolvable cycle constructing record of type # at char 3 of #". record.mo:Expected error in mat record16: "read: unresolvable cycle constructing record of type # at char 3 of #". @@ -182,7 +182,7 @@ record.mo:Expected error in mat foreign-data: "foreign-alloc: is not a positive fixnum". record.mo:Expected error in mat foreign-data: "foreign-alloc: -5 is not a positive fixnum". *************** -*** 7350,7388 **** +*** 7362,7400 **** record.mo:Expected error in mat record22: "invalid field specifier (immutable creepy q)". record.mo:Expected error in mat record22: "invalid field specifier (immutable creepy q)". record.mo:Expected error in mat record23: "make-record-type: cannot extend sealed record type #". @@ -222,7 +222,7 @@ record.mo:Expected error in mat record?: "record?: 4 is not a record type descriptor". record.mo:Expected error in mat record?: "record?: a is not a record type descriptor". record.mo:Expected error in mat record?: "record?: #(1) is not a record type descriptor". ---- 7350,7388 ---- +--- 7362,7400 ---- record.mo:Expected error in mat record22: "invalid field specifier (immutable creepy q)". record.mo:Expected error in mat record22: "invalid field specifier (immutable creepy q)". record.mo:Expected error in mat record23: "make-record-type: cannot extend sealed record type #". @@ -263,7 +263,7 @@ record.mo:Expected error in mat record?: "record?: a is not a record type descriptor". record.mo:Expected error in mat record?: "record?: #(1) is not a record type descriptor". *************** -*** 7397,7453 **** +*** 7409,7465 **** record.mo:Expected error in mat r6rs-records-procedural: "make-record-constructor-descriptor: invalid protocol flimflam". record.mo:Expected error in mat r6rs-records-procedural: "attempt to apply non-procedure not-a-procedure". record.mo:Expected error in mat r6rs-records-procedural: "attempt to apply non-procedure spam". @@ -321,7 +321,7 @@ record.mo:Expected error in mat r6rs-records-syntactic: "define-record-type: incompatible record type cpoint - different parent". record.mo:Expected error in mat r6rs-records-syntactic: "define-record-type: incompatible record type cpoint - different parent". record.mo:Expected error in mat r6rs-records-syntactic: "cannot extend define-record-type parent fratrat". ---- 7397,7453 ---- +--- 7409,7465 ---- record.mo:Expected error in mat r6rs-records-procedural: "make-record-constructor-descriptor: invalid protocol flimflam". record.mo:Expected error in mat r6rs-records-procedural: "attempt to apply non-procedure not-a-procedure". record.mo:Expected error in mat r6rs-records-procedural: "attempt to apply non-procedure spam". diff --git a/mats/patch-compile-0-t-f-f b/mats/patch-compile-0-t-f-f index 1b7fdfb48f..4f63ec4085 100644 --- a/mats/patch-compile-0-t-f-f +++ b/mats/patch-compile-0-t-f-f @@ -1,5 +1,5 @@ -*** errors-compile-0-f-f-f 2019-03-15 12:05:55.397368315 -0400 ---- errors-compile-0-t-f-f 2019-03-15 11:33:18.696675715 -0400 +*** errors-compile-0-f-f-f 2019-03-20 19:56:48.000000000 -0600 +--- errors-compile-0-t-f-f 2019-03-20 19:18:54.000000000 -0600 *************** *** 93,99 **** 3.mo:Expected error in mat case-lambda: "incorrect number of arguments to #". @@ -3719,7 +3719,7 @@ bytevector.mo:Expected error in mat bytevector=?: "bytevector=?: "a" is not a bytevector". bytevector.mo:Expected error in mat tspl/csug-examples: "invalid endianness "spam"". *************** -*** 3632,3643 **** +*** 3642,3653 **** bytevector.mo:Expected error in mat bytevector-compress: "bytevector-uncompress: bytevector #vu8(255 255 255 255 255 255 ...) claims invalid uncompressed size ". misc.mo:Expected error in mat compiler1: "variable i-am-not-bound is not bound". misc.mo:Expected error in mat compiler1: "attempt to apply non-procedure oops". @@ -3732,7 +3732,7 @@ misc.mo:Expected error in mat compiler3: "incorrect argument count in call (consumer 1 2) at line 3, char 19 of testfile.ss". misc.mo:Expected error in mat compiler3: "incorrect argument count in call (consumer 1 2)". misc.mo:Expected error in mat compiler3: "variable goto is not bound". ---- 3632,3643 ---- +--- 3642,3653 ---- bytevector.mo:Expected error in mat bytevector-compress: "bytevector-uncompress: bytevector #vu8(255 255 255 255 255 255 ...) claims invalid uncompressed size ". misc.mo:Expected error in mat compiler1: "variable i-am-not-bound is not bound". misc.mo:Expected error in mat compiler1: "attempt to apply non-procedure oops". @@ -3746,7 +3746,7 @@ misc.mo:Expected error in mat compiler3: "incorrect argument count in call (consumer 1 2)". misc.mo:Expected error in mat compiler3: "variable goto is not bound". *************** -*** 3709,3729 **** +*** 3719,3739 **** misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable b". misc.mo:Expected error in mat cpletrec: "attempt to assign undefined variable b". misc.mo:Expected error in mat compile-profile: "compile-profile: invalid mode src [must be #f, #t, source, or block]". @@ -3768,7 +3768,7 @@ misc.mo:Expected error in mat compile-profile: "profile-dump-data: #t is not a string". misc.mo:Expected error in mat compile-profile: "profile-dump-data: invalid dump 17". misc.mo:Expected error in mat compile-profile: "profile-dump-data: invalid dump (17)". ---- 3709,3729 ---- +--- 3719,3739 ---- misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable b". misc.mo:Expected error in mat cpletrec: "attempt to assign undefined variable b". misc.mo:Expected error in mat compile-profile: "compile-profile: invalid mode src [must be #f, #t, source, or block]". @@ -3791,7 +3791,7 @@ misc.mo:Expected error in mat compile-profile: "profile-dump-data: invalid dump 17". misc.mo:Expected error in mat compile-profile: "profile-dump-data: invalid dump (17)". *************** -*** 3756,3762 **** +*** 3766,3772 **** misc.mo:Expected error in mat $fasl-file-equal?: "$fasl-file-equal?: failed for probably-does-not-exist: no such file or directory". misc.mo:Expected error in mat $fasl-file-equal?: "$fasl-file-equal?: failed for probably-does-not-exist: no such file or directory". misc.mo:Expected error in mat $fasl-file-equal?: "$fasl-file-equal?: record comparison failed while comparing testfile-fatfib1.so and testfile-fatfib3.so within fasl entry 2". @@ -3799,7 +3799,7 @@ misc.mo:Expected error in mat cost-center: "with-cost-center: foo is not a cost center". misc.mo:Expected error in mat cost-center: "with-cost-center: bar is not a procedure". misc.mo:Expected error in mat cost-center: "cost-center-instruction-count: 5 is not a cost center". ---- 3756,3762 ---- +--- 3766,3772 ---- misc.mo:Expected error in mat $fasl-file-equal?: "$fasl-file-equal?: failed for probably-does-not-exist: no such file or directory". misc.mo:Expected error in mat $fasl-file-equal?: "$fasl-file-equal?: failed for probably-does-not-exist: no such file or directory". misc.mo:Expected error in mat $fasl-file-equal?: "$fasl-file-equal?: record comparison failed while comparing testfile-fatfib1.so and testfile-fatfib3.so within fasl entry 2". @@ -3808,7 +3808,7 @@ misc.mo:Expected error in mat cost-center: "with-cost-center: bar is not a procedure". misc.mo:Expected error in mat cost-center: "cost-center-instruction-count: 5 is not a cost center". *************** -*** 3810,3817 **** +*** 3820,3827 **** misc.mo:Expected error in mat apropos: "apropos: 3 is not a symbol or string". misc.mo:Expected error in mat apropos: "apropos: (hit me) is not a symbol or string". misc.mo:Expected error in mat apropos: "apropos-list: b is not an environment". @@ -3817,7 +3817,7 @@ misc.mo:Expected error in mat apropos: "variable $apropos-unbound1 is not bound". misc.mo:Expected error in mat apropos: "variable $apropos-unbound2 is not bound". misc.mo:Expected error in mat simplify-if: "textual-port?: a is not a port". ---- 3810,3817 ---- +--- 3820,3827 ---- misc.mo:Expected error in mat apropos: "apropos: 3 is not a symbol or string". misc.mo:Expected error in mat apropos: "apropos: (hit me) is not a symbol or string". misc.mo:Expected error in mat apropos: "apropos-list: b is not an environment". @@ -3827,7 +3827,7 @@ misc.mo:Expected error in mat apropos: "variable $apropos-unbound2 is not bound". misc.mo:Expected error in mat simplify-if: "textual-port?: a is not a port". *************** -*** 3839,3847 **** +*** 3849,3857 **** cp0.mo:Expected error in mat cp0-regression: "condition: #f is not a condition". cp0.mo:Expected error in mat cp0-regression: "apply: 0 is not a proper list". cp0.mo:Expected error in mat cp0-regression: "apply: 2 is not a proper list". @@ -3837,7 +3837,7 @@ cp0.mo:Expected error in mat expand-output: "expand-output: #t is not a textual output port or #f". cp0.mo:Expected error in mat expand-output: "expand-output: # is not a textual output port or #f". cp0.mo:Expected error in mat expand/optimize-output: "expand/optimize-output: #t is not a textual output port or #f". ---- 3839,3847 ---- +--- 3849,3857 ---- cp0.mo:Expected error in mat cp0-regression: "condition: #f is not a condition". cp0.mo:Expected error in mat cp0-regression: "apply: 0 is not a proper list". cp0.mo:Expected error in mat cp0-regression: "apply: 2 is not a proper list". @@ -3848,7 +3848,7 @@ cp0.mo:Expected error in mat expand-output: "expand-output: # is not a textual output port or #f". cp0.mo:Expected error in mat expand/optimize-output: "expand/optimize-output: #t is not a textual output port or #f". *************** -*** 3905,3913 **** +*** 3915,3923 **** 5_6.mo:Expected error in mat list->fxvector: "list->fxvector: (1 2 . 3) is not a proper list". 5_6.mo:Expected error in mat list->fxvector: "list->fxvector: (1 2 3 2 3 2 ...) is circular". 5_6.mo:Expected error in mat fxvector->list: "fxvector->list: (a b c) is not an fxvector". @@ -3858,7 +3858,7 @@ 5_6.mo:Expected error in mat vector-map: "vector-map: #() is not a procedure". 5_6.mo:Expected error in mat vector-map: "vector-map: #() is not a procedure". 5_6.mo:Expected error in mat vector-map: "vector-map: #() is not a procedure". ---- 3905,3913 ---- +--- 3915,3923 ---- 5_6.mo:Expected error in mat list->fxvector: "list->fxvector: (1 2 . 3) is not a proper list". 5_6.mo:Expected error in mat list->fxvector: "list->fxvector: (1 2 3 2 3 2 ...) is circular". 5_6.mo:Expected error in mat fxvector->list: "fxvector->list: (a b c) is not an fxvector". @@ -3869,7 +3869,7 @@ 5_6.mo:Expected error in mat vector-map: "vector-map: #() is not a procedure". 5_6.mo:Expected error in mat vector-map: "vector-map: #() is not a procedure". *************** -*** 3922,3930 **** +*** 3932,3940 **** 5_6.mo:Expected error in mat vector-map: "vector-map: lengths of input vectors #() and #(x) differ". 5_6.mo:Expected error in mat vector-map: "vector-map: lengths of input vectors #(y) and #() differ". 5_6.mo:Expected error in mat vector-map: "vector-map: lengths of input vectors #(y) and #() differ". @@ -3879,7 +3879,7 @@ 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: #() is not a procedure". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: #() is not a procedure". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: #() is not a procedure". ---- 3922,3930 ---- +--- 3932,3940 ---- 5_6.mo:Expected error in mat vector-map: "vector-map: lengths of input vectors #() and #(x) differ". 5_6.mo:Expected error in mat vector-map: "vector-map: lengths of input vectors #(y) and #() differ". 5_6.mo:Expected error in mat vector-map: "vector-map: lengths of input vectors #(y) and #() differ". @@ -3890,7 +3890,7 @@ 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: #() is not a procedure". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: #() is not a procedure". *************** -*** 3939,3956 **** +*** 3949,3966 **** 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: lengths of input vectors #() and #(x) differ". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: lengths of input vectors #(y) and #() differ". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: lengths of input vectors #(y) and #() differ". @@ -3909,7 +3909,7 @@ 5_6.mo:Expected error in mat vector-sort!: "vector-sort!: 3 is not a mutable vector". 5_6.mo:Expected error in mat vector-sort!: "vector-sort!: (1 2 3) is not a mutable vector". 5_6.mo:Expected error in mat vector-sort!: "vector-sort!: #(a b c) is not a procedure". ---- 3939,3956 ---- +--- 3949,3966 ---- 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: lengths of input vectors #() and #(x) differ". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: lengths of input vectors #(y) and #() differ". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: lengths of input vectors #(y) and #() differ". @@ -3929,7 +3929,7 @@ 5_6.mo:Expected error in mat vector-sort!: "vector-sort!: (1 2 3) is not a mutable vector". 5_6.mo:Expected error in mat vector-sort!: "vector-sort!: #(a b c) is not a procedure". *************** -*** 3961,3969 **** +*** 3971,3979 **** 5_6.mo:Expected error in mat vector->immutable-vector: "vector-sort!: #(1 2 3) is not a mutable vector". 5_6.mo:Expected error in mat fxvector->immutable-fxvector: "fxvector-set!: #vfx(1 2 3) is not a mutable fxvector". 5_6.mo:Expected error in mat fxvector->immutable-fxvector: "fxvector-fill!: #vfx(1 2 3) is not a mutable fxvector". @@ -3939,7 +3939,7 @@ 5_6.mo:Expected error in mat vector-cas!: "vector-cas!: 1 is not a mutable vector". 5_6.mo:Expected error in mat vector-cas!: "vector-cas!: #(4 5 3) is not a mutable vector". 5_6.mo:Expected error in mat vector-cas!: "vector-cas!: #(4 5 3) is not a valid index for #(4 5 3)". ---- 3961,3969 ---- +--- 3971,3979 ---- 5_6.mo:Expected error in mat vector->immutable-vector: "vector-sort!: #(1 2 3) is not a mutable vector". 5_6.mo:Expected error in mat fxvector->immutable-fxvector: "fxvector-set!: #vfx(1 2 3) is not a mutable fxvector". 5_6.mo:Expected error in mat fxvector->immutable-fxvector: "fxvector-fill!: #vfx(1 2 3) is not a mutable fxvector". @@ -3950,7 +3950,7 @@ 5_6.mo:Expected error in mat vector-cas!: "vector-cas!: #(4 5 3) is not a mutable vector". 5_6.mo:Expected error in mat vector-cas!: "vector-cas!: #(4 5 3) is not a valid index for #(4 5 3)". *************** -*** 3992,3999 **** +*** 4002,4009 **** 5_7.mo:Expected error in mat putprop-getprop: "getprop: 3 is not a symbol". 5_7.mo:Expected error in mat putprop-getprop: "putprop: "hi" is not a symbol". 5_7.mo:Expected error in mat putprop-getprop: "property-list: (a b c) is not a symbol". @@ -3959,7 +3959,7 @@ 5_8.mo:Expected error in mat box-cas!: "box-cas!: 1 is not a mutable box". 5_8.mo:Expected error in mat box-cas!: "box-cas!: #&1 is not a mutable box". 6.mo:Expected error in mat port-operations: "open-input-file: failed for nonexistent file: no such file or directory". ---- 3992,3999 ---- +--- 4002,4009 ---- 5_7.mo:Expected error in mat putprop-getprop: "getprop: 3 is not a symbol". 5_7.mo:Expected error in mat putprop-getprop: "putprop: "hi" is not a symbol". 5_7.mo:Expected error in mat putprop-getprop: "property-list: (a b c) is not a symbol". @@ -3969,7 +3969,7 @@ 5_8.mo:Expected error in mat box-cas!: "box-cas!: #&1 is not a mutable box". 6.mo:Expected error in mat port-operations: "open-input-file: failed for nonexistent file: no such file or directory". *************** -*** 4031,4052 **** +*** 4041,4062 **** 6.mo:Expected error in mat port-operations: "clear-output-port: not permitted on closed port #". 6.mo:Expected error in mat port-operations: "current-output-port: a is not a textual output port". 6.mo:Expected error in mat port-operations: "current-input-port: a is not a textual input port". @@ -3992,7 +3992,7 @@ 6.mo:Expected error in mat port-operations1: "open-input-output-file: furball is not a string". 6.mo:Expected error in mat port-operations1: "open-input-output-file: failed for /probably/not/a/good/path: no such file or directory". 6.mo:Expected error in mat port-operations1: "open-input-output-file: invalid option compressed". ---- 4031,4052 ---- +--- 4041,4062 ---- 6.mo:Expected error in mat port-operations: "clear-output-port: not permitted on closed port #". 6.mo:Expected error in mat port-operations: "current-output-port: a is not a textual output port". 6.mo:Expected error in mat port-operations: "current-input-port: a is not a textual input port". @@ -4016,7 +4016,7 @@ 6.mo:Expected error in mat port-operations1: "open-input-output-file: failed for /probably/not/a/good/path: no such file or directory". 6.mo:Expected error in mat port-operations1: "open-input-output-file: invalid option compressed". *************** -*** 4055,4061 **** +*** 4065,4071 **** 6.mo:Expected error in mat port-operations1: "truncate-file: all-the-way is not a valid length". 6.mo:Expected error in mat port-operations1: "truncate-file: # is not an output port". 6.mo:Expected error in mat port-operations1: "truncate-file: animal-crackers is not an output port". @@ -4024,7 +4024,7 @@ 6.mo:Expected error in mat port-operations1: "truncate-file: not permitted on closed port #". 6.mo:Expected error in mat port-operations1: "get-output-string: # is not a string output port". 6.mo:Expected error in mat port-operations1: "get-output-string: # is not a string output port". ---- 4055,4061 ---- +--- 4065,4071 ---- 6.mo:Expected error in mat port-operations1: "truncate-file: all-the-way is not a valid length". 6.mo:Expected error in mat port-operations1: "truncate-file: # is not an output port". 6.mo:Expected error in mat port-operations1: "truncate-file: animal-crackers is not an output port". @@ -4033,7 +4033,7 @@ 6.mo:Expected error in mat port-operations1: "get-output-string: # is not a string output port". 6.mo:Expected error in mat port-operations1: "get-output-string: # is not a string output port". *************** -*** 4072,4079 **** +*** 4082,4089 **** 6.mo:Expected error in mat string-port-file-position: "file-position: -1 is not a valid position". 6.mo:Expected error in mat fresh-line: "fresh-line: 3 is not a textual output port". 6.mo:Expected error in mat fresh-line: "fresh-line: # is not a textual output port". @@ -4042,7 +4042,7 @@ 6.mo:Expected error in mat pretty-print: "pretty-format: 3 is not a symbol". 6.mo:Expected error in mat pretty-print: "pretty-format: invalid format (bad 0 ... ... 0 format)". 6.mo:Expected warning in mat cp1in-verify-format-warnings: "compile: too few arguments for control string "~a~~~s" in call to format". ---- 4072,4079 ---- +--- 4082,4089 ---- 6.mo:Expected error in mat string-port-file-position: "file-position: -1 is not a valid position". 6.mo:Expected error in mat fresh-line: "fresh-line: 3 is not a textual output port". 6.mo:Expected error in mat fresh-line: "fresh-line: # is not a textual output port". @@ -4052,7 +4052,7 @@ 6.mo:Expected error in mat pretty-print: "pretty-format: invalid format (bad 0 ... ... 0 format)". 6.mo:Expected warning in mat cp1in-verify-format-warnings: "compile: too few arguments for control string "~a~~~s" in call to format". *************** -*** 6557,6588 **** +*** 6567,6598 **** io.mo:Expected error in mat port-operations: "put-u8: not permitted on closed port #". io.mo:Expected error in mat port-operations: "put-bytevector: not permitted on closed port #". io.mo:Expected error in mat port-operations: "flush-output-port: not permitted on closed port #". @@ -4085,7 +4085,7 @@ io.mo:Expected error in mat port-operations1: "open-file-input/output-port: failed for /probably/not/a/good/path: no such file or directory". io.mo:Expected error in mat port-operations1: "invalid file option uncompressed". io.mo:Expected error in mat port-operations1: "invalid file option truncate". ---- 6557,6588 ---- +--- 6567,6598 ---- io.mo:Expected error in mat port-operations: "put-u8: not permitted on closed port #". io.mo:Expected error in mat port-operations: "put-bytevector: not permitted on closed port #". io.mo:Expected error in mat port-operations: "flush-output-port: not permitted on closed port #". @@ -4119,7 +4119,7 @@ io.mo:Expected error in mat port-operations1: "invalid file option uncompressed". io.mo:Expected error in mat port-operations1: "invalid file option truncate". *************** -*** 6593,6599 **** +*** 6603,6609 **** io.mo:Expected error in mat port-operations1: "set-port-length!: all-the-way is not a valid length". io.mo:Expected error in mat port-operations1: "truncate-port: # is not an output port". io.mo:Expected error in mat port-operations1: "truncate-port: animal-crackers is not an output port". @@ -4127,7 +4127,7 @@ io.mo:Expected error in mat port-operations1: "truncate-port: not permitted on closed port #". io.mo:Expected error in mat port-operations3: "file-port?: "not a port" is not a port". io.mo:Expected error in mat port-operations3: "port-file-descriptor: oops is not a port". ---- 6593,6599 ---- +--- 6603,6609 ---- io.mo:Expected error in mat port-operations1: "set-port-length!: all-the-way is not a valid length". io.mo:Expected error in mat port-operations1: "truncate-port: # is not an output port". io.mo:Expected error in mat port-operations1: "truncate-port: animal-crackers is not an output port". @@ -4136,7 +4136,7 @@ io.mo:Expected error in mat port-operations3: "file-port?: "not a port" is not a port". io.mo:Expected error in mat port-operations3: "port-file-descriptor: oops is not a port". *************** -*** 6776,6788 **** +*** 6786,6798 **** io.mo:Expected error in mat low-level-port-operations: "set-binary-port-output-size!: #vu8(1 2 3) is not a valid size for #". io.mo:Expected error in mat low-level-port-operations: "set-binary-port-output-size!: -1 is not a valid size for #". io.mo:Expected error in mat low-level-port-operations: "set-binary-port-output-size!: 6 is not a valid size for #". @@ -4150,7 +4150,7 @@ io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: shoe is not a positive fixnum". io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: 0 is not a positive fixnum". io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: -15 is not a positive fixnum". ---- 6776,6788 ---- +--- 6786,6798 ---- io.mo:Expected error in mat low-level-port-operations: "set-binary-port-output-size!: #vu8(1 2 3) is not a valid size for #". io.mo:Expected error in mat low-level-port-operations: "set-binary-port-output-size!: -1 is not a valid size for #". io.mo:Expected error in mat low-level-port-operations: "set-binary-port-output-size!: 6 is not a valid size for #". @@ -4165,8 +4165,8 @@ io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: 0 is not a positive fixnum". io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: -15 is not a positive fixnum". *************** -*** 6790,6805 **** - io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: 1024.0 is not a positive fixnum". +*** 6802,6817 **** + io.mo:Expected error in mat compression: "port-file-compressed!: cannot compress input/output port #". io.mo:Expected error in mat compression: "port-file-compressed!: # is not a file port". io.mo:Expected error in mat compression: "port-file-compressed!: cannot compress input/output port #". ! io.mo:Expected error in mat bytevector-input-port: "incorrect argument count in call (open-bytevector-input-port)". @@ -4182,8 +4182,8 @@ io.mo:Expected error in mat custom-binary-ports: "unget-u8: cannot unget 255 on #". io.mo:Expected error in mat custom-binary-ports: "put-u8: # is not a binary output port". io.mo:Expected error in mat custom-binary-ports: "port-length: # does not support operation". ---- 6790,6805 ---- - io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: 1024.0 is not a positive fixnum". +--- 6802,6817 ---- + io.mo:Expected error in mat compression: "port-file-compressed!: cannot compress input/output port #". io.mo:Expected error in mat compression: "port-file-compressed!: # is not a file port". io.mo:Expected error in mat compression: "port-file-compressed!: cannot compress input/output port #". ! io.mo:Expected error in mat bytevector-input-port: "incorrect number of arguments to #". @@ -4200,7 +4200,7 @@ io.mo:Expected error in mat custom-binary-ports: "put-u8: # is not a binary output port". io.mo:Expected error in mat custom-binary-ports: "port-length: # does not support operation". *************** -*** 6871,6886 **** +*** 6883,6898 **** io.mo:Expected error in mat current-ports: "console-output-port: # is not a textual output port". io.mo:Expected error in mat current-ports: "console-error-port: # is not a textual output port". io.mo:Expected error in mat current-transcoder: "current-transcoder: # is not a transcoder". @@ -4217,7 +4217,7 @@ io.mo:Expected error in mat utf-16-codec: "utf-16-codec: invalid endianness #f". io.mo:Expected error in mat to-fold-or-not-to-fold: "get-datum: invalid character name #\newLine at char 0 of #". io.mo:Expected error in mat to-fold-or-not-to-fold: "get-datum: invalid character name #\newLine at char 15 of #". ---- 6871,6886 ---- +--- 6883,6898 ---- io.mo:Expected error in mat current-ports: "console-output-port: # is not a textual output port". io.mo:Expected error in mat current-ports: "console-error-port: # is not a textual output port". io.mo:Expected error in mat current-transcoder: "current-transcoder: # is not a transcoder". @@ -4235,7 +4235,7 @@ io.mo:Expected error in mat to-fold-or-not-to-fold: "get-datum: invalid character name #\newLine at char 0 of #". io.mo:Expected error in mat to-fold-or-not-to-fold: "get-datum: invalid character name #\newLine at char 15 of #". *************** -*** 7052,7058 **** +*** 7064,7070 **** 7.mo:Expected error in mat eval-when: "invalid syntax visit-x". 7.mo:Expected error in mat eval-when: "invalid syntax revisit-x". 7.mo:Expected error in mat compile-whole-program: "compile-whole-program: failed for nosuchfile.wpo: no such file or directory". @@ -4243,7 +4243,7 @@ 7.mo:Expected error in mat compile-whole-program: "separate-eval: Exception in visit: library (testfile-wpo-lib) is not visible 7.mo:Expected error in mat compile-whole-program: "separate-eval: Exception: library (testfile-wpo-a4) not found 7.mo:Expected error in mat compile-whole-program: "separate-eval: Exception: library (testfile-wpo-c4) not found ---- 7052,7058 ---- +--- 7064,7070 ---- 7.mo:Expected error in mat eval-when: "invalid syntax visit-x". 7.mo:Expected error in mat eval-when: "invalid syntax revisit-x". 7.mo:Expected error in mat compile-whole-program: "compile-whole-program: failed for nosuchfile.wpo: no such file or directory". @@ -4252,7 +4252,7 @@ 7.mo:Expected error in mat compile-whole-program: "separate-eval: Exception: library (testfile-wpo-a4) not found 7.mo:Expected error in mat compile-whole-program: "separate-eval: Exception: library (testfile-wpo-c4) not found *************** -*** 7068,7094 **** +*** 7080,7106 **** 7.mo:Expected error in mat compile-whole-library: "separate-compile: Exception in compile-whole-library: encountered visit-only run-time library (testfile-cwl-a9) while processing file "testfile-cwl-a9.wpo" 7.mo:Expected error in mat compile-whole-library: "separate-eval: Exception in compile-whole-program: encountered library (testfile-deja-vu-one) in testfile-deja-vu-dup.wpo, but had already encountered it in testfile-deja-vu-two.wpo 7.mo:Expected error in mat top-level-value-functions: "top-level-bound?: "hello" is not a symbol". @@ -4280,7 +4280,7 @@ 7.mo:Expected error in mat top-level-value-functions: "define-top-level-value: hello is not an environment". 7.mo:Expected error in mat top-level-value-functions: "define-top-level-value: # is not a symbol". 7.mo:Expected error in mat top-level-value-functions: "variable i-am-not-bound-i-hope is not bound". ---- 7068,7094 ---- +--- 7080,7106 ---- 7.mo:Expected error in mat compile-whole-library: "separate-compile: Exception in compile-whole-library: encountered visit-only run-time library (testfile-cwl-a9) while processing file "testfile-cwl-a9.wpo" 7.mo:Expected error in mat compile-whole-library: "separate-eval: Exception in compile-whole-program: encountered library (testfile-deja-vu-one) in testfile-deja-vu-dup.wpo, but had already encountered it in testfile-deja-vu-two.wpo 7.mo:Expected error in mat top-level-value-functions: "top-level-bound?: "hello" is not a symbol". @@ -4309,7 +4309,7 @@ 7.mo:Expected error in mat top-level-value-functions: "define-top-level-value: # is not a symbol". 7.mo:Expected error in mat top-level-value-functions: "variable i-am-not-bound-i-hope is not bound". *************** -*** 7493,7603 **** +*** 7505,7615 **** hash.mo:Expected error in mat old-hash-table: "hash-table-for-each: ((a . b)) is not an eq hashtable". hash.mo:Expected error in mat old-hash-table: "incorrect number of arguments to #". hash.mo:Expected error in mat old-hash-table: "incorrect number of arguments to #". @@ -4421,7 +4421,7 @@ hash.mo:Expected error in mat hashtable-arguments: "hashtable-ephemeron?: (hash . table) is not a hashtable". hash.mo:Expected error in mat hash-return-value: "hashtable-ref: invalid hash-function # return value "oops" for any". hash.mo:Expected error in mat hash-return-value: "hashtable-ref: invalid hash-function # return value 3.5 for any". ---- 7493,7603 ---- +--- 7505,7615 ---- hash.mo:Expected error in mat old-hash-table: "hash-table-for-each: ((a . b)) is not an eq hashtable". hash.mo:Expected error in mat old-hash-table: "incorrect number of arguments to #". hash.mo:Expected error in mat old-hash-table: "incorrect number of arguments to #". @@ -4534,7 +4534,7 @@ hash.mo:Expected error in mat hash-return-value: "hashtable-ref: invalid hash-function # return value "oops" for any". hash.mo:Expected error in mat hash-return-value: "hashtable-ref: invalid hash-function # return value 3.5 for any". *************** -*** 7617,7723 **** +*** 7629,7735 **** hash.mo:Expected error in mat hash-return-value: "hashtable-delete!: invalid hash-function # return value "oops" for any". hash.mo:Expected error in mat hash-return-value: "hashtable-delete!: invalid hash-function # return value 3.5 for any". hash.mo:Expected error in mat hash-return-value: "hashtable-delete!: invalid hash-function # return value 1+2i for any". @@ -4642,7 +4642,7 @@ hash.mo:Expected error in mat eqv-hashtable-arguments: "make-ephemeron-eqv-hashtable: invalid size argument -1". hash.mo:Expected error in mat eqv-hashtable-arguments: "make-ephemeron-eqv-hashtable: invalid size argument #t". hash.mo:Expected error in mat eqv-hashtable-arguments: "make-ephemeron-eqv-hashtable: invalid size argument #f". ---- 7617,7723 ---- +--- 7629,7735 ---- hash.mo:Expected error in mat hash-return-value: "hashtable-delete!: invalid hash-function # return value "oops" for any". hash.mo:Expected error in mat hash-return-value: "hashtable-delete!: invalid hash-function # return value 3.5 for any". hash.mo:Expected error in mat hash-return-value: "hashtable-delete!: invalid hash-function # return value 1+2i for any". @@ -4751,7 +4751,7 @@ hash.mo:Expected error in mat eqv-hashtable-arguments: "make-ephemeron-eqv-hashtable: invalid size argument #t". hash.mo:Expected error in mat eqv-hashtable-arguments: "make-ephemeron-eqv-hashtable: invalid size argument #f". *************** -*** 7725,7740 **** +*** 7737,7752 **** hash.mo:Expected error in mat generic-hashtable: "hashtable-delete!: # is not mutable". hash.mo:Expected error in mat generic-hashtable: "hashtable-update!: # is not mutable". hash.mo:Expected error in mat generic-hashtable: "hashtable-update!: # is not mutable". @@ -4768,7 +4768,7 @@ hash.mo:Expected error in mat hash-functions: "string-ci-hash: hello is not a string". hash.mo:Expected error in mat fasl-other-hashtable: "fasl-write: invalid fasl object #". hash.mo:Expected error in mat fasl-other-hashtable: "fasl-write: invalid fasl object #". ---- 7725,7740 ---- +--- 7737,7752 ---- hash.mo:Expected error in mat generic-hashtable: "hashtable-delete!: # is not mutable". hash.mo:Expected error in mat generic-hashtable: "hashtable-update!: # is not mutable". hash.mo:Expected error in mat generic-hashtable: "hashtable-update!: # is not mutable". @@ -4786,7 +4786,7 @@ hash.mo:Expected error in mat fasl-other-hashtable: "fasl-write: invalid fasl object #". hash.mo:Expected error in mat fasl-other-hashtable: "fasl-write: invalid fasl object #". *************** -*** 7850,7857 **** +*** 7862,7869 **** 8.mo:Expected error in mat with-syntax: "invalid syntax a". 8.mo:Expected error in mat with-syntax: "duplicate pattern variable x in (x x)". 8.mo:Expected error in mat with-syntax: "duplicate pattern variable x in (x x)". @@ -4795,7 +4795,7 @@ 8.mo:Expected error in mat generate-temporaries: "generate-temporaries: improper list structure (a b . c)". 8.mo:Expected error in mat generate-temporaries: "generate-temporaries: cyclic list structure (a b c b c b ...)". 8.mo:Expected error in mat syntax->list: "syntax->list: invalid argument #". ---- 7850,7857 ---- +--- 7862,7869 ---- 8.mo:Expected error in mat with-syntax: "invalid syntax a". 8.mo:Expected error in mat with-syntax: "duplicate pattern variable x in (x x)". 8.mo:Expected error in mat with-syntax: "duplicate pattern variable x in (x x)". @@ -4805,7 +4805,7 @@ 8.mo:Expected error in mat generate-temporaries: "generate-temporaries: cyclic list structure (a b c b c b ...)". 8.mo:Expected error in mat syntax->list: "syntax->list: invalid argument #". *************** -*** 8447,8462 **** +*** 8459,8474 **** 8.mo:Expected error in mat rnrs-eval: "attempt to assign unbound identifier foo". 8.mo:Expected error in mat rnrs-eval: "invalid definition in immutable environment (define cons (quote #))". 8.mo:Expected error in mat top-level-syntax-functions: "top-level-syntax: "hello" is not a symbol". @@ -4822,7 +4822,7 @@ 8.mo:Expected error in mat top-level-syntax-functions: "define-top-level-syntax: hello is not an environment". 8.mo:Expected error in mat top-level-syntax-functions: "define-top-level-syntax: # is not a symbol". 8.mo:Expected error in mat top-level-syntax-functions: "define-top-level-syntax: cannot modify immutable environment #". ---- 8447,8462 ---- +--- 8459,8474 ---- 8.mo:Expected error in mat rnrs-eval: "attempt to assign unbound identifier foo". 8.mo:Expected error in mat rnrs-eval: "invalid definition in immutable environment (define cons (quote #))". 8.mo:Expected error in mat top-level-syntax-functions: "top-level-syntax: "hello" is not a symbol". @@ -4840,7 +4840,7 @@ 8.mo:Expected error in mat top-level-syntax-functions: "define-top-level-syntax: # is not a symbol". 8.mo:Expected error in mat top-level-syntax-functions: "define-top-level-syntax: cannot modify immutable environment #". *************** -*** 8555,8577 **** +*** 8567,8589 **** fx.mo:Expected error in mat fx=?: "fx=?: (a) is not a fixnum". fx.mo:Expected error in mat fx=?: "fx=?: is not a fixnum". fx.mo:Expected error in mat fx=?: "fx=?: <-int> is not a fixnum". @@ -4864,7 +4864,7 @@ fx.mo:Expected error in mat $fxu<: "incorrect number of arguments to #". fx.mo:Expected error in mat $fxu<: "incorrect number of arguments to #". fx.mo:Expected error in mat $fxu<: "$fxu<: <-int> is not a fixnum". ---- 8555,8577 ---- +--- 8567,8589 ---- fx.mo:Expected error in mat fx=?: "fx=?: (a) is not a fixnum". fx.mo:Expected error in mat fx=?: "fx=?: is not a fixnum". fx.mo:Expected error in mat fx=?: "fx=?: <-int> is not a fixnum". @@ -4889,7 +4889,7 @@ fx.mo:Expected error in mat $fxu<: "incorrect number of arguments to #". fx.mo:Expected error in mat $fxu<: "$fxu<: <-int> is not a fixnum". *************** -*** 8603,8615 **** +*** 8615,8627 **** fx.mo:Expected error in mat r6rs:fx-: "fx-: #f is not a fixnum". fx.mo:Expected error in mat r6rs:fx-: "fx-: #f is not a fixnum". fx.mo:Expected error in mat fx*: "fx*: (a . b) is not a fixnum". @@ -4903,7 +4903,7 @@ fx.mo:Expected error in mat r6rs:fx*: "fx*: is not a fixnum". fx.mo:Expected error in mat r6rs:fx*: "fx*: <-int> is not a fixnum". fx.mo:Expected error in mat r6rs:fx*: "fx*: #f is not a fixnum". ---- 8603,8615 ---- +--- 8615,8627 ---- fx.mo:Expected error in mat r6rs:fx-: "fx-: #f is not a fixnum". fx.mo:Expected error in mat r6rs:fx-: "fx-: #f is not a fixnum". fx.mo:Expected error in mat fx*: "fx*: (a . b) is not a fixnum". @@ -4918,7 +4918,7 @@ fx.mo:Expected error in mat r6rs:fx*: "fx*: <-int> is not a fixnum". fx.mo:Expected error in mat r6rs:fx*: "fx*: #f is not a fixnum". *************** -*** 8659,8671 **** +*** 8671,8683 **** fx.mo:Expected error in mat fx1+: "fx1+: <-int> is not a fixnum". fx.mo:Expected error in mat fx1+: "fx1+: is not a fixnum". fx.mo:Expected error in mat fx1+: "fx1+: a is not a fixnum". @@ -4932,7 +4932,7 @@ fx.mo:Expected error in mat fxmax: "fxmax: a is not a fixnum". fx.mo:Expected error in mat fxmax: "fxmax: is not a fixnum". fx.mo:Expected error in mat fxmax: "fxmax: <-int> is not a fixnum". ---- 8659,8671 ---- +--- 8671,8683 ---- fx.mo:Expected error in mat fx1+: "fx1+: <-int> is not a fixnum". fx.mo:Expected error in mat fx1+: "fx1+: is not a fixnum". fx.mo:Expected error in mat fx1+: "fx1+: a is not a fixnum". @@ -4947,7 +4947,7 @@ fx.mo:Expected error in mat fxmax: "fxmax: is not a fixnum". fx.mo:Expected error in mat fxmax: "fxmax: <-int> is not a fixnum". *************** -*** 8763,8772 **** +*** 8775,8784 **** fx.mo:Expected error in mat fxarithmetic-shift: "fxarithmetic-shift: fixnum overflow with arguments and 10". fx.mo:Expected error in mat fxarithmetic-shift: "fxarithmetic-shift: fixnum overflow with arguments -4097 and ". fx.mo:Expected error in mat fxarithmetic-shift: "fxarithmetic-shift: fixnum overflow with arguments <-int> and 1". @@ -4958,7 +4958,7 @@ fx.mo:Expected error in mat fxbit-field: "fxbit-field: 35.0 is not a fixnum". fx.mo:Expected error in mat fxbit-field: "fxbit-field: 5.0 is not a valid start index". fx.mo:Expected error in mat fxbit-field: "fxbit-field: 8.0 is not a valid end index". ---- 8763,8772 ---- +--- 8775,8784 ---- fx.mo:Expected error in mat fxarithmetic-shift: "fxarithmetic-shift: fixnum overflow with arguments and 10". fx.mo:Expected error in mat fxarithmetic-shift: "fxarithmetic-shift: fixnum overflow with arguments -4097 and ". fx.mo:Expected error in mat fxarithmetic-shift: "fxarithmetic-shift: fixnum overflow with arguments <-int> and 1". @@ -4970,7 +4970,7 @@ fx.mo:Expected error in mat fxbit-field: "fxbit-field: 5.0 is not a valid start index". fx.mo:Expected error in mat fxbit-field: "fxbit-field: 8.0 is not a valid end index". *************** -*** 8780,8813 **** +*** 8792,8825 **** fx.mo:Expected error in mat fxbit-field: "fxbit-field: is not a valid end index". fx.mo:Expected error in mat fxbit-field: "fxbit-field: is not a valid start index". fx.mo:Expected error in mat fxbit-field: "fxbit-field: is not a valid end index". @@ -5005,7 +5005,7 @@ fx.mo:Expected error in mat fxif: "fxif: a is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: 3.4 is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: (a) is not a fixnum". ---- 8780,8813 ---- +--- 8792,8825 ---- fx.mo:Expected error in mat fxbit-field: "fxbit-field: is not a valid end index". fx.mo:Expected error in mat fxbit-field: "fxbit-field: is not a valid start index". fx.mo:Expected error in mat fxbit-field: "fxbit-field: is not a valid end index". @@ -5041,7 +5041,7 @@ fx.mo:Expected error in mat fxif: "fxif: 3.4 is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: (a) is not a fixnum". *************** -*** 8817,8860 **** +*** 8829,8872 **** fx.mo:Expected error in mat fxif: "fxif: <-int> is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: <-int> is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: <-int> is not a fixnum". @@ -5086,7 +5086,7 @@ fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: 3.4 is not a fixnum". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: "3" is not a fixnum". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: is not a fixnum". ---- 8817,8860 ---- +--- 8829,8872 ---- fx.mo:Expected error in mat fxif: "fxif: <-int> is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: <-int> is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: <-int> is not a fixnum". @@ -5132,7 +5132,7 @@ fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: "3" is not a fixnum". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: is not a fixnum". *************** -*** 8863,8873 **** +*** 8875,8885 **** fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: invalid bit index -1". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: invalid bit index ". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: invalid bit index ". @@ -5144,7 +5144,7 @@ fx.mo:Expected error in mat fxcopy-bit-field: "fxcopy-bit-field: "3" is not a fixnum". fx.mo:Expected error in mat fxcopy-bit-field: "fxcopy-bit-field: 3.4 is not a valid start index". fx.mo:Expected error in mat fxcopy-bit-field: "fxcopy-bit-field: 3/4 is not a valid end index". ---- 8863,8873 ---- +--- 8875,8885 ---- fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: invalid bit index -1". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: invalid bit index ". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: invalid bit index ". @@ -5157,7 +5157,7 @@ fx.mo:Expected error in mat fxcopy-bit-field: "fxcopy-bit-field: 3.4 is not a valid start index". fx.mo:Expected error in mat fxcopy-bit-field: "fxcopy-bit-field: 3/4 is not a valid end index". *************** -*** 8927,8936 **** +*** 8939,8948 **** fx.mo:Expected error in mat fxdiv0-and-mod0: "fxmod0: (a) is not a fixnum". fx.mo:Expected error in mat fxdiv0-and-mod0: "fxmod0: undefined for 0". fx.mo:Expected error in mat fxdiv0-and-mod0: "fxmod0: undefined for 0". @@ -5168,7 +5168,7 @@ fx.mo:Expected error in mat fx+/carry: "fx+/carry: 1.0 is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: 2.0 is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: 3.0 is not a fixnum". ---- 8927,8936 ---- +--- 8939,8948 ---- fx.mo:Expected error in mat fxdiv0-and-mod0: "fxmod0: (a) is not a fixnum". fx.mo:Expected error in mat fxdiv0-and-mod0: "fxmod0: undefined for 0". fx.mo:Expected error in mat fxdiv0-and-mod0: "fxmod0: undefined for 0". @@ -5180,7 +5180,7 @@ fx.mo:Expected error in mat fx+/carry: "fx+/carry: 2.0 is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: 3.0 is not a fixnum". *************** -*** 8946,8955 **** +*** 8958,8967 **** fx.mo:Expected error in mat fx+/carry: "fx+/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: <-int> is not a fixnum". @@ -5191,7 +5191,7 @@ fx.mo:Expected error in mat fx-/carry: "fx-/carry: 1.0 is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: 2.0 is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: 3.0 is not a fixnum". ---- 8946,8955 ---- +--- 8958,8967 ---- fx.mo:Expected error in mat fx+/carry: "fx+/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: <-int> is not a fixnum". @@ -5203,7 +5203,7 @@ fx.mo:Expected error in mat fx-/carry: "fx-/carry: 2.0 is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: 3.0 is not a fixnum". *************** -*** 8965,8974 **** +*** 8977,8986 **** fx.mo:Expected error in mat fx-/carry: "fx-/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: <-int> is not a fixnum". @@ -5214,7 +5214,7 @@ fx.mo:Expected error in mat fx*/carry: "fx*/carry: 1.0 is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: 2.0 is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: 3.0 is not a fixnum". ---- 8965,8974 ---- +--- 8977,8986 ---- fx.mo:Expected error in mat fx-/carry: "fx-/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: <-int> is not a fixnum". @@ -5226,7 +5226,7 @@ fx.mo:Expected error in mat fx*/carry: "fx*/carry: 2.0 is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: 3.0 is not a fixnum". *************** -*** 8984,8994 **** +*** 8996,9006 **** fx.mo:Expected error in mat fx*/carry: "fx*/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: <-int> is not a fixnum". @@ -5238,7 +5238,7 @@ fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: a is not a fixnum". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid start index 0.0". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid end index 2.0". ---- 8984,8994 ---- +--- 8996,9006 ---- fx.mo:Expected error in mat fx*/carry: "fx*/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: <-int> is not a fixnum". @@ -5251,7 +5251,7 @@ fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid start index 0.0". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid end index 2.0". *************** -*** 9011,9020 **** +*** 9023,9032 **** fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid end index ". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid end index ". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: count 1 is greater than difference between end index 5 and start index 5". @@ -5262,7 +5262,7 @@ fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: a is not a fixnum". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid start index 0.0". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid end index 2.0". ---- 9011,9020 ---- +--- 9023,9032 ---- fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid end index ". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid end index ". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: count 1 is greater than difference between end index 5 and start index 5". @@ -5274,7 +5274,7 @@ fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid start index 0.0". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid end index 2.0". *************** -*** 9030,9047 **** +*** 9042,9059 **** fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid end index ". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid end index <-int>". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: start index 7 is greater than end index 5". @@ -5293,7 +5293,7 @@ fl.mo:Expected error in mat fl=: "fl=: (a) is not a flonum". fl.mo:Expected error in mat fl=: "fl=: a is not a flonum". fl.mo:Expected error in mat fl=: "fl=: a is not a flonum". ---- 9030,9047 ---- +--- 9042,9059 ---- fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid end index ". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid end index <-int>". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: start index 7 is greater than end index 5". @@ -5313,7 +5313,7 @@ fl.mo:Expected error in mat fl=: "fl=: a is not a flonum". fl.mo:Expected error in mat fl=: "fl=: a is not a flonum". *************** -*** 9049,9055 **** +*** 9061,9067 **** fl.mo:Expected error in mat fl=: "fl=: 3 is not a flonum". fl.mo:Expected error in mat fl=: "fl=: 7/2 is not a flonum". fl.mo:Expected error in mat fl=: "fl=: 7/2 is not a flonum". @@ -5321,7 +5321,7 @@ fl.mo:Expected error in mat fl<: "fl<: (a) is not a flonum". fl.mo:Expected error in mat fl<: "fl<: a is not a flonum". fl.mo:Expected error in mat fl<: "fl<: a is not a flonum". ---- 9049,9055 ---- +--- 9061,9067 ---- fl.mo:Expected error in mat fl=: "fl=: 3 is not a flonum". fl.mo:Expected error in mat fl=: "fl=: 7/2 is not a flonum". fl.mo:Expected error in mat fl=: "fl=: 7/2 is not a flonum". @@ -5330,7 +5330,7 @@ fl.mo:Expected error in mat fl<: "fl<: a is not a flonum". fl.mo:Expected error in mat fl<: "fl<: a is not a flonum". *************** -*** 9057,9063 **** +*** 9069,9075 **** fl.mo:Expected error in mat fl<: "fl<: 3 is not a flonum". fl.mo:Expected error in mat fl<: "fl<: 7/2 is not a flonum". fl.mo:Expected error in mat fl<: "fl<: 7/2 is not a flonum". @@ -5338,7 +5338,7 @@ fl.mo:Expected error in mat fl>: "fl>: (a) is not a flonum". fl.mo:Expected error in mat fl>: "fl>: a is not a flonum". fl.mo:Expected error in mat fl>: "fl>: a is not a flonum". ---- 9057,9063 ---- +--- 9069,9075 ---- fl.mo:Expected error in mat fl<: "fl<: 3 is not a flonum". fl.mo:Expected error in mat fl<: "fl<: 7/2 is not a flonum". fl.mo:Expected error in mat fl<: "fl<: 7/2 is not a flonum". @@ -5347,7 +5347,7 @@ fl.mo:Expected error in mat fl>: "fl>: a is not a flonum". fl.mo:Expected error in mat fl>: "fl>: a is not a flonum". *************** -*** 9065,9071 **** +*** 9077,9083 **** fl.mo:Expected error in mat fl>: "fl>: 3 is not a flonum". fl.mo:Expected error in mat fl>: "fl>: 7/2 is not a flonum". fl.mo:Expected error in mat fl>: "fl>: 7/2 is not a flonum". @@ -5355,7 +5355,7 @@ fl.mo:Expected error in mat fl<=: "fl<=: (a) is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: a is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: a is not a flonum". ---- 9065,9071 ---- +--- 9077,9083 ---- fl.mo:Expected error in mat fl>: "fl>: 3 is not a flonum". fl.mo:Expected error in mat fl>: "fl>: 7/2 is not a flonum". fl.mo:Expected error in mat fl>: "fl>: 7/2 is not a flonum". @@ -5364,7 +5364,7 @@ fl.mo:Expected error in mat fl<=: "fl<=: a is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: a is not a flonum". *************** -*** 9073,9079 **** +*** 9085,9091 **** fl.mo:Expected error in mat fl<=: "fl<=: 3 is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: 7/2 is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: 7/2 is not a flonum". @@ -5372,7 +5372,7 @@ fl.mo:Expected error in mat fl>=: "fl>=: (a) is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: a is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: a is not a flonum". ---- 9073,9079 ---- +--- 9085,9091 ---- fl.mo:Expected error in mat fl<=: "fl<=: 3 is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: 7/2 is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: 7/2 is not a flonum". @@ -5381,7 +5381,7 @@ fl.mo:Expected error in mat fl>=: "fl>=: a is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: a is not a flonum". *************** -*** 9081,9120 **** +*** 9093,9132 **** fl.mo:Expected error in mat fl>=: "fl>=: 3 is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: 7/2 is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: 7/2 is not a flonum". @@ -5422,7 +5422,7 @@ fl.mo:Expected error in mat fl>=?: "fl>=?: a is not a flonum". fl.mo:Expected error in mat fl>=?: "fl>=?: a is not a flonum". fl.mo:Expected error in mat fl>=?: "fl>=?: 3 is not a flonum". ---- 9081,9120 ---- +--- 9093,9132 ---- fl.mo:Expected error in mat fl>=: "fl>=: 3 is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: 7/2 is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: 7/2 is not a flonum". @@ -5464,7 +5464,7 @@ fl.mo:Expected error in mat fl>=?: "fl>=?: a is not a flonum". fl.mo:Expected error in mat fl>=?: "fl>=?: 3 is not a flonum". *************** -*** 9124,9130 **** +*** 9136,9142 **** fl.mo:Expected error in mat fl+: "fl+: (a . b) is not a flonum". fl.mo:Expected error in mat fl+: "fl+: 1 is not a flonum". fl.mo:Expected error in mat fl+: "fl+: 2/3 is not a flonum". @@ -5472,7 +5472,7 @@ fl.mo:Expected error in mat fl-: "fl-: (a . b) is not a flonum". fl.mo:Expected error in mat fl-: "fl-: 1 is not a flonum". fl.mo:Expected error in mat fl-: "fl-: a is not a flonum". ---- 9124,9130 ---- +--- 9136,9142 ---- fl.mo:Expected error in mat fl+: "fl+: (a . b) is not a flonum". fl.mo:Expected error in mat fl+: "fl+: 1 is not a flonum". fl.mo:Expected error in mat fl+: "fl+: 2/3 is not a flonum". @@ -5481,7 +5481,7 @@ fl.mo:Expected error in mat fl-: "fl-: 1 is not a flonum". fl.mo:Expected error in mat fl-: "fl-: a is not a flonum". *************** -*** 9134,9216 **** +*** 9146,9228 **** fl.mo:Expected error in mat fl*: "fl*: (a . b) is not a flonum". fl.mo:Expected error in mat fl*: "fl*: 1 is not a flonum". fl.mo:Expected error in mat fl*: "fl*: 2/3 is not a flonum". @@ -5565,7 +5565,7 @@ fl.mo:Expected error in mat flround: "flround: a is not a flonum". fl.mo:Expected error in mat flround: "flround: 2.0+1.0i is not a flonum". fl.mo:Expected error in mat flround: "flround: 2+1i is not a flonum". ---- 9134,9216 ---- +--- 9146,9228 ---- fl.mo:Expected error in mat fl*: "fl*: (a . b) is not a flonum". fl.mo:Expected error in mat fl*: "fl*: 1 is not a flonum". fl.mo:Expected error in mat fl*: "fl*: 2/3 is not a flonum". @@ -5650,7 +5650,7 @@ fl.mo:Expected error in mat flround: "flround: 2.0+1.0i is not a flonum". fl.mo:Expected error in mat flround: "flround: 2+1i is not a flonum". *************** -*** 9230,9265 **** +*** 9242,9277 **** fl.mo:Expected error in mat flinfinite?: "flinfinite?: 3 is not a flonum". fl.mo:Expected error in mat flinfinite?: "flinfinite?: 3/4 is not a flonum". fl.mo:Expected error in mat flinfinite?: "flinfinite?: hi is not a flonum". @@ -5687,7 +5687,7 @@ fl.mo:Expected error in mat fleven?: "fleven?: a is not a flonum". fl.mo:Expected error in mat fleven?: "fleven?: 3 is not a flonum". fl.mo:Expected error in mat fleven?: "fleven?: 3.2 is not an integer". ---- 9230,9265 ---- +--- 9242,9277 ---- fl.mo:Expected error in mat flinfinite?: "flinfinite?: 3 is not a flonum". fl.mo:Expected error in mat flinfinite?: "flinfinite?: 3/4 is not a flonum". fl.mo:Expected error in mat flinfinite?: "flinfinite?: hi is not a flonum". @@ -5725,7 +5725,7 @@ fl.mo:Expected error in mat fleven?: "fleven?: 3 is not a flonum". fl.mo:Expected error in mat fleven?: "fleven?: 3.2 is not an integer". *************** -*** 9267,9274 **** +*** 9279,9286 **** fl.mo:Expected error in mat fleven?: "fleven?: 1+1i is not a flonum". fl.mo:Expected error in mat fleven?: "fleven?: +inf.0 is not an integer". fl.mo:Expected error in mat fleven?: "fleven?: +nan.0 is not an integer". @@ -5734,7 +5734,7 @@ fl.mo:Expected error in mat flodd?: "flodd?: a is not a flonum". fl.mo:Expected error in mat flodd?: "flodd?: 3 is not a flonum". fl.mo:Expected error in mat flodd?: "flodd?: 3.2 is not an integer". ---- 9267,9274 ---- +--- 9279,9286 ---- fl.mo:Expected error in mat fleven?: "fleven?: 1+1i is not a flonum". fl.mo:Expected error in mat fleven?: "fleven?: +inf.0 is not an integer". fl.mo:Expected error in mat fleven?: "fleven?: +nan.0 is not an integer". @@ -5744,7 +5744,7 @@ fl.mo:Expected error in mat flodd?: "flodd?: 3 is not a flonum". fl.mo:Expected error in mat flodd?: "flodd?: 3.2 is not an integer". *************** -*** 9276,9282 **** +*** 9288,9294 **** fl.mo:Expected error in mat flodd?: "flodd?: 3+1i is not a flonum". fl.mo:Expected error in mat flodd?: "flodd?: +inf.0 is not an integer". fl.mo:Expected error in mat flodd?: "flodd?: +nan.0 is not an integer". @@ -5752,7 +5752,7 @@ fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". ---- 9276,9282 ---- +--- 9288,9294 ---- fl.mo:Expected error in mat flodd?: "flodd?: 3+1i is not a flonum". fl.mo:Expected error in mat flodd?: "flodd?: +inf.0 is not an integer". fl.mo:Expected error in mat flodd?: "flodd?: +nan.0 is not an integer". @@ -5761,7 +5761,7 @@ fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". *************** -*** 9284,9290 **** +*** 9296,9302 **** fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". fl.mo:Expected error in mat flmin: "flmin: 0.0+1.0i is not a flonum". fl.mo:Expected error in mat flmin: "flmin: 0+1i is not a flonum". @@ -5769,7 +5769,7 @@ fl.mo:Expected error in mat flmax: "flmax: a is not a flonum". fl.mo:Expected error in mat flmax: "flmax: a is not a flonum". fl.mo:Expected error in mat flmax: "flmax: 3 is not a flonum". ---- 9284,9290 ---- +--- 9296,9302 ---- fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". fl.mo:Expected error in mat flmin: "flmin: 0.0+1.0i is not a flonum". fl.mo:Expected error in mat flmin: "flmin: 0+1i is not a flonum". @@ -5778,7 +5778,7 @@ fl.mo:Expected error in mat flmax: "flmax: a is not a flonum". fl.mo:Expected error in mat flmax: "flmax: 3 is not a flonum". *************** -*** 9292,9305 **** +*** 9304,9317 **** fl.mo:Expected error in mat flmax: "flmax: a is not a flonum". fl.mo:Expected error in mat flmax: "flmax: 0.0+1.0i is not a flonum". fl.mo:Expected error in mat flmax: "flmax: 0+1i is not a flonum". @@ -5793,7 +5793,7 @@ fl.mo:Expected error in mat fldenominator: "fldenominator: a is not a flonum". fl.mo:Expected error in mat fldenominator: "fldenominator: 3 is not a flonum". fl.mo:Expected error in mat fldenominator: "fldenominator: 0+1i is not a flonum". ---- 9292,9305 ---- +--- 9304,9317 ---- fl.mo:Expected error in mat flmax: "flmax: a is not a flonum". fl.mo:Expected error in mat flmax: "flmax: 0.0+1.0i is not a flonum". fl.mo:Expected error in mat flmax: "flmax: 0+1i is not a flonum". @@ -5809,7 +5809,7 @@ fl.mo:Expected error in mat fldenominator: "fldenominator: 3 is not a flonum". fl.mo:Expected error in mat fldenominator: "fldenominator: 0+1i is not a flonum". *************** -*** 9345,9351 **** +*** 9357,9363 **** cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". @@ -5817,7 +5817,7 @@ cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". ---- 9345,9351 ---- +--- 9357,9363 ---- cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". @@ -5826,7 +5826,7 @@ cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". *************** -*** 9355,9368 **** +*** 9367,9380 **** cfl.mo:Expected error in mat cfl/: "cfl/: a is not a cflonum". cfl.mo:Expected error in mat cfl/: "cfl/: a is not a cflonum". cfl.mo:Expected error in mat cfl/: "cfl/: a is not a cflonum". @@ -5841,7 +5841,7 @@ foreign.mo:Expected error in mat load-shared-object: "load-shared-object: invalid path 3". foreign.mo:Expected error in mat foreign-procedure: "foreign-procedure: no entry for "i do not exist"". foreign.mo:Expected error in mat foreign-procedure: "foreign-procedure: no entry for "i do not exist"". ---- 9355,9368 ---- +--- 9367,9380 ---- cfl.mo:Expected error in mat cfl/: "cfl/: a is not a cflonum". cfl.mo:Expected error in mat cfl/: "cfl/: a is not a cflonum". cfl.mo:Expected error in mat cfl/: "cfl/: a is not a cflonum". @@ -5857,7 +5857,7 @@ foreign.mo:Expected error in mat foreign-procedure: "foreign-procedure: no entry for "i do not exist"". foreign.mo:Expected error in mat foreign-procedure: "foreign-procedure: no entry for "i do not exist"". *************** -*** 9397,9404 **** +*** 9409,9416 **** foreign.mo:Expected error in mat foreign-procedure: "id: invalid foreign-procedure argument foo". foreign.mo:Expected error in mat foreign-procedure: "foreign-procedure: invalid foreign procedure handle abcde". foreign.mo:Expected error in mat foreign-procedure: "float_id: invalid foreign-procedure argument 0". @@ -5866,7 +5866,7 @@ foreign.mo:Expected error in mat foreign-sizeof: "foreign-sizeof: invalid foreign type specifier i-am-not-a-type". foreign.mo:Expected error in mat foreign-sizeof: "foreign-sizeof: invalid foreign type specifier 1". foreign.mo:Expected error in mat foreign-bytevectors: "u8*->u8*: invalid foreign-procedure argument "hello"". ---- 9397,9404 ---- +--- 9409,9416 ---- foreign.mo:Expected error in mat foreign-procedure: "id: invalid foreign-procedure argument foo". foreign.mo:Expected error in mat foreign-procedure: "foreign-procedure: invalid foreign procedure handle abcde". foreign.mo:Expected error in mat foreign-procedure: "float_id: invalid foreign-procedure argument 0". @@ -5876,7 +5876,7 @@ foreign.mo:Expected error in mat foreign-sizeof: "foreign-sizeof: invalid foreign type specifier 1". foreign.mo:Expected error in mat foreign-bytevectors: "u8*->u8*: invalid foreign-procedure argument "hello"". *************** -*** 9896,9908 **** +*** 9908,9920 **** unix.mo:Expected error in mat file-operations: "file-access-time: failed for "testlink": no such file or directory". unix.mo:Expected error in mat file-operations: "file-change-time: failed for "testlink": no such file or directory". unix.mo:Expected error in mat file-operations: "file-modification-time: failed for "testlink": no such file or directory". @@ -5890,7 +5890,7 @@ windows.mo:Expected error in mat registry: "get-registry: pooh is not a string". windows.mo:Expected error in mat registry: "put-registry!: 3 is not a string". windows.mo:Expected error in mat registry: "put-registry!: 3 is not a string". ---- 9896,9908 ---- +--- 9908,9920 ---- unix.mo:Expected error in mat file-operations: "file-access-time: failed for "testlink": no such file or directory". unix.mo:Expected error in mat file-operations: "file-change-time: failed for "testlink": no such file or directory". unix.mo:Expected error in mat file-operations: "file-modification-time: failed for "testlink": no such file or directory". @@ -5905,7 +5905,7 @@ windows.mo:Expected error in mat registry: "put-registry!: 3 is not a string". windows.mo:Expected error in mat registry: "put-registry!: 3 is not a string". *************** -*** 9930,10001 **** +*** 9942,10013 **** ieee.mo:Expected error in mat flonum->fixnum: "flonum->fixnum: result for -inf.0 would be outside of fixnum range". ieee.mo:Expected error in mat flonum->fixnum: "flonum->fixnum: result for +nan.0 would be outside of fixnum range". ieee.mo:Expected error in mat fllp: "fllp: 3 is not a flonum". @@ -5978,7 +5978,7 @@ date.mo:Expected error in mat time: "time>=?: 3 is not a time record". date.mo:Expected error in mat time: "time>=?: # is not a time record". date.mo:Expected error in mat time: "time>=?: types of