Date: Thu, 07 Aug 1997 17:13:51 +1100 From: Bill Currie Subject: Re: Why does sizeof give me... In-reply-to: <199708070420.OAA16036@rabble.uow.edu.au> To: djgpp AT delorie DOT com (DJGPP) Message-id: <199708070518.RAA04589@teleng1.tait.co.nz gatekeeper.tait.co.nz> Organization: Tait Electronics Limited MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT References: <33E957BE DOT 7216 AT geocities DOT com> Comments: Authenticated sender is Precedence: bulk On 7 Aug 97 at 14:20, Brett Leslie Porter wrote: > programs (yet!) You can probably set a compiler switch to turn off > alignment, I'm not sure. DON'T DO THIS!!!!!!! Yes, gcc has such a switch, however, if you use it, you must recompile every single library you use with this switch (including libc) otherwise you will get some nasty, hard to find bugs. Use `__attribute__((packed))' instead. `dos.h' in $(DJDIR)/include has some examples of it's usage (around line 195, struct _find_t). Bill -- Leave others their otherness.