[pups] extract old archive format?

Johnny Billquist bqt at softjar.se
Fri Apr 9 20:23:35 AEST 2010

Carl Lowenstein wrote:
> On Thu, Apr 8, 2010 at 7:40 PM, John  Holden <johnh at psych.usyd.edu.au> wrote:
>>> Well I found the ar specification (in ar.5 not ar.1).
>>>              struct ar_hdr {
>>>                      char      ar_name[14];
>>>                      long      ar_date;
>>>                      char      ar_uid;
>>>                      char      ar_gid;
>>>                      int       ar_mode;
>>>                      long      ar_size;
>>>              };
>> Endian should not be a problem on a Intel/AMD processor. More likely your C
>> compiler is padding out the array for alignment. Try a '-fpack-struct' or
>> more safely, read the elements individually rather than a structure.
> In the PDP-11 long is 32 bits, int 16 bits.   And the PDP-11 is
> determinedly little-endian if you stick to integers.

Um? Longs are integers, and they are middle-endian...

> They got floating-point software right in 1971, but somebody screwed
> up the word order when building FP hardware, which led to the
> middle-endian mess.

...but yes. The middle-endian long issue appeared with the FPP, since 
that is the only hardware that deals natively with long integers.


More information about the TUHS mailing list