Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!voder!pyramid!ctnews!risky!chrisb From: chrisb@risky.Convergent.COM (Chris Bertin) Newsgroups: comp.unix.programmer Subject: Re: struct 32 bit aligned and padded Message-ID: <4101@risky.Convergent.COM> Date: 18 Apr 91 18:44:03 GMT References: <14082@arctic.nprdc.navy.mil> Reply-To: chrisb@risky.UUCP (Chris Bertin) Organization: Unisys Network Computing Group (CT), San Jose, CA Lines: 21 In article <14082@arctic.nprdc.navy.mil> stanonik@nprdc.navy.mil (Ron Stanonik) writes: ... alignment problem description deleted ... > ... From K&R second edition, I gather there are no >assurances regarding alignment or padding in this instance, but this >behaviour seems contrary to the usefulness of C as a low level language. > If C had per-structure alignment directives, it would make it a lot more useful as a low level language, but it would also make it a lot less portable. Some compilers use environment variables (STALIGN, DBLALIGN in Motorola compilers) to align structures. Perhaps the 3B2 has something of the sort. This could help you in this case, although these variables may cause major other problems if you end up with standard (/usr/include/...) structures aligned differently between your .o files and the libraries. -- Chris Bertin | chrisb@risky.Convergent.COM Unisys | or (408) 435-3762 | ...!uunet!pyramid!ctnews!risky!chrisb