delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/07/01:11:38

Date: Thu, 07 Aug 1997 17:13:51 +1100
From: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
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
References: <33E957BE DOT 7216 AT geocities DOT com>
Comments: Authenticated sender is <billc AT blackmagic DOT tait DOT co DOT nz>

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019