[comp.os.minix] PD Tar for MINIX -- how to get it working

rmtodd@uokmax.UUCP (Richard Michael Todd) (12/10/87)

Recently the current version of John Gilmore's PD Tar has appeared on
comp.sources.unix.  It's a very powerful program, much better than the
tar that comes with MINIX.  PD Tar will compile under MINIX, provided that
you make a few changes in the library (libc.a).  These changes are all along
the lines of making MINIX more UNIX-compatible.  (I figured it was easier
to fix any incompatibilities by altering the library, so that I wouldn't
have to do it again on the next program I ported.)  The following articles
will include all the source files you need.  Many of these changes have
appeared before on the newsgroup several months back, but it seemed like
a good idea to post them again.
   Here is the list of the various changes made:
    1. Various additional include files, e.g. <sys/types.h>, that practically
all UNIX programs expect to have.  Includes 
    2. Some form of the directory library directory(3).  There are a couple
of PD implementations floating around; the one I used is by Doug Gwyn, and
it's nice.  Note that a slight change in PD Tar is necessary to use these
routines, since Gwyn's library implements the POSIX standard for directory(3),
whereas PD Tar assumes the BSD-style directory routines are present.  They
aren't quite compatible.  The changes needed to Tar are only 3 lines; I will
post the required context diff.  If you've already got some form of the
directory routines installed in libc.a, you won't need these.  
    3. The routines ctime(3) and getopt(3).  Tar needs these, and it's nice
to have them for other programs as well.
    4. A fixed doprintf.c.  The original doprintf.c couldn't handle printf
formats of the form %.*s (i.e. the variable length formats).  This version
does.
    5. A revised Makefile.  Alas, the original PD Tar makefile revealed quite
clearly that MINIX make won't handle correctly macro definitions that
reference other macros.  Until someone fixes MINIX make, we all have to
use a different Makefile.
    6. The revision to libc.a to allow exit() to flush all stdio buffers.
I posted this some time ago; I will post it again tomorrow.
    7. With all of the above, you can get PD Tar up and running and reading
ordinary tar-files.  However, if you want to handle compressed tar-files, you
need something else: a copy of compress.  This is the same compress that runs
on UNIX systems and some DOS systems; it's completely compatible except for
the usual restrictions on code length (the MINIX version can't handle files
compressed higher than -b13).
   Watch for the remaining postings.
--------------------------------------------------------------------------
Richard Todd					"MS-DOS? Just Say No"
USSnail:820 Annie Court,Norman OK 73069
UUCP: {allegra!cbosgd|ihnp4}!occrsh!uokmax!rmtodd