Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!csd4.milw.wisc.edu!leah!rpi!batcomputer!cornell!rochester!pt.cs.cmu.edu!cadre!pitt!darth!libove!root From: root@libove.UUCP (Jay M. Libove) Newsgroups: comp.sources.d Subject: pax on 16 bit machine, tar filesize field Message-ID: <228@libove.UUCP> Date: 26 Feb 89 17:13:32 GMT Organization: Libove.UUCP Lines: 40 In "pax" on my 16 bit Xenix (80286) machine, it seems that the filesize field (in tar listings anyway, haven't tried cpio or pax format) is a 16 bit signed integer, because: % ls -l /tmp/test[123] -rw------- 1 root root 33456 Feb 26 12:05 /tmp/test1 -rw-r--r-- 1 root root 3057 Feb 25 22:54 /tmp/test2 -rw-r--r-- 1 root root 69969 Feb 26 12:05 /tmp/test3 % ls -il /usr/local/bin/{tar,pax} 5318 -rwxr-xr-x 3 bin bin 183004 Feb 16 21:57 /usr/local/bin/pax 5318 -rwxr-xr-x 3 bin bin 183004 Feb 16 21:57 /usr/local/bin/tar % which tar /usr/local/bin/tar % tar cvf /tmp/test.tar /tmp/test[123] a /tmp/test1 66 Blocks a /tmp/test2 6 Blocks a /tmp/test3 137 Blocks % tar tvf /tmp/test.tar Tar: blocksize = 20 rw------- 0/0 -32080 Feb 26 12:05 1989 /tmp/test1 rw-r--r-- 0/0 3057 Feb 25 22:54 1989 /tmp/test2 rw-r--r-- 0/0 4433 Feb 26 12:05 1989 /tmp/test3 Obviously, there's a problem here. I looked at the list function (tar_entry in list.c) and that's not the trouble - it printf's a long integer directly from a stat structure, so I guess the problem is in the archiving section of the utility. Does someone have a fix for this? I've applied the posted patches 1, 2, and 3, to the posted source. I posess, but have not applied, the "tar append bug in MSDOS" unofficial patch from Harold Waters at OK State, since this isn't running on DOS. Thanks for any suggestions... ------------- Jay Libove jl42@andrew.cmu.edu, libove@cs.cmu.edu, 5731 Centre Ave, Apt 3 gateway.sei.cmu.edu!libove!libove, jl42@andrew.BITnet, Pittsburgh, PA 15206 jl42@drycas.BITnet, psuvax1!pitt!darth!libove!libove, (412) 362-8983 or uunet!nfsun!libove!libove