Porting Meta-CVS

Meta-CVS versions prior to 1.1.1 are more portable, but require a C
compiler in order to build, which is used to build a shim library that
is linked into CLISP, and which provides a stable, platform-independent
target API for the rest of the application.  These older versions of
Meta-CVS have been reported to run on FreeBSD and Solaris.  Newer Meta-CVS
releases target the operating system directly, using the CLISP foreign
function capabilities, without any intervening shim.  On Linux, it refers
directly to functions in "libc.so.6" and on Cygwin it refers directly to
"cygwin1.dll".  This is not only more efficient, but it eliminates the
need to compile any C and to link a custom CLISP image.

But it also means that that for each platform, the system glue code has
to be carefully tweaked. For instance, each POSIX-like platform has a
different layout for the C types struct dirent and struct stat. Some
binary interfaces differ.  For instance, on glibc2, there isn't actually
a stat function in the library, but something called __xstat, which has
an extra argument.  Actually, Meta-CVS uses __xstat64, the large-file
version of stat.

By targetting the binary interfaces directly, all that Meta-CVS needs
is CLISP. Its installation needs no special packages, and no C header
files have to be processed; the definitions of the binary interfaces
are contained within Meta-CVS.

All of the platform glue is in code/clisp-ffi.lisp module.

The binary interfaces for things like dirent and stat were deduced by
reading the platform header files, plus trial-and-error.  The bindings
can be tested interactively.  After building a Meta-CVS image, you can
run the resulting memory image with CLISP:

  $ clisp -M code/mcvs.mem
  [1]> (defparameter *d* (unix-funcs:opendir "."))
  *D*
  [2]> (unix-funcs:readdir *d*)
  #S(UNIX-FUNCS:DIRENT :INO 243536 :OFF 12 :RECLEN 24 :TYPE 4 :NAME ".")
  [3]> (unix-funcs:readdir *d*)
  #S(UNIX-FUNCS:DIRENT :INO 551756 :OFF 24 :RECLEN 24 :TYPE 4 :NAME "..")
  [4]> (unix-funcs:readdir *d*)
  #S(UNIX-FUNCS:DIRENT :INO 243537 :OFF 36 :RECLEN 24 :TYPE 4 :NAME "MCVS")
  [5]> (unix-funcs:readdir *d*)
  #S(UNIX-FUNCS:DIRENT :INO 632863 :OFF 48 :RECLEN 24 :TYPE 4 :NAME "code")
  [6]> (unix-funcs:readdir *d*)
  #S(UNIX-FUNCS:DIRENT :INO 243579 :OFF 60 :RECLEN 24 :TYPE 8 :NAME "TODO")
