struct 32 bit aligned and padded

Ron Stanonik stanonik at nprdc.navy.mil
Sat Apr 20 03:21:06 AEST 1991


Alignment I can understand, but padding just seems like the
compiler writers got lazy.  It also meant that sizeof(struct packet)
wasn't the packet size, when the packet didn't end on a 32 bit boundary;
ie, we had to count up the bytes by hand to figure packet sizes.
We looked in vain for any cc flags that might disable padding,
but, as you said, we'd be wary of using such a flag for fear of
fouling up some sysV.3.2 include that expected the padding.
Did the 3b2 folks really use this compiler to compile the kernel;
ie, they didn't encounter any problems with this padding?

Thanks,

Ron Stanonik
stanonik at nprdc.navy.mil
ucsd!nprdc!stanonik



More information about the Comp.unix.programmer mailing list