Various patches and packages for Corman Lisp 2.51

Getting and installing the patches

To install the patches, simply copy the files into the appropriate subdirectory of your Corman Lisp installation.

Alternatively, you can download all the patches as a ZIP file and unpack that in the root directory of your Corman Lisp installation.

Applying the patches

After the patches have been installed, you must get them into your lisp image.

If you want the patches in your default image (recommended), rename CormanLisp.img to something else and run

clconsole -execute sys/compile-sys.lisp

If you do not want them in the default image, you must perform the above steps, rename the newly created CormanLisp.img to something else and then put the old image back. This is because some of the patches change low-level functions and thus I cannot guarantee that simply loading them will work.

The patches

There are three types of patches here:

  1. Bug fixes
  2. ANSI compliance fixes
  3. Enhancements — nice-to-have features

Patches for core functionality (files in sys)

  • Ensure existence of type specifiers standard-object, class, standard-class, generic-function and standard-generic-function.
  • Allow literal package objects in fasl files (will do a find-package on load).
  • Only call restart-interactive-function if it actually exists.
  • Only add the default packages (:CL :CCL) to the package use list if no explicit use list is supplied.
  • iterate-over-package should skip uninterned symbols.
  • Fix for ~^ nested within ~(~).
  • Switch test order of structureness and hashtableness (since hash tables happen to be structures.
  • Implement equalp for structures and hash tables.
  • Stop #! barfing on a void fun(void); prototype.
  • Print (function foo) as #'foo.
  • open should accept :if-exists :error.
  • Wrap expansion of defconstant in an appropriate eval-when.
  • Print (function foo) as #'foo.
  • Recognize xp-structure objects as streams.

Patches for non-core functionality (files in modules)


This patch is for Chris Double's sockets implementation, included in the Corman Lisp distribution.

  • Accept null bytes in socket input.
  • Accept 0 (zero) as a port number for local-socket objects and update the port slot of the instance after connect or bind..
  • Define the various BOOL types as :long-bool.

Additional packages


An implementation of composite streams (two-way and synonym streams) for Corman Lisp 2.51, based on Chris Double's Gray streams.


Chris Double's Gray streams package, with some additional modifications. If you have retrieved gray-streams.lisp from Chris Double's website and the version of that file is 1.4 or greater, you don't need this.


An implementation of various small ANSI bits missing from Corman Lisp 2.51:

  • get-standard-pprint-dispatch-table
  • get-standard-readtable
  • machine-instance
  • machine-type
  • machine-version
  • user-homedir-pathname
  • wild-pathname-p