Path: utzoo!utgpu!watmath!clyde!att!pacbell!ames!mailrus!cornell!uw-beaver!rice!sun-spots-request From: trn@aplcomm.jhuapl.edu (Tony Nardo) Newsgroups: comp.sys.sun Subject: Can I force a Sun 4 *NOT* to align elements on 16 bit boundaries? Message-ID: <8811231321.AA04573@warper.jhuapl.edu> Date: 3 Dec 88 18:39:52 GMT Sender: usenet@rice.edu Organization: Rice University, Houston, Texas Lines: 19 Approved: Sun-Spots@rice.edu Original-Date: Wed, 23 Nov 88 08:21:37 EST X-Sun-Spots-Digest: Volume 7, Issue 35, message 8 of 18 This issue may have been discussed before, but I'll ask anyway... Does anyone know how to force the C compiler to align long words in a structure on 16 bit boundaries? I see there's a -misalign switch to handle "misaligned" data, but I can't seem to force the structure elements to align on 16-bit boundaries. Every "long", "struct", and "union" is forced onto a 32-bit boundary. This is especially confusing for me, since "sizeof" is returning the proper structure size (as if the data were in 16-bit alignment). I can't change the structure. I am dealing with data stored on hundreds of tapes, and am trying to use the same #include file that our other systems are using. Any suggestions? ARPA, BITNET: trn@aplcomm.jhuapl.edu (when our link revives) UUCP: {backbone!}mimsy!aplcomm!trn (stopgap measure)